Repository navigation
test: stop depending on JSON key order in the fabric depends test - #1065
Merged
Merged
Conversation
depends is a JSON object, and serde_json only keeps declaration order when its preserve_order feature is on somewhere in the build. It is not on now, so the keys come back sorted and the test failed on main. The only caller sorts requires anyway, so the test now does the same.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fabric_dependencies_list_depends_keysfails on main:dependsis a JSON object, and serde_json keeps declaration order only when itspreserve_orderfeature is enabled somewhere in the build. It isn't right now, so the keys come back sorted. The only caller (local_manifest.rs:566) sorts and dedupsrequiresanyway, so the order never mattered outside this test.The test now sorts before comparing, so it passes whether or not
preserve_ordergets turned on again.cargo test -p oneclient_content --libgoes from 1 failure to 0.