Skip to content

build: migrate partial compliance tests to rules_js #61865

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

Closed
wants to merge 2 commits into from

Conversation

devversion
Copy link
Member

See individual commits

@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Jun 4, 2025
@ngbot ngbot bot added this to the Backlog milestone Jun 4, 2025
@devversion devversion force-pushed the rjs-8 branch 3 times, most recently from 2e3dac1 to 1c30f54 Compare June 4, 2025 18:37
@devversion devversion requested a review from josephperrott June 4, 2025 18:37
@devversion devversion added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Jun 4, 2025
@devversion devversion marked this pull request as ready for review June 4, 2025 18:41
Copy link
Member

@josephperrott josephperrott left a comment

Choose a reason for hiding this comment

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

LGTM

@devversion devversion force-pushed the rjs-8 branch 2 times, most recently from 082b341 to e3a6284 Compare June 5, 2025 09:24
For the `rules_js` migration, we are facing the problem where
our current Angular code is shipped as ESM, but we aren't fully
there yet with fully compliant strict ESM during development.

That is because we lack explicit import extensions, and it's also a
different story how this would work in Google3, if we were to add them.

In addition, we cross-import from our packages using npm module names.
This works well for TS, for ESBuild because those can respect path
mappings— but at runtime, when executing native `jasmine_test`'s— such
mappings aren't respected. The options here are:

- avoid module imports in the repo (impossible; undesired)
- use pre-bundling of all NodeJS execution involving npm package code
  (slower, extra build action cost)
- wire up a simple NodeJS loader (supported via official APIs) to simply
  account for our cases (preferred and similar to what we experimented
  with for the last year(s); and worked well)

This commit implements the last option and allows for an easy migration
to `rules_js`, and also is pretty reasonable. Long-term we can resolve
the extension problem if we e.g. migrate to real explicit extensions + a
proper TS module resolution like e.g. `nodenext`.
Migrates the partial compliance tests to `rules_js`. Also as part of
this, we re-enable RBE to see if that fixed the issues, or in case
they are already resolved from the RBE side.
@devversion devversion added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release and removed action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Jun 5, 2025
@pkozlowski-opensource
Copy link
Member

This PR was merged into the repository by commit 93c74ef.

The changes were merged into the following branches: main

pkozlowski-opensource pushed a commit that referenced this pull request Jun 5, 2025
Migrates the partial compliance tests to `rules_js`. Also as part of
this, we re-enable RBE to see if that fixed the issues, or in case
they are already resolved from the RBE side.

PR Close #61865
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants