scpeters-test / sdformat

Simulation Description Format (SDF) parser and description files.
http://sdformat.org
Other
1 stars 0 forks source link

sdf::findFile search order is counter-intuitive and likely incorrect #56

Open scpeters-test opened 10 years ago

scpeters-test commented 10 years ago

Original report (archived issue) by andy_somerville (Bitbucket: andy_somerville).


Currently sdf::findFile searches system level directories before local, or custom path (SDF_PATH) specific ones. This prevents searches to non install locations from working correctly.

Additionally it presupposes that the file being searched is below a parent directory "sdformat" when searching in below SDF_SHARE_PATH. Converter::Converter also prepends a parent called "sdformat" to queries doubling this path to "sdformat/sdformat/" causing it to fail in those cases.

These both directly affect the ability of the integration tests to function correctly for uninstalled builds on systems where there is an older/different system level build already installed.

It is also likely cause problems outside of this scenario.

For backward compatibility the sdformat prepend should be kept, but an addional search should be done without it

The current order is:

The order should probably be almost opposite with added paths to account for "sdformat" parent expectation seen below:

scpeters-test commented 10 years ago

Original comment by andy_somerville (Bitbucket: andy_somerville).


Working on a patch.

scpeters-test commented 10 years ago

Original comment by andy_somerville (Bitbucket: andy_somerville).


scpeters-test commented 10 years ago

Original comment by andy_somerville (Bitbucket: andy_somerville).