Skip to content

Commit 22cbdef

Browse files
committed
Build package on CI
* No longer compile with AOT compiler that generates factory files that cannot be packaged into "ng_package"
1 parent 1c63012 commit 22cbdef

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
- run: sudo cp ./.circleci/bazel.rc /etc/bazel.bazelrc
4949

5050
# TODO(jelbourn): Update this command to run all tests if the Bazel issues have been fixed.
51+
- run: bazel build src/cdk:npm_package
5152
- run: bazel test src/{cdk,lib}/schematics:unit_tests
5253

5354
- save_cache:

WORKSPACE

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,14 @@ http_archive(
4242
sha256 = "a59c85426048cc95f51937d0c26f4d1143b7bef730152b68ac4b79d1438e746b",
4343
)
4444

45-
# Add RxJS from the node modules.
46-
local_repository(
45+
# Add RxJS as repository because those are needed in order to build Angular from source.
46+
# Also we cannot refer to the RxJS version from the node modules because self-managed
47+
# node modules are not guaranteed to be installed.
48+
http_archive(
4749
name = "rxjs",
48-
path = "node_modules/rxjs/src",
50+
url = "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz",
51+
strip_prefix = "package/src",
52+
sha256 = "72b0b4e517f43358f554c125e40e39f67688cd2738a8998b4a266981ed32f403",
4953
)
5054

5155
# NOTE: this rule installs nodejs, npm, and yarn, but does NOT install

tools/bazel.rc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,6 @@ build --workspace_status_command=./tools/bazel-stamp-vars.sh
4747
# running as daemons, and cache SourceFile AST's to reduce parse time.
4848
build --strategy=TypeScriptCompile=worker --strategy=AngularTemplateCompile=worker
4949

50-
# Use the legacy compiler. We don't want to compile using Ivy yet.
51-
build --define=compile=legacy
50+
# Use the new "ngtsc" compiler strategy. We don't want to compile with Ivy nor with the
51+
# legacy compiler that doesn't handle `providedIn` properly.
52+
build --define=compile=local

0 commit comments

Comments
 (0)