Skip to content

Commit 3cc0910

Browse files
josephperrottthePunderWoman
authored andcommitted
build: update compiler-cli to not be stamped when used for the compiler in ng_project (#61535)
The compiler-cli package needs to be unstamped and will the resulting generated code will be stamped as expected. PR Close #61535
1 parent f6b4602 commit 3cc0910

File tree

3 files changed

+22
-17
lines changed

3 files changed

+22
-17
lines changed

packages/compiler-cli/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,14 @@ pkg_npm(
148148
# Long-term, `pkg_npm` will be migrated to `npm_package` in general.
149149
npm_package(
150150
name = "pkg",
151-
srcs = [":npm_package_nosub"],
151+
srcs = [":npm_package"],
152152
data = [
153153
# Needed because compiler is a dev dependency (to satisfy the peer dependency)
154154
# and `rules_js` only makes transitive production dependencies available.
155155
":node_modules/@angular/compiler",
156156
],
157157
replace_prefixes = {
158-
"npm_package_nosub/": "",
158+
"npm_package/": "",
159159
},
160160
)
161161

packages/compiler/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ ng_package(
4848
# Long-term, `pkg_npm` will be migrated to `npm_package` in general.
4949
npm_package(
5050
name = "pkg",
51-
srcs = [":npm_package"],
51+
srcs = [":npm_package_nosub"],
5252
replace_prefixes = {
53-
"npm_package/": "",
53+
"npm_package_nosub/": "",
5454
},
5555
)
5656

tools/defaults.bzl

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ def ng_package(name, readme_md = None, license_banner = None, license = None, de
174174
if not license:
175175
license = "//:LICENSE"
176176
visibility = kwargs.pop("visibility", None)
177+
tags = kwargs.pop("tags", [])
177178

178179
common_substitutions = dict(kwargs.pop("substitutions", {}), **PKG_GROUP_REPLACEMENTS)
179180
substitutions = dict(common_substitutions, **{
@@ -198,6 +199,23 @@ def ng_package(name, readme_md = None, license_banner = None, license = None, de
198199
rollup_config_tmpl = _INTERNAL_NG_PACKAGE_DEFAULT_ROLLUP_CONFIG_TMPL,
199200
rollup = _INTERNAL_NG_PACKAGE_DEFAULT_ROLLUP,
200201
visibility = visibility,
202+
tags = tags,
203+
**kwargs
204+
)
205+
206+
_ng_package(
207+
name = "%s_nosub" % name,
208+
deps = deps,
209+
validate = True,
210+
readme_md = readme_md,
211+
license = license,
212+
license_banner = license_banner,
213+
substitutions = common_substitutions,
214+
ng_packager = _INTERNAL_NG_PACKAGE_PACKAGER,
215+
rollup_config_tmpl = _INTERNAL_NG_PACKAGE_DEFAULT_ROLLUP_CONFIG_TMPL,
216+
rollup = _INTERNAL_NG_PACKAGE_DEFAULT_ROLLUP,
217+
visibility = visibility,
218+
tags = ["manual"],
201219
**kwargs
202220
)
203221

@@ -214,7 +232,6 @@ def ng_package(name, readme_md = None, license_banner = None, license = None, de
214232
def pkg_npm(name, deps = [], validate = True, **kwargs):
215233
"""Default values for pkg_npm"""
216234
visibility = kwargs.pop("visibility", None)
217-
tags = kwargs.pop("tags", [])
218235

219236
common_substitutions = dict(kwargs.pop("substitutions", {}), **PKG_GROUP_REPLACEMENTS)
220237
substitutions = dict(common_substitutions, **{
@@ -248,18 +265,6 @@ def pkg_npm(name, deps = [], validate = True, **kwargs):
248265
}),
249266
deps = [":%s_js_module_output" % name],
250267
visibility = visibility,
251-
tags = tags,
252-
**kwargs
253-
)
254-
255-
_pkg_npm(
256-
name = "%s_nosub" % name,
257-
validate = validate,
258-
substitutions = common_substitutions,
259-
deps = [":%s_js_module_output" % name],
260-
visibility = visibility,
261-
# should not be built unless it is a dependency of another rule
262-
tags = ["manual"],
263268
**kwargs
264269
)
265270

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy