Skip to content

scripts: different environments under the same name share the same chung #1204

Description

@RomanYarik

Currently if I have a monorepo, in which there are multiple features declaring the same environment (name + type), their setup calls end environment declarations get mixed up in the same chunk.

Prior to the enviropnment inheritance we failed to notice this, because the setup calls were based on the environment name, but now, they rely on the instance.

Currently, in my monorepo I have 3 features, A, B, C.
A declares an iframe environment - export const baseEnv = new Environment('base', 'iframe', 'multi');.
B declares an iframe environment, which inherits baseEnv - export const frameEnv = new Environment('frame', 'iframe', 'multi',[baseEnv]);.
C declares an iframe environment - export const frameEnv = new Environment('frame', 'iframe', 'multi');

in this case, the bundle of frame env will have both the declaration of the frameEnv as an inherited one and, one not.
This caused the inherited service from baseEnv to not be missing at runtime when used from the frameEnv

Activity

  1. self-assigned this
    on May 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions