Skip to content

build: enable update of @angular/bazel #26834

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

Merged
merged 2 commits into from
Apr 4, 2023

Conversation

devversion
Copy link
Member

Enables updating of @angular/bazel. We stopped because:

  • @angular/bazel was updated to no longer produce CommonJS devmode
  • It relied on ts_library patches to no longer produce CommonJS devmode.

We can make these changes to unblock the update, but it would be a significant effort as all nodejs_binary targets would need to be updated to execute ESM natively (as there obviously is no CJS anymore). This is what we did as an experiment in framework to run tests/code natively using .mjs. We are not going to do it here as we would rather want to put the effort into switching to a toolchain that supports ESM properly.. without patches.

For now we are just reversing the change in ng_module so that it still produces devmode CommonJS. Components repo will not use for tests etc, but it's there to allow for nodejs_binary CommonJS targets, and to avoid having to perform a large migration. See all the patches that are needed in framework:
https://github.com/angular/angular/tree/main/tools/esm-interop

@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Mar 24, 2023
@alan-agius4 alan-agius4 force-pushed the update-angular-bazel-unblock branch from f844563 to 0dae9da Compare March 28, 2023 09:55
@alan-agius4 alan-agius4 added target: major This PR is targeted for the next major release merge: squash commits When the PR is merged, a squash and merge should be performed labels Mar 28, 2023
@alan-agius4 alan-agius4 force-pushed the update-angular-bazel-unblock branch 3 times, most recently from 93d6201 to b4bec1f Compare March 28, 2023 10:07
Enables updating of `@angular/bazel`. We stopped because:

* `@angular/bazel` was updated to no longer produce CommonJS devmode
* It relied on `ts_library` patches to no longer produce CommonJS
  devmode.

We can make these changes to unblock the update, but it would be a
significant effort as all `nodejs_binary` targets would need to be
updated to execute ESM natively (as there obviously is no CJS anymore).
This is what we did as an experiment in framework to run tests/code
natively using `.mjs`. We are not going to do it here as we would rather
want to put the effort into switching to a toolchain that supports ESM
properly.. without patches.

For now we are just reversing the change in `ng_module` so that it still
produces devmode CommonJS. Components repo will not use for tests etc,
but it's there to allow for `nodejs_binary` CommonJS targets, and to
avoid having to perform a large migration. See all the patches that are
needed in framework:
https://github.com/angular/angular/tree/main/tools/esm-interop
@alan-agius4 alan-agius4 force-pushed the update-angular-bazel-unblock branch from b4bec1f to ea0ab31 Compare April 4, 2023 14:08
@alan-agius4 alan-agius4 force-pushed the update-angular-bazel-unblock branch from ea0ab31 to 60f0628 Compare April 4, 2023 14:13
@alan-agius4 alan-agius4 marked this pull request as ready for review April 4, 2023 14:30
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Apr 4, 2023
@alan-agius4 alan-agius4 removed the request for review from josephperrott April 4, 2023 14:43
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 4, 2023
@angular-robot angular-robot bot merged commit 70b504b into angular:main Apr 4, 2023
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project merge: squash commits When the PR is merged, a squash and merge should be performed target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants