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

Update to Angular 7 and idiomatic install of @angular/bazel #226

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/bazel.rc
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ build --experimental_repository_cache=/home/circleci/bazel_repository_cache

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

# Use fixed chunk names for code-split bundles in CI
# so that GitHub buildsize bot reports are accurate
Expand Down
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# We use a docker image as the basis for our build, so that all the toolchains we use
# are already installed and the build can start running right away. It also guarantees
# the environment is portable and reproducible on your local machine.
var_1: &docker_image angular/ngcontainer:0.6.0
var_1: &docker_image angular/ngcontainer:0.7.0

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

# Each job will inherit these defaults
anchor_1: &job_defaults
Expand Down
12 changes: 10 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ http_archive(
)

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

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

# Rules for compiling sass
http_archive(
name = "io_bazel_rules_sass",
url = "https://github.com/bazelbuild/rules_sass/archive/1.14.1.zip",
strip_prefix = "rules_sass-1.14.1",
)

# This local_repository rule is needed to prevent `bazel build ...` from
# drilling down into the @rxjs workspace BUILD files in node_modules/rxjs/src.
# In the future this will no longer be needed.
Expand Down
8 changes: 6 additions & 2 deletions e2e/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ ts_library(
],
)

# The @npm//@angular/bazel npm dependency provides
# the @angular/bazel/protractor-utils
protractor_web_test_suite(
name = "prodserver_test",
data = [
"@angular//packages/bazel/src/protractor/utils",
"@npm//@angular/bazel",
"@npm//protractor",
"@npm//zone.js",
],
Expand All @@ -25,10 +27,12 @@ protractor_web_test_suite(
deps = [":e2e"],
)

# The @npm//@angular/bazel npm dependency provides
# the @angular/bazel/protractor-utils
protractor_web_test_suite(
name = "devserver_test",
data = [
"@angular//packages/bazel/src/protractor/utils",
"@npm//@angular/bazel",
"@npm//protractor",
"@npm//zone.js",
],
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
"zone.js": "0.8.26"
},
"devDependencies": {
"@angular/compiler": "github:angular/compiler-builds#bazel",
"@angular/compiler-cli": "github:angular/compiler-cli-builds#bazel",
"@angular/core": "github:angular/core-builds#bazel",
"@angular/bazel": "github:angular/bazel-builds#7.0.x",
"@angular/compiler": "github:angular/compiler-builds#7.0.x",
"@angular/compiler-cli": "github:angular/compiler-cli-builds#7.0.x",
"@angular/core": "github:angular/core-builds#7.0.x",
"@bazel/benchmark-runner": "0.1.0",
"@bazel/ibazel": "0.5.0",
"@bazel/karma": "0.20.2",
"@bazel/typescript": "0.20.2",
"@bazel/karma": "0.20.3",
"@bazel/typescript": "0.20.3",
"@types/jasmine": "2.8.8",
"@types/node": "6.0.117",
"clang-format": "1.2.4",
Expand Down
Loading