cps-org / cps

Common Package Specification — A cross-tool mechanism for locating software dependencies
https://cps-org.github.io/cps/
Other
104 stars 8 forks source link

Glob search order should be "specified" #81

Open mwoehlke opened 1 day ago

mwoehlke commented 1 day ago

Currently, Package Searching gives a list of paths and specifies the order in which each item should be searched. However, some items involve globs. We should document the order in which matching globs are searched, even if that order is "unspecified" or "implementation defined".

Note that CMake appears to use CMAKE_FIND_PACKAGE_SORT_ORDER and CMAKE_FIND_PACKAGE_SORT_DIRECTION to control this order; it would be helpful for CMake's implementation if whatever we specify is compatible with this.

dcbaker commented 23 hours ago

I'd prefer if we have some sort of definition here. I have real concerns about difficulties in projects with multiple build systems getting different results because (for example) CMake sorts one way, and Meson sorts another. If we leave it unspecified, it would appreciate something like "currently unspecified. This may change in a future revision of the CPS spec".

For reference, Meson would probably want to uses whatever Python's glob.glob() does.