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:
URI
System unversioned (SDF_SHARE_PATH/sdformat)
System versioned (SDF_SHARE_PATH/sdformat/x.x)
Custom
Absolute or Local
The order should probably be almost opposite with added paths to account for "sdformat" parent expectation seen below:
URI
Absolute or Local
Custom
raw System versioned (SDF_SHARE_PATH/x.x)
prepended System versioned (SDF_SHARE_PATH/sdformat/x.x)
raw System unversioned (SDF_SHARE_PATH)
prepended System unversioned (SDF_SHARE_PATH/sdformat)
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 itThe current order is:
The order should probably be almost opposite with added paths to account for "sdformat" parent expectation seen below: