Closed doudou closed 6 years ago
Corresponding regression tests added with: https://github.com/rock-core/rock.build-tests-package_set/pull/1
I prefer avoiding 'unless' due to readability.
So did I, but then the default ruby style guide (as enforced by rubocop) recommends using it, so I started sticking to that.
I would recommend to add some comment why you actually use the enable/disable mechanism, i.e., why the explicit call to find_task_context(...).callToPlugin is needed for default extensions - it's still not clear to me at least.
Sure, I'll add it.
Writing it lead to refactor the bugfix, to ensure that extensions that were default during generation are called at the same time (task context creation) instead of at the end of the orogen file. Corresponding build test: https://github.com/rock-core/build_tests-orogen-default_extensions/blob/master/default_extensions.orogen#L22
@2maz: does the thumbs up mean "tested, OK to merge" ?
Sorry, should have been more verbose. It means first of all thanks for fixing, and secondly good to merge - did pass testing with drivers/orogen/camera_usb.
Merged, thanks for the help !
If one has two layers of imports (i.e. project A imports B imports C), then the last line of C's installed orogen file
Spec::TaskContext.enable_default_extensions
was unconditionally enabling the extensions, which leads to the default extensions being enabled in B (even though they should not).
Fix by using a push/pop model instead of a enable/disable model.
Fixes #114 Fixes https://github.com/rock-core/drivers-orogen-iodrivers_base/issues/18