You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[6.2] Cherry-pick: Fix pre-computation of traits when loading dependency manifests (#9136)
- **Explanation**:
Fixes some errors in trait computation that hadn't considered when
default traits `["default"]` were being appended to the
`EnabledTraitsMap`, which should only consider a list of flattened
traits + *explicitly enabled traits* by a user/parent package. The
inclusion of `default` 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**:
#9057
- **Risk**:
Low risk
- **Testing**:
Added new fixtures + regression tests to address the behaviour that was
previously incorrect.
- **Reviewers**:
@dschaefer2
// Shouldn't union here if enabledTraitsMap returns "default" and we DO have explicitly enabled traits, since we're meant to flatten the default traits.
// Shouldn't union here if enabledTraitsMap returns "default" and we DO have explicitly enabled traits, since we're meant to flatten the default traits.
0 commit comments