Skip to content
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

Fix inconsistent resolution ordering #13580

Merged
merged 1 commit into from Jun 25, 2020
Merged

Fix inconsistent resolution ordering #13580

merged 1 commit into from Jun 25, 2020

Commits on Jun 25, 2020

  1. Fix inconsistent resolution ordering

    The fix for #12951 introduced by #12957 worked but made a number
    of other bugs much more likely to happen: by using the right derivation
    strategy in each project, we were properly fetching the component
    metadata we wanted to process from the cache.
    
    However, this component metadata was mutable, because of laziness.
    In particular, derivation of variants require to set the derivation
    strategy on "deemed immutable" metadata. The problem is that when
    several configurations are resolved concurrently, we ended up mutating
    the same component from different threads, with different derivation
    strategies.
    
    The ideal fix would be to have real immutable component metadata from
    the cache. However, because of laziness (required for performance), we
    can't do that.
    
    The fix in this PR is therefore to create a copy of the module metadata
    whenever a different derivation strategy needs to be used.
    
    It also highlighted another bug, which is that when we use cached
    component metadata rules, the derivation strategy wasn't part of the
    cache key, meaning that we would get whatever was first stored in the
    binary cache.
    
    We now properly separate the entries in the cache by amending the cache
    key with the name of the strategy. This isn't ideal as we could potentially
    have _stateful_ strategies, but for now there are no such things in the
    wild. Again in reality we'd like to get rid of the "magic snapshotting"
    of rules and do something similar to what transforms do, with proper
    declared input types.
    
    Fixes #13555
    melix committed Jun 25, 2020
    Configuration menu
    Copy the full SHA
    efcce37 View commit details
    Browse the repository at this point in the history