Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit 022479f

Browse files
authored
Update to Angular 7 and idiomatic install of @angular/bazel (#226)
* Update to angular 7 and idiomatic install of @angular/bazel * Update to Bazel 0.18.0 & rules_sass 0.14.1 * Fix deps and add comment about @angular/bazel/protractor-utils
1 parent 09eab9c commit 022479f

File tree

6 files changed

+721
-46
lines changed

6 files changed

+721
-46
lines changed

.circleci/bazel.rc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ build --experimental_repository_cache=/home/circleci/bazel_repository_cache
2323

2424
# Workaround https://github.com/bazelbuild/bazel/issues/3645
2525
# Bazel doesn't calculate the memory ceiling correctly when running under Docker.
26-
# Limit Bazel to consuming 2560K of RAM
27-
build --local_resources=2560,1.0,1.0
26+
# Limit Bazel to consuming 2048K of RAM
27+
build --local_resources=2048,1.0,1.0
2828
# Also limit Bazel's own JVM heap to stay within our 4G container limit
29-
startup --host_jvm_args=-Xmx1g
29+
startup --host_jvm_args=-Xmx1280m
3030

3131
# Use fixed chunk names for code-split bundles in CI
3232
# so that GitHub buildsize bot reports are accurate

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# We use a docker image as the basis for our build, so that all the toolchains we use
55
# are already installed and the build can start running right away. It also guarantees
66
# the environment is portable and reproducible on your local machine.
7-
var_1: &docker_image angular/ngcontainer:0.6.0
7+
var_1: &docker_image angular/ngcontainer:0.7.0
88

99
# CircleCI lets us pick the key for storing one or more caches, to speed up subsequent builds.
1010
# We can use this to avoid re-fetching our dependencies from npm on every build.
@@ -13,7 +13,7 @@ var_1: &docker_image angular/ngcontainer:0.6.0
1313
# - the branch we are on, which really shouldn't be needed since the yarn lock file should be hermetic
1414
# - the docker image tag, working around an issue we saw where changing docker images causes permission
1515
# errors when restoring the cache, like when the user we run as changes
16-
var_2: &cache_key angular-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.6.0
16+
var_2: &cache_key angular-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.7.0
1717

1818
# Each job will inherit these defaults
1919
anchor_1: &job_defaults

WORKSPACE

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ http_archive(
2121
)
2222

2323
# The @angular repo contains rule for building Angular applications
24+
# TODO(gmagolan): Update to next 7.0.x tag when it is released
2425
http_archive(
2526
name = "angular",
26-
url = "https://github.com/angular/angular/archive/08e4489cf5a93a352954f1639da5e92112993753.zip",
27-
strip_prefix = "angular-08e4489cf5a93a352954f1639da5e92112993753",
27+
url = "https://github.com/angular/angular/archive/bfeceb3d3e636d755c2bd7bdd85b7136da066c78.zip",
28+
strip_prefix = "angular-bfeceb3d3e636d755c2bd7bdd85b7136da066c78",
2829
)
2930

3031
# The @rxjs repo contains targets for building rxjs with bazel
@@ -35,6 +36,13 @@ http_archive(
3536
sha256 = "72b0b4e517f43358f554c125e40e39f67688cd2738a8998b4a266981ed32f403",
3637
)
3738

39+
# Rules for compiling sass
40+
http_archive(
41+
name = "io_bazel_rules_sass",
42+
url = "https://github.com/bazelbuild/rules_sass/archive/1.14.1.zip",
43+
strip_prefix = "rules_sass-1.14.1",
44+
)
45+
3846
# This local_repository rule is needed to prevent `bazel build ...` from
3947
# drilling down into the @rxjs workspace BUILD files in node_modules/rxjs/src.
4048
# In the future this will no longer be needed.

e2e/BUILD.bazel

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ ts_library(
1313
],
1414
)
1515

16+
# The @npm//@angular/bazel npm dependency provides
17+
# the @angular/bazel/protractor-utils
1618
protractor_web_test_suite(
1719
name = "prodserver_test",
1820
data = [
19-
"@angular//packages/bazel/src/protractor/utils",
21+
"@npm//@angular/bazel",
2022
"@npm//protractor",
2123
"@npm//zone.js",
2224
],
@@ -25,10 +27,12 @@ protractor_web_test_suite(
2527
deps = [":e2e"],
2628
)
2729

30+
# The @npm//@angular/bazel npm dependency provides
31+
# the @angular/bazel/protractor-utils
2832
protractor_web_test_suite(
2933
name = "devserver_test",
3034
data = [
31-
"@angular//packages/bazel/src/protractor/utils",
35+
"@npm//@angular/bazel",
3236
"@npm//protractor",
3337
"@npm//zone.js",
3438
],

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111
"zone.js": "0.8.26"
1212
},
1313
"devDependencies": {
14-
"@angular/compiler": "github:angular/compiler-builds#bazel",
15-
"@angular/compiler-cli": "github:angular/compiler-cli-builds#bazel",
16-
"@angular/core": "github:angular/core-builds#bazel",
14+
"@angular/bazel": "github:angular/bazel-builds#7.0.x",
15+
"@angular/compiler": "github:angular/compiler-builds#7.0.x",
16+
"@angular/compiler-cli": "github:angular/compiler-cli-builds#7.0.x",
17+
"@angular/core": "github:angular/core-builds#7.0.x",
1718
"@bazel/benchmark-runner": "0.1.0",
1819
"@bazel/ibazel": "0.5.0",
19-
"@bazel/karma": "0.20.2",
20-
"@bazel/typescript": "0.20.2",
20+
"@bazel/karma": "0.20.3",
21+
"@bazel/typescript": "0.20.3",
2122
"@types/jasmine": "2.8.8",
2223
"@types/node": "6.0.117",
2324
"clang-format": "1.2.4",

0 commit comments

Comments
 (0)