Skip to content

Add test for ngcc #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2018
Merged

Conversation

alxhub
Copy link

@alxhub alxhub commented Jun 19, 2018

This PR implements a Bazel test ngcc_spec.ts which verifies functionality of ngcc.

$ bazel test //packages/compiler-cli/test/ngcc

This commit adds ngcc_spec.ts which sets up a test environment that includes
ngc-compiled versions of @angular/core and @angular/common, and invokes ngcc
against @angular/common. It's a starting point for additional ngcc testing.
@petebacondarwin petebacondarwin merged commit 1c60712 into petebacondarwin:ngcc Jun 19, 2018
@@ -10,6 +10,7 @@ ts_library(
deps = [
"//packages/compiler",
"//packages/compiler-cli",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed these two deps as they are not needed for testing ngcc right now and it makes the compilation more compilicated[sic]!

srcs = glob([
"*.ts",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary? Doesn't **/*.ts match top-level files as well?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. Perhaps it ensures that the top level source files are included first?

@@ -18,7 +19,8 @@ jasmine_node_test(
name = "ngcc",
bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"],
data = [
"//packages/compiler-cli/test/ngcc/fake_core:npm_package",
"//packages/core:npm_package",
"//packages/common:npm_package",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alxhub - including these dependencies makes the incremental much slower as they appear to be somewhat rebuilt every time... in particular the Angular Compiler seems to be running on them every build. This means that ~800 targets are built rather than ~13.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

screen shot 2018-06-19 at 14 54 37

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

screen shot 2018-06-19 at 14 55 56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants