Update to Angular 7.0.1 http_archive & @angular/bazel package #13831
Conversation
@alexeagle Discussing with @devversion if this repo should use the @angular/bazel npm package just override the compiler attribute in ng_module. Thoughts? |
My point is that we want to build Angular Material completely from source. Since we include the With this change, we would need to keep the So, practically - I don't see any benefit of using the If we go through NPM, we could also just build Material from the Bazel managed deps ( |
http_archive( | ||
name = "build_bazel_rules_nodejs", |
devversion
Oct 26, 2018
•
Member
I've proposed deleting the rules_nodejs
and rules_typescript
transitive dependencies here as well (at some point), but since we use them explicitly and not only transitively as part of the ng_module
rule, @jelbourn and I agreed that we should keep them here.
jelbourn
Oct 26, 2018
Member
Yes- we use these rules directly and should not depend on transitive deps.
gregmagolan
Oct 26, 2018
Author
Contributor
These are installed via rules_angular_dependencies()
which will install the correct versions needed to build with ng_module. The same thing is done in the angular/angular WORKSPACE file. The versions loaded can be overridden explicitly by loading a specific version of either or both before rules_angular_dependencies()
but will be easier to maintain by using the versions installed by rules_angular_dependencies()
unless you need a particular fix or feature from either before it is updated in angular/angular.
The original impetus to build Angular from source was that it was thought that it would workaround angular/angular#25644. It turns out that it has no effect either way. Without having that motivation, I think we should consume Angular the same way that other projects are meant to, whatever the recommendation is. |
@jelbourn That's reasonable. I think it's fine moving away from Nevertheless it was just easier to maintain the whole Bazel setup, if we could pull specific commits that haven't been released yet (e.g. how we used the |
We'll still be using @angular//packages either way for now until Ivy is released and we can get away from the angular http_archive entirely. |
@gregmagolan Do you have a small explanation why we would need to wait for Ivy before switching to |
LGTM. If you can re-add the archives for the NodeJS and TypeScript rules. |
There a few issues that are blocking us from using @angular npm packages (minus the @angular/bazel package which is bazel specific) with bazel right now. angular/angular#25644 |
That's not necessary IMO. You'll get the correct versions of both transitively via |
I actually wanted to go with the same approach, but Jeremy and Alex convinced me that we should rather explicitly specify these dependencies. See the conversation here |
Sounds good. I'll add in the explicit deps again. As mentioned in the discussion here (#13408 (comment)), |
@@ -5,42 +5,20 @@ http_archive( | |||
name = "build_bazel_rules_nodejs", | |||
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.15.3.zip", | |||
strip_prefix = "rules_nodejs-0.15.3", | |||
sha256 = "05afbbc13b0b7d5056e412d66c98853978bd46a94bc8e7b71c7fba4349b77eef", |
gregmagolan
Oct 26, 2018
Author
Contributor
Note: not recommended to use sha256 with github.com archives since the zip files is generated on the fly by github and the sha256 may change in the future
strip_prefix = "rules_typescript-0.20.3", | ||
sha256 = "2a03b23c30c5109ab0863cfa60acce73ceb56337d41efc2dd67f8455a1c1d5f3", | ||
url = "https://github.com/bazelbuild/rules_typescript/archive/8ea1a55cf5cf8be84ddfeefc0940769b80da792f.zip", | ||
strip_prefix = "rules_typescript-8ea1a55cf5cf8be84ddfeefc0940769b80da792f", |
gregmagolan
Oct 26, 2018
Author
Contributor
Update this version to support --nolegacy_external_runfiles
var_1: &docker_image angular/ngcontainer:0.6.0 | ||
var_2: &cache_key v2-ng-mat-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.6.0 | ||
var_1: &docker_image angular/ngcontainer:0.7.0 | ||
var_2: &cache_key v2-ng-mat-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.7.0 |
LGTM |
…ngular#13831) * Update to Angular & @angular/bazel 7.0.1 * Remove sha256 from io_bazel_rules_sass http_archive
…13831) * Update to Angular & @angular/bazel 7.0.1 * Remove sha256 from io_bazel_rules_sass http_archive
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Updates to idiomatic install of @angular/bazel package v7.0.1 which should match the version of the angular http_archive() in WORKSPACE. Also removes the compiler override in ng_module. Not necessary when @angular/bazel is installed from npm.
Some cleanup as well: