Skip to content

Initial steps for rules_js support #2576

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 4 commits into from
Feb 13, 2025
Merged

Conversation

devversion
Copy link
Member

See individual commits

This allows e.g. the CLI repository to directly fetch the dev-infra
repository and leverage it for e.g. the RBE toolchains, browser
toolchain, or git toolchain.

More to follow.
@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Feb 6, 2025
@devversion devversion force-pushed the rjs-prep branch 2 times, most recently from a7ec367 to aa36167 Compare February 6, 2025 22:01
@devversion devversion closed this Feb 6, 2025
@devversion devversion reopened this Feb 6, 2025
@devversion devversion force-pushed the rjs-prep branch 2 times, most recently from 98b97b1 to 81d69eb Compare February 6, 2025 23:38
This allows for the dev-infra repository to be conveniently used in e.g.
the angular-cli repository, allowing for rules to be consumed like we
are testing and building them inside this workspace.

This greatly simplfies developer productivity for dev-infra and also
allows us to avoid complexity around shipping, or bundling. Consider
examples like API extractor which cannot be bundled due to reliance on
assets inside the `node_modules` directory.
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-prep branch 2 times, most recently from bdbcf1c to ba318f8 Compare February 11, 2025 13:45
Simplifies the api-golden rule by removing the single file mode, and
using synthethic npm packages here.

In addition, this commit makes the rule compatible with `rules_js`, by
providing another `_rjs.bzl` file, that will eventually take over the
legacy exports that currently call into the `rjs` variant! (so in
practice this rule is alrady using rjs and can work with `rules_nodejs`
as an interop layer)
@devversion devversion force-pushed the rjs-prep branch 2 times, most recently from 467ca01 to d9133eb Compare February 13, 2025 11:59
NOTE: This does not mean we are no longer supporting contributing to
Angular on a Windows machine. Instead, we are working towards having a
more stable and guaranteed developer experience on Windows! We will
still ensure and verify that the Angular CLI (`ng`) works on Windows!

---

Many contributors and team members are using Linux or MacOS for
development of Angular. Our tooling regularly faces challenges with
infrastructure needing extra work and tricks just to function to some
extent on Windows. E.g. shell scripts or Bazel actions that need extra
layers for batch files that spawn a Bash shell etc, or inconsistent
escaping across shells. This is putting extra stress on our
infrastructure team, results in in unnecessary complexity and slows down
overall development that way.

There is a simple and well-proven solution for supporting Windows
development. Using WSL2, developes have access to a Bash shell that is
equivalent to Linux; which we use on a day to day basis and can
guarantee that development works smoothly! This means, we'd be able to
offer far better stability and guarantees to our Windows contributors.

Historically, we also haven't seen a lot of Angular contributors use
Windows; and if they did; they already used WSL for development. At this
point we don't have any non-WSL contributors anymore (in the team or
known), so we don't know anything about how well development works via
e.g. Git Bash on Windows.

Testing on CI via Windows WSL is not necessary as the WSL shell is
expected to be the same as the Linux bash environment. We'll be able to
revisit this if we have new learnings. There are ways to execute builds
etc. via WSL on CI.
@devversion devversion merged commit 74aabba into angular:main Feb 13, 2025
8 of 9 checks passed
@devversion devversion deleted the rjs-prep branch February 13, 2025 12:20
@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 Mar 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: build & ci Related the build and CI infrastructure of the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants