-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: remove ngcc postinstall patch in favor of separate script #18355
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
build: remove ngcc postinstall patch in favor of separate script #18355
Conversation
Marking as P2 since it is needed for a framework PR that is blocked on this. angular/angular#35079 |
Disabling this job until the fix at angular/components#18355 or similar lands.
Disabling this job until the fix at angular/components#18355 or similar lands. PR Close #35079
Disabling this job until the fix at angular/components#18355 or similar lands. PR Close #35079
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Currently we always patch `ngcc` as part of a postinstall patch. This is because Ngcc does not overwrite the `main` field of processed packages. Though, since we want to run `nodejs_binary`/`nodejs_test` targets with Ivy, we need to either have custom module resolution, or just need to update the `package.json` files to point to the NGCC processed bundles. Implementing a custom module resolution for each of these target seems rather incovenient and less reliable. Instead, we just ensure the `package.json` files point to the right files. Currently we achieve this by patching ngcc to always update the `main` property. This patch is prone to upstream ngcc changes, so we move it into a separate script that just runs _after_ ngcc, and updates the `package.json` files. The benfit of this is that `ngcc` doesn't need to be patched, and upstream ngcc changes are not likely breaking the components repo unit test (as seen in: https://circleci.com/gh/angular/angular/608106).
405c9e1
to
34f4d91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
) Currently we always patch `ngcc` as part of a postinstall patch. This is because Ngcc does not overwrite the `main` field of processed packages. Though, since we want to run `nodejs_binary`/`nodejs_test` targets with Ivy, we need to either have custom module resolution, or just need to update the `package.json` files to point to the NGCC processed bundles. Implementing a custom module resolution for each of these target seems rather incovenient and less reliable. Instead, we just ensure the `package.json` files point to the right files. Currently we achieve this by patching ngcc to always update the `main` property. This patch is prone to upstream ngcc changes, so we move it into a separate script that just runs _after_ ngcc, and updates the `package.json` files. The benfit of this is that `ngcc` doesn't need to be patched, and upstream ngcc changes are not likely breaking the components repo unit test (as seen in: https://circleci.com/gh/angular/angular/608106).
…ular#18355) Currently we always patch `ngcc` as part of a postinstall patch. This is because Ngcc does not overwrite the `main` field of processed packages. Though, since we want to run `nodejs_binary`/`nodejs_test` targets with Ivy, we need to either have custom module resolution, or just need to update the `package.json` files to point to the NGCC processed bundles. Implementing a custom module resolution for each of these target seems rather incovenient and less reliable. Instead, we just ensure the `package.json` files point to the right files. Currently we achieve this by patching ngcc to always update the `main` property. This patch is prone to upstream ngcc changes, so we move it into a separate script that just runs _after_ ngcc, and updates the `package.json` files. The benfit of this is that `ngcc` doesn't need to be patched, and upstream ngcc changes are not likely breaking the components repo unit test (as seen in: https://circleci.com/gh/angular/angular/608106).
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Currently we always patch
ngcc
as part of a postinstall patch. This isbecause Ngcc does not overwrite the
main
field of processed packages.Though, since we want to run
nodejs_binary
/nodejs_test
targets withIvy, we need to either have custom module resolution, or just need to
update the
package.json
files to point to the NGCC processed bundles.Implementing a custom module resolution for each of these target seems
rather incovenient and less reliable. Instead, we just ensure the
package.json
files point to the right files.Currently we achieve this by patching ngcc to always update the
main
property. This patch is prone to upstream ngcc changes, so we move it
into a separate script that just runs after ngcc, and updates the
package.json
files. The benfit of this is thatngcc
doesn't need tobe patched, and upstream ngcc changes are not likely breaking the
components repo unit test (as seen in:
https://circleci.com/gh/angular/angular/608106).