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(angular): add check before attempting to collect secondary entrypoints #11437 #11496

Merged
merged 4 commits into from
Aug 15, 2022

Conversation

Coly010
Copy link
Contributor

@Coly010 Coly010 commented Aug 8, 2022

Current Behavior

A lib that has the same starting name as another library forces an infinite loop when checking for secondary entry points

Expected Behavior

We're checking all libraries for secondary entry points, when we should only check those that might contain it.

This should also have a minor performance gain

Related Issue(s)

Fixes #11437

@Coly010 Coly010 self-assigned this Aug 8, 2022
@vercel
Copy link

vercel bot commented Aug 8, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
nx-dev ⬜️ Ignored (Inspect) Aug 15, 2022 at 0:03AM (UTC)

@Coly010 Coly010 force-pushed the 11437-ng-mf-infinite-loop branch 3 times, most recently from 09a3f2c to ee97efd Compare August 11, 2022 08:33
Comment on lines 73 to 85
const tsConfigAliasesForLibWithSecondaryEntryPoints = Object.entries(
tsconfigPathAliases
).reduce((acc, [tsKey, tsPaths]) => {
if (!tsKey.startsWith(library.importKey)) {
return { ...acc };
}

if (tsPaths.some((path) => path.startsWith(`${library.root}/`))) {
acc = { ...acc, [tsKey]: tsPaths };
}

return acc;
}, {});
Copy link
Member

Choose a reason for hiding this comment

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

There's already some sort of filtering inside collectWorkspaceLibrarySecondaryEntryPoints which becomes useless with this change. I think it would be better to move this filter inside that function and replace the old filter that's there. Wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I think that makes sense, I updated it

@Coly010 Coly010 merged commit f930117 into nrwl:master Aug 15, 2022
@Coly010 Coly010 deleted the 11437-ng-mf-infinite-loop branch August 15, 2022 12:11
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Webpack stuck in an infinite loop while loading two libraries sharing a part of their name.
2 participants