Skip to content

build: remove windows runfile workaround #14173

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
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
15 changes: 8 additions & 7 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# 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.3.zip",
strip_prefix = "rules_nodejs-0.15.3",
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.16.1.zip",
strip_prefix = "rules_nodejs-0.16.1",
)

# Add TypeScript rules
http_archive(
name = "build_bazel_rules_typescript",
url = "https://github.com/bazelbuild/rules_typescript/archive/8ea1a55cf5cf8be84ddfeefc0940769b80da792f.zip",
strip_prefix = "rules_typescript-8ea1a55cf5cf8be84ddfeefc0940769b80da792f",
url = "https://github.com/bazelbuild/rules_typescript/archive/0.21.0.zip",
strip_prefix = "rules_typescript-0.21.0",
)

# Add Angular source and Bazel rules.
http_archive(
name = "angular",
url = "https://github.com/angular/angular/archive/7.0.4.zip",
strip_prefix = "angular-7.0.4",
url = "https://github.com/angular/angular/archive/7.1.0.zip",
strip_prefix = "angular-7.1.0",
)

# Add RxJS as repository because those are needed in order to build Angular from source.
Expand Down Expand Up @@ -69,7 +69,8 @@ check_bazel_version("0.18.0")
node_repositories(
# For deterministic builds, specify explicit NodeJS and Yarn versions.
node_version = "10.10.0",
yarn_version = "1.9.4",
# Use latest yarn version to support integrity field (added in yarn 1.10)
yarn_version = "1.12.1",
)

