Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upfix(bazel): ng_module should not emit shim files under bazel and Ivy #33765
Conversation
This comment has been minimized.
This comment has been minimized.
mary-poppins
commented
Nov 12, 2019
|
You can preview 9076688 at https://pr33765-9076688.ngbuilds.io/. |
9076688
to
bf643e9
This comment has been minimized.
This comment has been minimized.
mary-poppins
commented
Nov 15, 2019
|
You can preview bf643e9 at https://pr33765-bf643e9.ngbuilds.io/. |
bf643e9
to
77c238a
This comment has been minimized.
This comment has been minimized.
mary-poppins
commented
Nov 15, 2019
|
You can preview 77c238a at https://pr33765-77c238a.ngbuilds.io/. |
77c238a
to
48f1ed8
This comment has been minimized.
This comment has been minimized.
mary-poppins
commented
Nov 15, 2019
|
You can preview 48f1ed8 at https://pr33765-48f1ed8.ngbuilds.io/. |
48f1ed8
to
bfad240
This comment has been minimized.
This comment has been minimized.
mary-poppins
commented
Nov 15, 2019
|
You can preview bfad240 at https://pr33765-bfad240.ngbuilds.io/. |
c13d065
to
816f7c8
This comment has been minimized.
This comment has been minimized.
mary-poppins
commented
Nov 15, 2019
|
You can preview 816f7c8 at https://pr33765-816f7c8.ngbuilds.io/. |
407832f
to
45213c7
This comment has been minimized.
This comment has been minimized.
mary-poppins
commented
Nov 16, 2019
|
You can preview 16d3f04 at https://pr33765-16d3f04.ngbuilds.io/. |
16d3f04
to
bed7d6c
This comment has been minimized.
This comment has been minimized.
mary-poppins
commented
Nov 16, 2019
|
You can preview bed7d6c at https://pr33765-bed7d6c.ngbuilds.io/. |
bed7d6c
to
2c8dc08
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
mary-poppins
commented
Nov 16, 2019
|
You can preview 2c8dc08 at https://pr33765-2c8dc08.ngbuilds.io/. |
This comment has been minimized.
This comment has been minimized.
|
merge-assistance: this PR might require the ivy flip cl/270340880 to be rebased |
|
LGTM |
| # (the shims used to be on by default) | ||
| # we can remove this check once angular/components and angular/angular-cli repos no longer depend | ||
| # on the presence of shims, or if they explicitly opt-in to their generation via ng_modules' generate_ve_shims attr | ||
| return _is_bazel() and not _enable_ivy_value(ctx) or ((hasattr(ctx.attr, "generate_ve_shims") and ctx.attr.generate_ve_shims == True) or ctx.workspace_name != "angular") |
This comment has been minimized.
This comment has been minimized.
alexeagle
Nov 18, 2019
Contributor
nit: use getter which takes default getattr(ctx.attr, "generate_ve_shims", False)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
IgorMinar
Nov 20, 2019
Author
Member
it is. I refactored the ng_modules.bzl to use it where appropriate.
2c8dc08
to
d0e1a4a
This comment has been minimized.
This comment has been minimized.
mary-poppins
commented
Nov 20, 2019
|
You can preview d0e1a4a at https://pr33765-d0e1a4a.ngbuilds.io/. |
This comment has been minimized.
This comment has been minimized.
|
g3 does seem to pass |
the node_modules contains rxjs which contains invalid bazel files which break bazel query executed on //...
Under bazel and Ivy we don't need the shim files to be emmited by default. We still need to the shims for blaze however because google3 code imports them. This improves build latency by 1-2 seconds per ng_module target.
getattr improves code readability and makes the code also shorter.
d0e1a4a
to
ba59c82
This comment has been minimized.
This comment has been minimized.
mary-poppins
commented
Nov 22, 2019
|
You can preview ba59c82 at https://pr33765-ba59c82.ngbuilds.io/. |
This comment has been minimized.
This comment has been minimized.
|
merge-assistance: g3 failures are unrelated |
This comment has been minimized.
This comment has been minimized.
|
I kicked off one more presubmit just to be sure: https://test.corp.google.com/ui#id=OCL:280796455:BASE:282004415:1574449954648:5eb13dcc change has no impact on ivy in g3 |
This comment has been minimized.
This comment has been minimized.
|
merge-assistance: global approval |


IgorMinar commentedNov 12, 2019
Under bazel and Ivy we don't need the shim files to be emmited by default.
We still need to the shims for blaze however because google3 code imports them.