Skip to content

build: use angular 7.0.0 w/ bazel #13793

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
Oct 24, 2018
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
25 changes: 13 additions & 12 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ workspace(name = "angular_material")
# Add NodeJS rules (explicitly used for sass bundle rules)
http_archive(
name = "build_bazel_rules_nodejs",
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.15.0.zip",
strip_prefix = "rules_nodejs-0.15.0",
sha256 = "5f5b6464ca20aa63d278caaf4736f0381eb838800d7375132057a48f09d0b837",
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.15.3.zip",
strip_prefix = "rules_nodejs-0.15.3",
sha256 = "05afbbc13b0b7d5056e412d66c98853978bd46a94bc8e7b71c7fba4349b77eef",
)

# Add TypeScript rules
http_archive(
name = "build_bazel_rules_typescript",
url = "https://github.com/bazelbuild/rules_typescript/archive/0.20.2.zip",
strip_prefix = "rules_typescript-0.20.2",
sha256 = "2879fbd7168ba5d17db22bc2f585c0d1d3a82dd5e6f8af118e8b2f74d290024e",
url = "https://github.com/bazelbuild/rules_typescript/archive/0.20.3.zip",
strip_prefix = "rules_typescript-0.20.3",
sha256 = "2a03b23c30c5109ab0863cfa60acce73ceb56337d41efc2dd67f8455a1c1d5f3",
)

# Fetch transient dependencies of the TypeScript bazel rules.
Expand All @@ -34,12 +34,13 @@ sass_repositories()
# Add Angular source and Bazel rules.
http_archive(
name = "angular",
# Temporarily locked down to the angular/angular:bazel branch. This branch includes necessary
# commits that make building from source possible.
# TODO(devversion): switch to release archive if workaround can be removed
url = "https://github.com/angular/angular/archive/08e4489cf5a93a352954f1639da5e92112993753.zip",
strip_prefix = "angular-08e4489cf5a93a352954f1639da5e92112993753",
sha256 = "a59c85426048cc95f51937d0c26f4d1143b7bef730152b68ac4b79d1438e746b",
# Locked to commit "07b89902d5178afefeedeb18d316f4a1c77c6025" that has been merged after v7.0.0
# has been released. This explicitly used version of angular/angular includes the latest changes
# to @angular/bazel that have been merged from the `bazel` branch into `master.`
# TODO(devversion): start using release archives once 7.0.1 is available w/ the Bazel changes.
url = "https://github.com/angular/angular/archive/07b89902d5178afefeedeb18d316f4a1c77c6025.zip",
strip_prefix = "angular-07b89902d5178afefeedeb18d316f4a1c77c6025",
sha256 = "6439dcd01afa5ef3456f9f454ba546a385f7fc56bbc8b6e4ec990dbd9773ba8f",
)

# Add RxJS as repository because those are needed in order to build Angular from source.
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
"@angular/platform-server": "^7.0.0",
"@angular/router": "^7.0.0",
"@angular/upgrade": "^7.0.0",
"@bazel/ibazel": "0.3.1",
"@bazel/karma": "0.20.2",
"@bazel/typescript": "0.20.2",
"@bazel/ibazel": "0.6.0",
"@bazel/karma": "0.20.3",
"@bazel/typescript": "0.20.3",
"@firebase/app-types": "^0.3.2",
"@google-cloud/storage": "^1.1.1",
"@octokit/rest": "^15.9.4",
Expand Down
8 changes: 8 additions & 0 deletions tools/defaults.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ load("@build_bazel_rules_typescript//:defs.bzl", _ts_library = "ts_library",
DEFAULT_TSCONFIG_BUILD = "//src:bazel-tsconfig-build.json"
DEFAULT_TSCONFIG_TEST = "//src:bazel-tsconfig-test.json"

# By default, the Angular bazel rules assume that the `@angular/bazel` package has been
# installed through NPM. Therefore it expects ngc-wrapped binaries to be available in the "@npm"
# workspace. Since we build from source, the Bazel rules are not part of the NPM workspace.
_SOURCE_NG_MODULE_COMPILER = "@angular//packages/bazel/src/ngc-wrapped"
_SOURCE_NG_MODULE_XI18N = "@angular//packages/bazel/src/ngc-wrapped:xi18n"

def _getDefaultTsConfig(testonly):
if testonly:
return DEFAULT_TSCONFIG_TEST
Expand Down Expand Up @@ -42,6 +48,8 @@ def ng_module(deps = [], tsconfig = None, testonly = False, **kwargs):
deps = local_deps,
tsconfig = tsconfig,
testonly = testonly,
compiler = _SOURCE_NG_MODULE_COMPILER,
ng_xi18n = _SOURCE_NG_MODULE_XI18N,
**kwargs
)

Expand Down
42 changes: 16 additions & 26 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -240,15 +240,15 @@
lodash "^4.17.10"
to-fast-properties "^2.0.0"

"@bazel/ibazel@0.3.1":
version "0.3.1"
resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.3.1.tgz#5f02f208f138e581bbdb1534d5c013d7a0ac9799"
integrity sha1-XwLyCPE45YG72xU01cAT16Csl5k=
"@bazel/ibazel@0.6.0":
version "0.6.0"
resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.6.0.tgz#b88a6b85e0d7d8adae9aeeba44763044658f1bab"
integrity sha512-6MG/zWWZ98hpZ+MdRS2wdyrX0LWor3Sq4hs0SkhWVSLArzv7Hp4f/NvPs5w4qqBimBFCoRpu42wHl75cqVm/3g==

"@bazel/[email protected].2":
version "0.20.2"
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.20.2.tgz#69b440e320eadce2b4c7de922f87c5fc539b6586"
integrity sha512-WQHPpAuu9jNqZ7J2tYkAJaccC9oQh5IjD0wJDnBq0iLxusLQkxJOPw5TmemHYVEMlkuj5+1w7UN8YeS0YRgAeg==
"@bazel/[email protected].3":
version "0.20.3"
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.20.3.tgz#a63bb82b4887ae8c0d01f3028c6fa4764470851d"
integrity sha512-IgWfTpK9XLEI977DS2kHIEO1QfFTEOBxeNDDjHtd1onmzyMCLROphTOBZ/g42ybUIWyJhS9DK4U3bLSMQE0Bng==
dependencies:
jasmine-core "2.8.0"
karma alexeagle/karma#fa1a84ac881485b5657cb669e9b4e5da77b79f0a
Expand All @@ -261,12 +261,12 @@
requirejs "2.3.5"
tmp "0.0.33"

"@bazel/[email protected].2":
version "0.20.2"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.20.2.tgz#7e31e2fe23458536e4917bf5ee130d55704c54f5"
integrity sha512-S54LqrCT3WpYdYgpOYEgtwdGX2kJfliSNombmmWmR3ZXYdXwU10PYhWR7s4k9eyakknitAt1RxPEvIHEHCucqQ==
"@bazel/[email protected].3":
version "0.20.3"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.20.3.tgz#51dcc369c2af0d7f2311d6e692d07776492060f4"
integrity sha512-BZmfzaNkgS++53CGEUk5p9FXOG+k8FNWCDbxzYljoIGP60aIkw4UgRQ24ReBwhCMg6M6KW609yje7AvDZkA6bg==
dependencies:
protobufjs "5.0.0"
protobufjs "5.0.3"
source-map-support "0.5.9"
tsickle "0.28.0"
tsutils "2.27.2"
Expand Down Expand Up @@ -4746,7 +4746,7 @@ glob@^4.3.1:
minimatch "^2.0.1"
once "^1.3.0"

glob@^5.0.10, glob@^5.0.15:
glob@^5.0.15:
version "5.0.15"
resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=
Expand Down Expand Up @@ -6763,7 +6763,7 @@ karma@^3.0.0:
tmp "0.0.33"
useragent "2.2.1"

karma@alexeagle/karma#fa1a84ac881485b5657cb669e9b4e5da77b79f0a:
"karma@github:alexeagle/karma#fa1a84ac881485b5657cb669e9b4e5da77b79f0a":
version "1.7.1"
resolved "https://codeload.github.com/alexeagle/karma/tar.gz/fa1a84ac881485b5657cb669e9b4e5da77b79f0a"
dependencies:
Expand Down Expand Up @@ -9127,17 +9127,7 @@ [email protected]:
utile "0.3.x"
winston "2.1.x"

[email protected]:
version "5.0.0"
resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.0.tgz#4223063233ea96ac063ca2b554035204db524fa1"
integrity sha1-QiMGMjPqlqwGPKK1VANSBNtST6E=
dependencies:
ascli "~1"
bytebuffer "~5"
glob "^5.0.10"
yargs "^3.10.0"

protobufjs@^5.0.3:
[email protected], protobufjs@^5.0.3:
version "5.0.3"
resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.3.tgz#e4dfe9fb67c90b2630d15868249bcc4961467a17"
integrity sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==
Expand Down