# @npm is temporarily needed to build @rxjs from source since its ts_library
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,33 @@
"version": "7.1.0",
"requiredAngularVersion": ">=7.0.0",
"dependencies": {
"@angular/animations": "^7.0.4",
"@angular/common": "^7.0.4",
"@angular/compiler": "^7.0.4",
"@angular/core": "^7.0.4",
"@angular/elements": "^7.0.4",
"@angular/forms": "^7.0.4",
"@angular/platform-browser": "^7.0.4",
"@angular/animations": "^7.1.0",
"@angular/common": "^7.1.0",
"@angular/compiler": "^7.1.0",
"@angular/core": "^7.1.0",
"@angular/elements": "^7.1.0",
"@angular/forms": "^7.1.0",
"@angular/platform-browser": "^7.1.0",
"@webcomponents/custom-elements": "^1.1.0",
"core-js": "^2.5.7",
"rxjs": "^6.3.3",
"systemjs": "0.19.43",
"tsickle": "^0.32.1",
"tsickle": "^0.34.0",
"tslib": "^1.9.3",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/core": "^7.0.6",
"@angular-devkit/schematics": "^7.0.6",
"@angular/bazel": "^7.0.4",
"@angular/compiler-cli": "^7.0.4",
"@angular/http": "^7.0.4",
"@angular/platform-browser-dynamic": "^7.0.4",
"@angular/platform-server": "^7.0.4",
"@angular/router": "^7.0.4",
"@bazel/ibazel": "0.6.0",
"@bazel/karma": "0.20.3",
"@bazel/typescript": "0.20.3",
"@angular/bazel": "^7.1.0",
"@angular/compiler-cli": "^7.1.0",
"@angular/http": "^7.1.0",
"@angular/platform-browser-dynamic": "^7.1.0",
"@angular/platform-server": "^7.1.0",
"@angular/router": "^7.1.0",
"@bazel/ibazel": "^0.7.0",
"@bazel/karma": "0.21.0",
"@bazel/typescript": "0.21.0",
"@firebase/app-types": "^0.3.2",
"@google-cloud/storage": "^1.1.1",
"@octokit/rest": "^15.9.4",
Expand Down
3 changes: 0 additions & 3 deletions src/cdk/schematics/#bazel_workaround.txt

This file was deleted.

3 changes: 0 additions & 3 deletions src/cdk/schematics/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package")
load("//:packages.bzl", "VERSION_PLACEHOLDER_REPLACEMENTS")
load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")

# TODO(devversion): remove when https://github.com/bazelbuild/rules_nodejs/issues/352 is fixed
exports_files(["#bazel_workaround.txt"])

filegroup(
name = "schematics_assets",
srcs = glob(["**/files/**/*", "**/*.json"]),
Expand Down
3 changes: 1 addition & 2 deletions src/cdk/schematics/ng-add/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {Tree} from '@angular-devkit/schematics';
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {getFileContent} from '@schematics/angular/utility/test';
import {createTestApp} from '../testing';
import {createTestApp, getFileContent} from '../testing';

describe('CDK ng-add', () => {
let runner: SchematicTestRunner;
Expand Down
3 changes: 1 addition & 2 deletions src/cdk/schematics/ng-generate/drag-drop/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {createTestApp} from '../../testing';
import {getFileContent} from '@schematics/angular/utility/test';
import {createTestApp, getFileContent} from '../../testing';
import {Schema} from './schema';

describe('CDK drag-drop schematic', () => {
Expand Down
20 changes: 20 additions & 0 deletions src/cdk/schematics/testing/file-content.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

import {Tree} from '@angular-devkit/schematics';

/** Gets the content of a specified file from a schematic tree. */
export function getFileContent(tree: Tree, filePath: string): string {
const contentBuffer = tree.read(filePath);

if (!contentBuffer) {
throw new Error(`Cannot read "${filePath}" because it does not exist.`);
}

return contentBuffer.toString();
}
1 change: 1 addition & 0 deletions src/cdk/schematics/testing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
export * from './post-scheduled-tasks';
export * from './test-app';
export * from './test-case-setup';
export * from './file-content';
15 changes: 1 addition & 14 deletions src/lib/schematics/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ npm_package(
jasmine_node_test(
name = "unit_tests",
srcs = [":schematics_test_sources"],
data = [":node_loader_workaround", ":schematics_assets", ":schematics_test_cases"],
data = [":schematics_assets", ":schematics_test_cases"],
)

ts_library(
Expand All @@ -70,16 +70,3 @@ filegroup(
]),
testonly = True,
)

# Filegroup that references a text file which comes alphabetically before the
# "cdk/schematics/index.js" file. This is necessary because on Windows in order to support absolute
# paths, the NodeJS rules resolve the actual workspace root by looking for the first entry that
# refers to the Bazel "USER_WORKSPACE" in the MANIFEST file. Since it's alphabetically ordered, and
# the CDK comes always before the Material schematics, we need to make sure that it doesn't resolve
# to the CDK bazel output which has been built as dependency.
# See more: https://github.com/bazelbuild/rules_nodejs/issues/352
filegroup(
name = "node_loader_workaround",
srcs = ["//src/cdk/schematics:#bazel_workaround.txt"],
testonly = True,
)
3 changes: 1 addition & 2 deletions src/lib/schematics/ng-add/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import {
getProjectStyleFile,
getProjectTargetOptions,
} from '@angular/cdk/schematics';
import {createTestApp} from '@angular/cdk/schematics/testing';
import {createTestApp, getFileContent} from '@angular/cdk/schematics/testing';
import {getWorkspace} from '@schematics/angular/utility/config';
import {getFileContent} from '@schematics/angular/utility/test';
import {getIndexHtmlPath} from './fonts/project-index-html';

describe('ng-add schematic', () => {
Expand Down
3 changes: 1 addition & 2 deletions src/lib/schematics/ng-generate/address-form/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {createTestApp} from '@angular/cdk/schematics/testing';
import {getFileContent} from '@schematics/angular/utility/test';
import {createTestApp, getFileContent} from '@angular/cdk/schematics/testing';
import {Schema} from './schema';

describe('Material address-form schematic', () => {
Expand Down
3 changes: 1 addition & 2 deletions src/lib/schematics/ng-generate/dashboard/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {createTestApp} from '@angular/cdk/schematics/testing';
import {getFileContent} from '@schematics/angular/utility/test';
import {createTestApp, getFileContent} from '@angular/cdk/schematics/testing';
import {Schema} from './schema';

describe('material-dashboard-schematic', () => {
Expand Down
3 changes: 1 addition & 2 deletions src/lib/schematics/ng-generate/nav/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {Schema} from './schema';
import {getFileContent} from '@schematics/angular/utility/test';
import {createTestApp} from '@angular/cdk/schematics/testing';
import {createTestApp, getFileContent} from '@angular/cdk/schematics/testing';

describe('material-nav-schematic', () => {
let runner: SchematicTestRunner;
Expand Down
3 changes: 1 addition & 2 deletions src/lib/schematics/ng-generate/table/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {createTestApp} from '@angular/cdk/schematics/testing';
import {getFileContent} from '@schematics/angular/utility/test';
import {createTestApp, getFileContent} from '@angular/cdk/schematics/testing';
import {Schema} from './schema';

describe('material-table-schematic', () => {
Expand Down
3 changes: 1 addition & 2 deletions src/lib/schematics/ng-generate/tree/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {createTestApp} from '@angular/cdk/schematics/testing';
import {getFileContent} from '@schematics/angular/utility/test';
import {createTestApp, getFileContent} from '@angular/cdk/schematics/testing';
import {Schema} from './schema';

describe('Material tree schematic', () => {
Expand Down
13 changes: 5 additions & 8 deletions tools/npm/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"description": "minimal @npm repo required to build @rxjs from source and so that @npm//@angular/bazel is a valid target",
"dependencies": {
"@angular/bazel": "7.0.4",
"@angular/compiler": "7.0.4",
"@angular/compiler-cli": "7.0.4",
"@bazel/karma": "0.20.3",
"@bazel/typescript": "0.20.3",
"@angular/bazel": "7.1.0",
"@angular/compiler": "7.1.0",
"@angular/compiler-cli": "7.1.0",
"@bazel/karma": "0.21.0",
"@bazel/typescript": "0.21.0",
"typescript": "^3.1.1"
},
"scripts": {
"//": "TODO(gregmagolan): figure out how to keep @bazel/karma & @bazel/typescript dependencies here up to date with the root package.json; NOTE: versions of @angular/x don't matter here as they are only require to create the @npm//@angular/bazel target name"
}
}
Loading