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

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

Open
RomanYarik opened this issue Mar 14, 2022 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@RomanYarik
Copy link
Contributor

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

@RomanYarik RomanYarik added the bug Something isn't working label Mar 14, 2022
@thehulke thehulke self-assigned this May 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants