[6.2] Cherry-pick: Fix pre-computation of traits when loading dependency manifests #9136
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.
Explanation:
Fixes some errors in trait computation that hadn't considered when default traits
["default"]
were being appended to theEnabledTraitsMap
, which should only consider a list of flattened traits + explicitly enabled traits by a user/parent package. The inclusion ofdefault
in this dictionary was resulting in an inaccurate computation of which traits were enabled, since pre-computation serves to flatten the list of transitively enabled traits for future reference.There were also cases where we were re-computing transitively enabled traits in areas where we had already filled out the
enabledTraitsMap
, so we now default to simply fetching the entry from the dictionary instead of computing the traits all over again.Scope:
Fixes trait-related computation in dependency resolution
Issues:
Original PRs:
Fix pre-computation of traits when loading dependency manifests #9057
Risk:
Low risk
Testing:
Added new fixtures + regression tests to address the behaviour that was previously incorrect.
Reviewers:
@dschaefer2