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

Migrate ng_module #30731

Merged
merged 7 commits into from
Mar 28, 2025
Merged

Migrate ng_module #30731

merged 7 commits into from
Mar 28, 2025

Conversation

devversion
Copy link
Member

@devversion devversion commented Mar 27, 2025

See individual commits

@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Mar 27, 2025
@devversion devversion force-pushed the rjs-6 branch 3 times, most recently from ae80087 to 46ebd2b Compare March 27, 2025 19:59
Sets up the new `ng_project` rule and uses it in `cdk/a11y`. Also sets
up this rule similar to our `ts_project` interop- reusing that code
completely, yay!
With the new `ts_project`, or `ng_project` rule, HTML templates of
components are also copied over to the bazel bin. This unveiled a naming
conflict of e.g. `slider.md` being generated as `slider.html`; while
there is a template like `slider.html`.
This commit migrates all `ng_module` targets to the new `ng_project`
rule. This change was partially assisted/generated using Gemini.
Currently we always use our build tsconfigs from `/src`, whenever we see
a `ts_project`, or `ng_project` target. This doesn't work for targets
outside of `src` and ambiguously breaks the build.

This commit makes this a more obvious failure mode.
We've decided that this size testing infra is not useful after the MDC
migration and can be removed; we can easily re-add if we want.

Notably it was disabled/not running on CI (in a blocking mode) for
months.
Temporarily patches the legacy `ng_package` rule to properly request
partial compilation output from the new `ng_project` rule targets.
@devversion devversion marked this pull request as ready for review March 27, 2025 20:30
@devversion devversion requested review from a team as code owners March 27, 2025 20:30
@devversion devversion requested review from andrewseguin, wagnermaciel, JoostK and josephperrott and removed request for a team, andrewseguin, wagnermaciel and JoostK March 27, 2025 20:30
@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 Mar 27, 2025
This commit removes references to the `ng_module` rule.
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

I like how we were able to just slot in the ng_project rule as the actual rule impl that the macro references and keep everything else the same.

@devversion devversion merged commit 7af0f92 into angular:main Mar 28, 2025
23 checks passed
@devversion devversion deleted the rjs-6 branch March 28, 2025 13:29
@devversion devversion 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 Mar 28, 2025
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: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants