Treat IGN_LAUNCH_CONFIG_PATH as a path list. #93
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bug Report
Fixes issue #92.
Summary
Treat
IGN_LAUNCH_CONFIG_PATH
as a path list instead of just one path.Depends on ign-common C bindings: gazebosim/gz-common#168 , because I felt reinventing the C++ wheel in Ruby is not really the way to go.
This is my first piece of code in Ruby, so give it a thorough check because I generally didn't know what I'm doing :) Most importantly, it'd be fine to find a way to use the Importer in such a way that importing the second library doesn't break the code loaded from the first one, but I couldn't wrap my head around it...
I was also thinking whether it's better to pass an absolute path to the ign-common library or just a filename, and decided just for the filename to ease having multiple ign-common versions side-by-side and choosing between them based on
LD_LIBRARY_PATH
. But passing the absolute path is possible if you'd think it's better for some reason.I also didn't know how to add tests for this feature. However, there were none for the whole Ruby command file anyways...
I do the development on Dome, though it seemed to me this feature could go even in Citadel, so I pointed this PR to the Citadel version and maintain a 1-1 cherry-pick of it for Dome in https://github.com/peci1/ign-launch/tree/env-pathlist . That might speed up forward-porting of the feature, which I'm interested in :)
Checklist
codecheck
passed (Seecontributing)
test coverage)
another open pull request
to support the maintainers
Note to maintainers: Remember to use Squash-Merge