Commit graph

31 commits

Author SHA1 Message Date
Alan Agius
adda6c5c10 build: update aspect_rules_js to 3.0.2
This updates the major version of `aspect_rules_js`.
2026-03-11 13:35:26 -07:00
Joey Perrott
aa92f19307 build: update to bazel version 8.4.2
Update bazel to use version 8.4.2
2025-12-08 10:21:59 -08:00
Joey Perrott
2fcafb65c5 build: rename defaults2.bzl to defaults.bzl (#63383)
Use defaults.bzl for the common macros

PR Close #63383
2025-08-25 15:45:01 -07:00
Joey Perrott
cbc258eec8 build: remove ts_project_interop infrastructure (#62908)
Remove the interop macros and final usages

PR Close #62908
2025-07-31 09:12:58 +00:00
Joey Perrott
32c00ab416 build: standardize usage of js_binary (#62860)
Remove usages of nodejs_binary and use a commonly defined js_binary macro

PR Close #62860
2025-07-29 06:43:44 +02:00
Paul Gschwendtner
93c74ef492 build: migrate partial compliance tests to rules_js (#61865)
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
2025-06-05 12:04:51 +02:00
Paul Gschwendtner
b7c5645f05 build: migrate packages/compiler-cli to ts_project (#61826)
This commit migrates the remaining pieces of `compiler-cli` to
`ts_project`. This involves a few more things during migration:

- the `ng_module` ngc_wrapped rule broke as part of this change, so we
  switched it to `ts_project` too. This logic is soon gone anyway.

- we needed an extra pnpm "package.json" for the linker babel test. This test is
  loading from the real compiler-cli npm package. Babel needs a real
  node module for this, so this solution seems reasonable. It may be
  worth exploring in the future to move this test into an integration
  test though.

- the older integrationtest in compiler-cli is removed as the coverage
  is much better with the compliance test suite and this test.

PR Close #61826
2025-06-03 11:41:52 +02:00
Paul Gschwendtner
d02165d639 build: remove unused debugging leftover from RBE investigation (#61181)
This log output doesn't provide any benefit anymore, so we can remove
it.

PR Close #61181
2025-05-09 15:59:46 +00:00
Paul Gschwendtner
54e785683a build: prepare for compiler-cli to be using ts_project (#61181)
Prepare the compiler-cli package for being ready for migration
to `ts_project`.

PR Close #61181
2025-05-09 15:59:46 +00:00
Paul Gschwendtner
164bb3f4a3 build: disable RBE for compliance partial goldens (#60473)
We've seen these tests regularly, but somewhat rarely to be
stuck/hanging in the remote execution workers. Since the issue was
reproducable locally (via local RBE environment), we can improve
stability for the team until we resolve this with the RBE team.

PR Close #60473
2025-03-20 07:40:22 +00:00
Paul Gschwendtner
2ca72faab1 build: improve partial compliance golden generation and add debug logging (#60427)
Improves the partial compliance golden generation to not rely on large
files being transmitted via `stdout`. Instead the files are written
directly as it's done in idiomatic Bazel generation actions.

In addition, we add extra stdout logging for the Bazel action, to see if
the process is actually invoked in RBE workers. Right now those are
occassionally stuck, but neither us, nor the RBE team can see anything
running, and they're occasionally stuck for 1hr.

PR Close #60427
2025-03-18 07:10:43 +00:00
Charles Lyding
d9dc41a18c test(compiler-cli): add compliance tests for external runtime styles (#57613)
To ensure that the external runtime style component feature is correctly
emitted by the Angular compiler, compliance tests have been added for
file-based component styles. Additionally, the partial golden generator
has been updated to work with file-based component styles.

PR Close #57613
2024-10-07 08:20:22 -07:00
Joey Perrott
9dbe6fc18b refactor: update license text to point to angular.dev (#57901)
Update license text to point to angular.dev instead of angular.io

PR Close #57901
2024-09-24 15:33:00 +02:00
Paul Gschwendtner
0a77825042 build: improve incremental rebuilds of compliance tests (#55594)
Currently whenever a compliance test case TS file is modified, all
compliance tests in repository are rebuilt in partial compilation mode.
This is inefficient and also slows down local development where one may
use a wildcard to run all test targets inside `/test/compliance/...`.

This commit fixes this.

PR Close #55594
2024-04-30 09:22:38 -07:00
Joey Perrott
0d78a92431 refactor: migrate compiler-cli to prettier formatting (#55485)
Migrate formatting to prettier for compiler-cli from clang-format

PR Close #55485
2024-04-29 10:25:43 -07:00
Paul Gschwendtner
2564b45b47 test: replace fake_core with real @angular/core output (#54650)
This commit replaces `fake_core` with the real `@angular/core`
output. See previous commit for reasons.

Overall, this commit:

* Replaces references of `fake_core`
* Fixes tests that were testing Angular compiler detection that _would_
  already be flagged by type-checking of TS directly. We keep these
  tests for now, and add `@ts-ignore` to verify the Angular checks, in
  case type checking is disabled in user applications- but it's worth
  considering to remove these tests. Follow-up question/non-priority.
* Adds `@ts-ignore` to the tests for `defer` 1P because the property is
  marked as `@internal` and now is (correctly) causing failures in the
  compiler test environment.
* Fixes a couple of tests with typos, wrong properties etc that
  previously weren't detected! A good sign.

PR Close #54650
2024-03-06 12:34:38 +01:00
Paul Gschwendtner
6fcfe2b0ce build: fix partial output generation errors swallowed (#53808)
In some cases, the input files for a partial output generation
compliance tests may be invalid and lead to compilation errors.

The golden partial would be silently generated with the remaining
test cases. Instead of hiding errors, we will now print these and
cause the script to fail properly.

Note that the error logging is pretty minimalistic, but it's sufficient.

PR Close #53808
2024-01-10 12:21:04 +00:00
Paul Gschwendtner
90c2088679 build: make devmode a noop and ensure it never runs (#48521)
This is basically a pre-step for combining devmode and prodmode into a
single compilation. We are already achieving this now, and can claim
with confidence that we reduced possible actions by half. This is
especially important now that prodmode is used more often, but rules
potentially still using the devmode ESM sources. We can avoid double
compilations (which existed before the whole ESM migration too!).

We will measure this more when we have more concrete documentation
of the changes & a better planning document.

Changes:

  * ts_library will no longer generate devmode `d.ts`. Definitions are
    generated as part of prodmode. That way only prodmode can be exposed
    via providers.
  * applied the same to `ng_module`.
  * updates migrations to bundle because *everything* using `ts_library`
    is now ESM. This is actually also useful in the future if
    schematics rely on e.g. the compiler.
  * updates schematics for localize to also bundle. similar reason as
    above.

PR Close #48521
2022-12-19 19:50:45 +00:00
Paul Gschwendtner
13d3039c7d refactor: convert AIO tooling scripts used in Bazel to ESM (#48521)
Since the Bazel setup in this repo will now always use ESM,
the tooling scripts/binaries in AIO need to be switched to ESM
too. Most of the scripts are already ESM, but a few had to be converted.

Note that the Dgeni generation does not use ESM because it's unaffected
and the Dgeni CLI is used. In the future we could also update the Dgeni
setup to ESM but there is no need currently.

PR Close #48521
2022-12-19 19:50:44 +00:00
Paul Gschwendtner
decae5b8e9 refactor: update compiler-cli to work with ESM (#48521)
Updates compiler-cli & tests to be full ESM compatible. Tests
no longer with CommonJS.

PR Close #48521
2022-12-19 19:50:43 +00:00
Paul Gschwendtner
95555658cf build: disable bazel nodejs linker to improve stability on windows (#45872)
The NodeJS Bazel linker does not work well on Windows because there
is no sandboxing and linker processes from different tests will attempt
to modify the same `node_modules`, causing concurrency race conditions
and resulting in flakiness.

PR Close #45872
2022-05-04 16:20:57 -07:00
Paul Gschwendtner
78eace6547 build: shorten partial compilation test case target names for windows (#45431)
Shortens the partial compilation test case target names as the paths/
manifest paths in Bazel became too large, exceeding some Windows path
length limits.

Relevant context/resources:
* https://angular-team.slack.com/archives/C02PARQNMC1/p1648137933069659 (internal)
* https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd
* https://github.com/bazelbuild/rules_nodejs/pull/3215/files#r782271592

PR Close #45431
2022-03-25 12:18:34 -07:00
Paul Gschwendtner
9e3e970dbf test: refactor compiler-cli compliance test to work on windows (#45431)
Recent changes in `rules_nodejs` caused the test case copy file actions
to be transitioned into the `exec` configuration, resulting in much larger
file paths. These paths break on Windows with the shell argument limit, and
with the path limit, causing errors like:

```
ERROR: C:/users/circleci/ng/packages/compiler-cli/test/compliance/test_cases/BUILD.bazel:9:12: Copying file packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/value_composition/structural_directives_if_directive_def.js failed: (Exit 1): cmd.exe failed: error executing command
  cd /d C:/users/circleci/_bazel_circleci/u4uoan2j/execroot/angular
  SET PATH=C:\Program Files\Git\usr\bin;C:\Program Files\Git\bin;C:\Windows;C:\Windows\System32;C:\Windows\System32\WindowsPowerShell\v1.0
    SET RUNFILES_MANIFEST_ONLY=1
  cmd.exe /C bazel-out\x64_windows-opt-exec-2B5CBBC6\bin\packages\compiler-cli\test\compliance\test_cases\test_cases--1973427149-cmd.bat
The system cannot find the path specified
```

https://app.circleci.com/pipelines/github/angular/angular/44038/workflows/4b530cb2-f232-4e1d-b35a-e6e085151d08/jobs/1140017

PR Close #45431
2022-03-25 12:18:34 -07:00
Joey Perrott
aef63e7ae5 build: remove "ivy-only" bazel tag (#43862)
Because all actions are assumed to be running on Ivy, things which only work on Ivy should not be marked as
Ivy only.

PR Close #43862
2021-10-19 10:06:55 -07:00
Paul Gschwendtner
762e057e85 build: update to rules_nodejs v4.0.0-beta.0 (#42760)
Updates the Bazel NodeJS rules to v4.0.0-beta.0. This is necessary
so that the Angular components repo can update, and it's generally
good to stay as up-to-date as possible with the Bazel rules as it's
easy to fall behind, and updating early allows us to discover issues
affecting our tooling earlier (where they are easier to address due to
e.g. potential breaking change policy).

PR Close #42760
2021-07-09 14:50:15 -07:00
Pete Bacon Darwin
e16d234709 ci: enable compliance tests on Windows (#41556)
Now that we have updated the Bazel node.js rules we can run all the
compliance tests in Windows on CI.

PR Close #41556
2021-04-12 10:08:41 -07:00
Joey Perrott
b8b8535f40 build: update tools directory for latest changes in rules_nodejs (#40710)
Update the scripts/tooling in the tools directory to handle the changes in the latest
version of rules_nodejs.

PR Close #40710
2021-02-09 10:48:43 -08:00
Pete Bacon Darwin
2786292780 test(compiler-cli): migrate i18n compliance tests (#39661)
This commit provides the machinery for the new file-based compliance test
approach for i18n tests, and migrates the i18n tests to this new format.

PR Close #39661
2020-11-25 11:08:39 -08:00
Pete Bacon Darwin
63dcfb2913 test(compiler-cli): update new compliance test partial rules (#39661)
There is now a dedicated rule for debugging generation of partial
golden files. The README has been updated accordingly.

PR Close #39661
2020-11-25 11:08:39 -08:00
Alex Rickabaugh
3613e7c4e5 test(compiler-cli): move testing utils to separate package (#39594)
ngtsc has a robust suite of testing utilities, designed for in-memory
testing of a TypeScript compiler. Previously these utilities lived in the
`test` directory for the compiler-cli package.

This commit moves those utilities to an `ngtsc/testing` package, enabling
them to be depended on separately and opening the door for using them from
the upcoming language server testing infrastructure.

As part of this refactoring, the `fake_core` package (a lightweight API
replacement for @angular/core) is expanded to include functionality needed
for Language Service test use cases.

PR Close #39594
2020-11-17 11:59:56 -08:00
Pete Bacon Darwin
10525af67b test(compiler-cli): generate golden files for partial compilation (#39617)
This commit adds a JS script that can generate a partial golden file
for test cases in the compiler compliance tests.

PR Close #39617
2020-11-13 11:25:56 -08:00