-
Notifications
You must be signed in to change notification settings - Fork 8
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
Test "component diamond" is failing on MacOS #80
Comments
Nice find! It looks like the test assertions are too specific. Probably a hash table is ordering differently, resulting in a different iteration order, which is allowable behavior. The tests have the defect, I expect. They should be looking for these entries existing in an unordered set of results. |
Is it really safe to be unordered? I assumed that the order is significant, because that's (IIUC) what pkg-config assumes. |
I don't know about unsafe as such, but that's a good point. Topologically sorting nodes is a partial sort, meaning some ordering differences are acceptable. Environments have bugs that break because of a different but valid topological sort. In my experience, this is usually because of a missing dependency somewhere, and adding the ability to override the build solution to add extra edges between components should allow most issues to be worked around until patches to relevant packages can be applied. But I'll defer to experience if that's still too much of an adoption hurdle. As far as I can tell, pkg-config does topological sorting and resolves "ties" in partial sorting ambiguities with the original ordering provided to the pkg-config command. One way to model this is by using a binary tree data structure and ordering the direct children of the root node by the order they were provided in. |
Thanks @bretbrownjr @dcbaker detailed and prompt response. |
I installed cps-config on MacOS and ran
ninja -C builddir test
.All tests passed however only
component diamond
generated reversed order result:I'm not sure if this problem only happen in MacOS, however the expected result
-I/something -I/opt/include
makes more sense for me, while it follows the "requires" order:Does it make sense to find some way to guarantee the order of "requires"?
The text was updated successfully, but these errors were encountered: