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(core): Aspects from symlinked modules are not applied #19491

Merged
merged 2 commits into from Mar 22, 2022

Commits on Mar 21, 2022

  1. fix(core): Aspects from symlinked modules are not applied

    When construct libraries are purposely symlinked (as opposed of
    collectively `npm install`ed), depending on how this is done they may
    end up with multiple copies of `aws-cdk-lib`. If that happens, Aspects
    from a different `aws-cdk-lib` copy than the one providing `App` will
    not be applied.
    
    The reason is the use of `Symbol('...')` instead of `Symbol.for('...')`
    to keep the list of aspects on the construct object.
    
    - The first version creates a unique symbol per library, while adding
      a naming hint.
    - The second version deduplicates: all symbols with the same naming
      hint will receive the same symbol.
    
    The second version is necessary to make sure that different copies
    of the `aws-cdk-lib` library store their aspects under the same key.
    
    Fixes #18921, #18778, #19390.
    rix0rrr committed Mar 21, 2022
    Copy the full SHA
    4011448 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2022

  1. Copy the full SHA
    e8a678c View commit details
    Browse the repository at this point in the history