Skip to content

refactor(bazel/rules_angular): update ng_library to use @angular/build:library - #4011

Merged
alan-agius4 merged 2 commits into
angular:mainfrom
alan-agius4:architect-lib-builder
Oct 7, 2026
Merged

alan-agius4 merged 2 commits into
angular:mainfrom
alan-agius4:architect-lib-builder

Conversation

@alan-agius4

Copy link
Copy Markdown
Contributor

Updates ng_library and ng_config in rules_angular architect rules and adds test targets under test/architect.

@alan-agius4 alan-agius4 added action: blocked The action is blocked by something, such as an upstream update, or an announcement and removed action: blocked The action is blocked by something, such as an upstream update, or an announcement labels Oct 2, 2026
@alan-agius4
alan-agius4 force-pushed the architect-lib-builder branch from 73dfd2f to 5f78e38 Compare October 7, 2026 07:38
@alan-agius4
alan-agius4 marked this pull request as ready for review October 7, 2026 07:47
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Oct 7, 2026
@alan-agius4
alan-agius4 force-pushed the architect-lib-builder branch from 5f78e38 to 40b37c3 Compare October 7, 2026 07:48

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the Angular Bazel rules by simplifying the ng_library macro, adding integration tests with a sample application and library, and introducing a serve_args parameter to ng_application. Feedback highlights that referencing the @angular npm scope directly as a dependency is invalid and will cause Bazel build errors, and that unconditionally modifying .value.architect.build.options in ng_config.bzl will crash jq if a project lacks a build target. Additionally, it is recommended to use list concatenation instead of .append() for cleaner Starlark code.

Comment thread bazel/rules/rules_angular/src/architect/ng_library.bzl
Comment thread bazel/rules/rules_angular/src/architect/ng_config.bzl Outdated
Comment thread bazel/rules/rules_angular/src/architect/ng_library.bzl Outdated
@alan-agius4
alan-agius4 force-pushed the architect-lib-builder branch 3 times, most recently from ce1a929 to 2b218ae Compare October 7, 2026 08:15
Update tsconfig jq transformation in `ng_config` to read each project's `root` from `angular.json` rather than assuming a `projects/<project>` folder structure.
@alan-agius4
alan-agius4 force-pushed the architect-lib-builder branch from bb57c6a to 6996dad Compare October 7, 2026 15:35

@josephperrott josephperrott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@alan-agius4
alan-agius4 merged commit b137f89 into angular:main Oct 7, 2026
17 checks passed
@alan-agius4

Copy link
Copy Markdown
Contributor Author

This PR was merged into the repository. The changes were merged into the following branches:

@alan-agius4
alan-agius4 deleted the architect-lib-builder branch October 7, 2026 16:17
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants