Skip to content

Conversation

@crisbeto
Copy link
Member

@crisbeto crisbeto commented May 27, 2024

Currently the default target for the code compiled with ts_library is set through the ts_library exposed in defaults.bzl, however the code under the bazel directory isn't allowed to use defaults.bzl which meant that it was defaulting to es2015.

These changes add a defaults.bzl specific to the bazel directory which allows us to maintain the defaults in a single place.

This came up due to a breakage in angular/angular#56096.

@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label May 27, 2024
@crisbeto crisbeto force-pushed the ts-library-import branch 3 times, most recently from 1b46dab to c662375 Compare May 27, 2024 13:28
Currently the default `target` for the code compiled with `ts_library` is set through the `ts_library` exposed in `defaults.bzl`, however the code under the `bazel` directory isn't allowed to use `defaults.bzl` which meant that it was defaulting to es2015.

These changes add a `defaults.bzl` specific to the `bazel` directory which allows us to maintain the defaults in a single place.

This came up due to a breakage in angular/angular#56096.
@crisbeto crisbeto force-pushed the ts-library-import branch from c662375 to 8757243 Compare May 27, 2024 15:08
@crisbeto crisbeto changed the title build: import ts_library from the correct place build: set es2020 in bazel ts_library usages May 27, 2024
@crisbeto crisbeto marked this pull request as ready for review May 27, 2024 15:17
@@ -0,0 +1,21 @@
load("@npm//@bazel/concatjs:index.bzl", _ts_library = "ts_library")
Copy link
Member Author

Choose a reason for hiding this comment

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

Technically we could've fixed the issue by adding prodmode_target and devmode_target to all the places using ts_library, but I figured that this is a bit more maintainable.

@crisbeto crisbeto added the action: review The PR is still awaiting reviews from at least one requested reviewer label May 27, 2024
@crisbeto crisbeto 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 May 27, 2024
@crisbeto crisbeto removed the request for review from josephperrott May 27, 2024 17:23
@devversion devversion merged commit dd2d49c into angular:main May 27, 2024
crisbeto added a commit to crisbeto/dev-infra that referenced this pull request May 27, 2024
Fixes that the `defaults.bzl` from angular#2084 wasn't included in the npm package.
devversion pushed a commit that referenced this pull request May 27, 2024
Fixes that the `defaults.bzl` from #2084 wasn't included in the npm package.
@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 Jun 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker 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