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

feature(install) - auto install envs that are configured in the generator aspect in workspace.jsonc #8151

Merged
merged 3 commits into from
Nov 15, 2023

Conversation

GiladShoham
Copy link
Member

Proposed Changes

scopes/generator/generator/generator.main.runtime.ts Outdated Show resolved Hide resolved
Comment on lines +457 to +460
const comps = await this.workspace.importAndGetMany(
[parsedId],
`to get the env ${parsedId.toString()} for installation`
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to me that it would make more sense to loop over all envIdStr first and then pass the array of envIdStr to importAndGetMany, then do the next actions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, but since this is usually a very small array it doesn't worth the complication of the code fmo

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GiladShoham , if you don't want to refactor to do it one import, at least change this to run serially, not in parallel. It's risky to run import of multiple components in parallel. (we never do that). You could end up writing the same files at the same time and corrupt the objects.
The best would be of course to have one import.

@GiladShoham GiladShoham enabled auto-merge (squash) November 15, 2023 11:23
@GiladShoham GiladShoham merged commit 03c6841 into master Nov 15, 2023
1 check passed
@GiladShoham GiladShoham deleted the auto-install-generator-envs branch November 15, 2023 12:10
@itaymendel itaymendel mentioned this pull request Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants