-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lan import name collision #51
base: master
Are you sure you want to change the base?
Lan import name collision #51
Conversation
Merge latest changes from upstream
The point is that both plugins deliver the same (lan_import section) capability with different ways. The "lan_import" plugin is just still there so that people with explicit plugin lists in the compilation (e.g. OpenWRT) don't break. Just consider "lan_import" to be deprecated. |
@HRogge I understand that. Background:
Option 1 makes it obvious that It's your call. |
Option 2 would break things that depend on the extended capabilites of lan_import provided by the layer2_import plugin. Its not really my call, this project has (from my point of view) been on hold for a long time... I have only used OONF for research purpose at my job for years and the C codebase has becoming a maintenance nightmare. |
I would also more likely to deprecate code or plugins if not needed in "real" installations. Therefor option 1) sounds reasonable for me. In this case also the newer plugin provides backwards config support. So we do have the know documentation issue. As for our projects running on OLSRv2/OONF we do not use lan_import, so I can not finally judge here ;-) |
BTW, rereading the comment by @HRogge I think there might be a misunderstanding: The name collision I'm talking about is not the one in the configuration syntax (e.g. that 2 plugins provide the same config section From lan_import.c: From layer2_import.c: |
Using the same "identifier" there is a good way to make sure you don't add both plugins to the executable at the same time (by producing a compile time error). Maybe there is a more elegant way. |
Sorry, but that's only helpful with an error message that is more specific than
I'm perfectly fine with failing in an obviously incorrect situation. But tell the user, what's wrong. Calling |
I was talking about a compile-time warning... hmm, we could add a special include file that is pulled in by both plugins that uses The alternative would be an error message in the CMAKE script. |
Huh? That cannot really work, as far as I understand the problem. It's perfectly fine to compile both, |
Most users will use a statically compiled binary, without any dynamically loaded plugins. And a static compilation with both lan_import and layer2_import should fail. |
@jpo-github-work, @HRogge - should we keep this PR open? Any consent how to proceed? |
As it stands, both, the lan_import and the layer2_import use the same symbol to install the subsystem. The proposed patch renames the plugin instance in lan_import from _import_subsystem to _olsrv2_lan_import_subsystem