Skip to content
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

Reduce the number of environment variables #18

Closed
diegoferigo opened this issue Jun 14, 2020 · 5 comments · Fixed by #31
Closed

Reduce the number of environment variables #18

diegoferigo opened this issue Jun 14, 2020 · 5 comments · Fixed by #31

Comments

@diegoferigo
Copy link
Member

Even if at the time of writing gazebosim/gz-sim#172 has not been merged, we should keep an eye on it since it could allow us to reduce the number of environment variables to export.

@traversaro
Copy link
Member

traversaro commented Jun 14, 2020

I never opened a issue upstream to propose that, but I personally think that it would be ideal to have a single IGN_PREFIX_PATH env variable, similary to how CMake have a single CMAKE_PREFIX_PATH variable even if it also have CMAKE_PROGRAM_PATH, CMAKE_LIBRARY_PATH, etc etc.

@diegoferigo
Copy link
Member Author

Do you mean a single unified env variable that could be used for everything (worlds, models, meshes, plugins, physics plugins, rendering plugins, etc)? In gazebosim/gz-sim#172 it seems that they are unifying at least all the SDF resources under IGN_GAZEBO_RESOURCE_PATH, that is already a step forward.

@traversaro
Copy link
Member

Do you mean a single unified env variable that could be used for everything (worlds, models, meshes, plugins, physics plugins, rendering plugins, etc)?

Yes.

In ignitionrobotics/ign-gazebo#172 it seems that they are unifying at least all the SDF resources under IGN_GAZEBO_RESOURCE_PATH, that is already a step forward.

Definitely a step forward.

@chapulina
Copy link

I never opened a issue upstream to propose that

Just an extra reference, you've brought this up on this other PR 😉. One of the reasons for keeping some paths separate is for cases when we want to list the entire content of some paths, like how all plugins in IGN_GUI_PLUGIN_PATH end up on the menu. But we're trying to condense them as much as possible.

@traversaro
Copy link
Member

I never opened a issue upstream to propose that

Just an extra reference, you've brought this up on this other PR 😉.

Thanks, I had completely forgot about it.

One of the reasons for keeping some paths separate is for cases when we want to list the entire content of some paths, like how all plugins in IGN_GUI_PLUGIN_PATH end up on the menu. But we're trying to condense them as much as possible.

Yes, but to clarify the proposal (at least on CMake) the unified variable CMAKE_PREFIX_PATH exists and is defined as:

Semicolon-separated list of directories specifying installation prefixes to be searched by the find_package(), find_program(), find_library(), find_file(), and find_path() commands.
But then there are also individual env variables for each call, if users need more granularity:

Then clearly there is the usual trade-off between flexibility and simplicity, so in any case it is debatable if the unified env variable would be worth it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants