Skip to content

Build/update rules ts 0.25.1#28625

Closed
gregmagolan wants to merge 1 commit into
angular:masterfrom
gregmagolan:build/update-rules_ts-0.24.1-rules_nodejs-0.18.3
Closed

Build/update rules ts 0.25.1#28625
gregmagolan wants to merge 1 commit into
angular:masterfrom
gregmagolan:build/update-rules_ts-0.24.1-rules_nodejs-0.18.3

Conversation

@gregmagolan

@gregmagolan gregmagolan commented Feb 8, 2019

Copy link
Copy Markdown
Contributor

Also brings in changes from #27738 required for the es2015 change.

UPDATE: now at @bazel/typescript and @bazel/karma 0.25.1 which

  • renames build_bazel_rules_typescript to npm_bazel_typescript and build_bazel_rules_karma to npm_bazel_karma
  • allows for setting devmode target to es5 via bazelOptions.devmodeTargetOverride tsconfig settings
  • provides a browser_repositories.bzl in @bazel/karma that works with this repo
    @kyliau I didn't update schematics as you may prefer to wait for the rules_webtesting browser_repositories. Would work with @npm_bazel_karma//:browser_repositories

@gregmagolan gregmagolan added target: patch This PR is targeted for the next patch release area: bazel Issues related to the published `@angular/bazel` build rules labels Feb 8, 2019
@gregmagolan gregmagolan requested review from a team and alexeagle February 8, 2019 22:13
@ngbot ngbot Bot added this to the needsTriage milestone Feb 8, 2019
@gregmagolan

Copy link
Copy Markdown
Contributor Author

The failures in test and test_ivy_aot look related to the change to es2015.

The failure in the integration_test in the bazel schematics test seems to be some unexpected consequence of changing web_package to use fs.copyFileSync() instead of fs.readfileSync followed by fs.writeFileSync. Maybe having something to do with the source file's permissions?

[69 / 73] SkylarkAction src/bundle.min.js; 6s processwrapper-sandbox ... (2 actions, 1 running)
ERROR: /home/circleci/ng/integration/bazel-schematics/demo/src/BUILD.bazel:47:1: SkylarkAction src/prodapp failed (Exit 1)
Error: EACCES: permission denied, copyfile 'bazel-out/k8-fastbuild/bin/src/bundle.min.js' -> 'bazel-out/k8-fastbuild/bin/src/prodapp/bundle.min.js'
    at Object.copyFileSync (fs.js:1721:3)
    at copy (/home/circleci/.cache/bazel/_bazel_circleci/d22d44146b8f6c1dabaff0f746a8c6b9/execroot/demo/bazel-out/host/bin/external/build_bazel_rules_nodejs/internal/web_package/assembler.runfiles/build_bazel_rules_nodejs/internal/web_package/assembler.js:69:10)
    at main (/home/circleci/.cache/bazel/_bazel_circleci/d22d44146b8f6c1dabaff0f746a8c6b9/execroot/demo/bazel-out/host/bin/external/build_bazel_rules_nodejs/internal/web_package/assembler.runfiles/build_bazel_rules_nodejs/internal/web_package/assembler.js:74:5)
    at Object.<anonymous> (/home/circleci/.cache/bazel/_bazel_circleci/d22d44146b8f6c1dabaff0f746a8c6b9/execroot/demo/bazel-out/host/bin/external/build_bazel_rules_nodejs/internal/web_package/assembler.runfiles/build_bazel_rules_nodejs/internal/web_package/assembler.js:85:22)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Object.<anonymous> (/home/circleci/.cache/bazel/_bazel_circleci/d22d44146b8f6c1dabaff0f746a8c6b9/execroot/demo/bazel-out/host/bin/external/build_bazel_rules_nodejs/internal/web_package/assembler_bin_loader.js:489:24)
INFO: Elapsed time: 12.117s, Critical Path: 8.98s
INFO: 15 processes: 7 processwrapper-sandbox, 8 worker.
FAILED: Build did NOT complete successfully
//src:test_chromium-local                                             NO STATUS

@alexeagle

Copy link
Copy Markdown
Contributor

Maybe we need fs.copyFileSync(src, dest, fs.constants.COPYFILE_EXCL) so that it can overwrite a file if it already exists? I imagine that writeFileSync would overwrite without erroring

@gregmagolan

gregmagolan commented Feb 12, 2019

Copy link
Copy Markdown
Contributor Author

Maybe we need fs.copyFileSync(src, dest, fs.constants.COPYFILE_EXCL) so that it can overwrite a file if it already exists? I imagine that writeFileSync would overwrite without erroring

I'll try that out

EDIT: It's actually the opposite so that flag is not it. By default, dest is overwritten if it already exists. fs.constants.COPYFILE_EXCL tell copyFileSync to fail if the dest already exists.

@gregmagolan

Copy link
Copy Markdown
Contributor Author

Error: EACCES: permission denied, copyfile issue fixed. I'll release a rules_nodejs tomorrow with the fix included.

@gregmagolan gregmagolan changed the title Build/update rules ts 0.24.1 rules nodejs 0.18.4 Build/update rules ts 0.24.1 rules nodejs 0.18.6 Feb 13, 2019
@gregmagolan gregmagolan changed the title Build/update rules ts 0.24.1 rules nodejs 0.18.6 Build/update rules ts 0.24.1 Feb 13, 2019
@gregmagolan

Copy link
Copy Markdown
Contributor Author

rules_nodejs updated to 0.18.6 in another PR. Rebased this one and this now only updates rules_typescript.

@gregmagolan gregmagolan requested a review from a team February 15, 2019 10:06
@gregmagolan

Copy link
Copy Markdown
Contributor Author

build_206289_step_108_container_0.txt
^ Here's the remaining web test failures.
Some really strange ones still:

This one shows up 8 times in //packages/elements/test:test_chromium-local:

HeadlessChrome 69.0.3497 (Linux 0.0.0) slots should use slots to project content FAILED
	[object ErrorEvent] thrown

	TypeError: Cannot read property 'querySelector' of null
	    at UserContext.it (packages/elements/test/slots_spec.ts:51:39 <- angular/packages/elements/test/slots_spec.js:55:48)
	    at ZoneDelegate.invoke (node_modules/zone.js/dist/zone.js:388:26)
	    at ProxyZoneSpec.onInvoke (node_modules/zone.js/dist/zone-testing.js:288:39)
	    at ZoneDelegate.invoke (node_modules/zone.js/dist/zone.js:387:32)
	    at Zone.run (node_modules/zone.js/dist/zone.js:138:43)
	    at runInTestZone (node_modules/zone.js/dist/zone-testing.js:509:34)
	    at UserContext.eval (node_modules/zone.js/dist/zone-testing.js:524:20)

@gregmagolan

Copy link
Copy Markdown
Contributor Author

In //packages/platform-browser/animations/test:test_web_chromium-local seeing these on 6 tests:

HeadlessChrome 69.0.3497 (Linux 0.0.0): Executed 0 of 15 SUCCESS (0 secs / 0 secs)
15 02 2019 10:38:49.018:WARN [reporter]: SourceMap position not found for trace: TypeError: Cannot read property 'body' of undefined
    at new InjectableAnimationEngine (http://localhost:9876/base/angular/packages/platform-browser/animations/src/providers.js:29:23)
    at new MockAnimationEngine (http://localhost:9876/base/angular/packages/platform-browser/animations/test/animation_renderer_spec.js:286:13)
    at _createClass (http://localhost:9876/base/angular/packages/core/src/view/ng_module.js:171:24)
    at _createProviderInstance (http://localhost:9876/base/angular/packages/core/src/view/ng_module.js:145:30)
    at resolveNgModuleDep (http://localhost:9876/base/angular/packages/core/src/view/ng_module.js:108:25)
    at _callFactory (http://localhost:9876/base/angular/packages/core/src/view/ng_module.js:196:71)
    at _createProviderInstance (http://localhost:9876/base/angular/packages/core/src/view/ng_module.js:148:30)
    at Object.resolveNgModuleDep (http://localhost:9876/base/angular/packages/core/src/view/ng_module.js:108:25)
    at NgModuleRef_.get (http://localhost:9876/base/angular/packages/core/src/view/refs.js:430:32)
    at TestBedViewEngine.get (http://localhost:9876/base/angular/packages/core/testing/src/test_bed.js:334:53)
15 02 2019 10:38:49.090:WARN [reporter]: SourceMap position not found for trace: TypeError: Cannot read property 'body' of undefined
    at new InjectableAnimationEngine (http://localhost:9876/base/angular/packages/platform-browser/animations/src/providers.js:29:23)
    at new MockAnimationEngine (http://localhost:9876/base/angular/packages/platform-browser/animations/test/animation_renderer_spec.js:286:13)
    at _createClass (http://localhost:9876/base/angular/packages/core/src/view/ng_module.js:171:24)
    at _createProviderInstance (http://localhost:9876/base/angular/packages/core/src/view/ng_module.js:145:30)
    at resolveNgModuleDep (http://localhost:9876/base/angular/packages/core/src/view/ng_module.js:108:25)
    at _callFactory (http://localhost:9876/base/angular/packages/core/src/view/ng_module.js:196:71)
    at _createProviderInstance (http://localhost:9876/base/angular/packages/core/src/view/ng_module.js:148:30)
    at Object.resolveNgModuleDep (http://localhost:9876/base/angular/packages/core/src/view/ng_module.js:108:25)
    at NgModuleRef_.get (http://localhost:9876/base/angular/packages/core/src/view/refs.js:430:32)
    at TestBedViewEngine.get (http://localhost:9876/base/angular/packages/core/testing/src/test_bed.js:334:53)
HeadlessChrome 69.0.3497 (Linux 0.0.0) AnimationRenderer should hook into the engine's insert operations when appending children FAILED
	TypeError: Cannot read property 'body' of undefined
	    at new InjectableAnimationEngine (packages/platform-browser/animations/src/providers.ts:22:14 <- angular/packages/platform-browser/animations/src/providers.js:29:23)
	    at new MockAnimationEngine (packages/platform-browser/animations/test/animation_renderer_spec.js:286:13)
	    at _createClass (packages/core/src/view/ng_module.ts:172:13 <- angular/packages/core/src/view/ng_module.js:171:24)
	    at _createProviderInstance (packages/core/src/view/ng_module.ts:144:19 <- angular/packages/core/src/view/ng_module.js:145:30)
	    at resolveNgModuleDep (packages/core/src/view/ng_module.ts:106:12 <- angular/packages/core/src/view/ng_module.js:108:25)
	    at _callFactory (packages/core/src/view/ng_module.ts:201:49 <- angular/packages/core/src/view/ng_module.js:196:71)
	    at _createProviderInstance (packages/core/src/view/ng_module.ts:147:19 <- angular/packages/core/src/view/ng_module.js:148:30)
	    at Object.resolveNgModuleDep (packages/core/src/view/ng_module.ts:106:12 <- angular/packages/core/src/view/ng_module.js:108:25)
	    at NgModuleRef_.get (packages/core/src/view/refs.ts:507:11 <- angular/packages/core/src/view/refs.js:430:32)
	    at TestBedViewEngine.get (packages/core/testing/src/test_bed.ts:479:44 <- angular/packages/core/testing/src/test_bed.js:334:53)

@gregmagolan

Copy link
Copy Markdown
Contributor Author

In //packages/platform-browser/test:test_web_chromium-local failing on 2 tests with:

HeadlessChrome 69.0.3497 (Linux 0.0.0) profiler should time change detection FAILED
	TypeError: this.appRef.tick is not a function
	    at AngularProfiler.timeChangeDetection (packages/platform-browser/src/browser/tools/common_tools.ts:54:18 <- angular/packages/platform-browser/src/browser/tools/common_tools.js:63:29)
	    at Object.callNgProfilerTimeChangeDetection (packages/platform-browser/test/browser/tools/spies.ts:27:28 <- angular/packages/platform-browser/test/browser/tools/spies.js:35:36)
	    at UserContext.it (packages/platform-browser/test/browser/tools/tools_spec.ts:20:47 <- angular/packages/platform-browser/test/browser/tools/tools_spec.js:27:64)
	    at ZoneDelegate.invoke (node_modules/zone.js/dist/zone.js:388:26)
	    at ProxyZoneSpec.onInvoke (node_modules/zone.js/dist/zone-testing.js:288:39)
	    at ZoneDelegate.invoke (node_modules/zone.js/dist/zone.js:387:32)
	    at Zone.run (node_modules/zone.js/dist/zone.js:138:43)
	    at runInTestZone (node_modules/zone.js/dist/zone-testing.js:509:34)
	    at UserContext.eval (node_modules/zone.js/dist/zone-testing.js:524:20)

HeadlessChrome 69.0.3497 (Linux 0.0.0): Executed 39 of 172 (1 FAILED) (0 secs / 0.562 secs)
HeadlessChrome 69.0.3497 (Linux 0.0.0) profiler should time change detection with recording FAILED
	TypeError: this.appRef.tick is not a function
	    at AngularProfiler.timeChangeDetection (packages/platform-browser/src/browser/tools/common_tools.ts:54:18 <- angular/packages/platform-browser/src/browser/tools/common_tools.js:63:29)
	    at Object.callNgProfilerTimeChangeDetection (packages/platform-browser/test/browser/tools/spies.ts:27:28 <- angular/packages/platform-browser/test/browser/tools/spies.js:35:36)
	    at UserContext.it (packages/platform-browser/test/browser/tools/tools_spec.ts:23:15 <- angular/packages/platform-browser/test/browser/tools/tools_spec.js:28:79)
	    at ZoneDelegate.invoke (node_modules/zone.js/dist/zone.js:388:26)
	    at ProxyZoneSpec.onInvoke (node_modules/zone.js/dist/zone-testing.js:288:39)
	    at ZoneDelegate.invoke (node_modules/zone.js/dist/zone.js:387:32)
	    at Zone.run (node_modules/zone.js/dist/zone.js:138:43)
	    at runInTestZone (node_modules/zone.js/dist/zone-testing.js:509:34)
	    at UserContext.eval (node_modules/zone.js/dist/zone-testing.js:524:20)

@gregmagolan

Copy link
Copy Markdown
Contributor Author

//packages/compiler-cli/integrationtest/bazel/injectable_def/app/test:test errors out completely with:

ReferenceError: ShakeableService is not defined
    at packages/compiler-cli/integrationtest/bazel/injectable_def/app/src/dep.ts:23:24
    at /b/f/w/bazel-out/k8-fastbuild/bin/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/test.sh.runfiles/angular/packages/compiler-cli/integrationtest/bazel/injectable_def/app/src/dep.js:3:17
    at Object.<anonymous> (/b/f/w/bazel-out/k8-fastbuild/bin/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/test.sh.runfiles/angular/packages/compiler-cli/integrationtest/bazel/injectable_def/app/src/dep.js:9:3)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
...

@gregmagolan

Copy link
Copy Markdown
Contributor Author

//packages/core/test:test_web_chromium-local:

HeadlessChrome 69.0.3497 (Linux 0.0.0) Reflector ctor inheritance detection should use the right regex FAILED
	Expected null to be truthy.
	    at UserContext.it (packages/core/test/reflection/reflector_spec.ts:180:59 <- angular/packages/core/test/reflection/reflector_spec.js:172:98)
	    at ZoneDelegate.invoke (node_modules/zone.js/dist/zone.js:388:26)
	    at ProxyZoneSpec.onInvoke (node_modules/zone.js/dist/zone-testing.js:288:39)
	    at ZoneDelegate.invoke (node_modules/zone.js/dist/zone.js:387:32)

	Expected null to be truthy.
	    at UserContext.it (packages/core/test/reflection/reflector_spec.ts:181:71 <- angular/packages/core/test/reflection/reflector_spec.js:173:110)
	    at ZoneDelegate.invoke (node_modules/zone.js/dist/zone.js:388:26)
	    at ProxyZoneSpec.onInvoke (node_modules/zone.js/dist/zone-testing.js:288:39)
	    at ZoneDelegate.invoke (node_modules/zone.js/dist/zone.js:387:32)

and

HeadlessChrome 69.0.3497 (Linux 0.0.0) Reflector inheritance with decorators should inherit parameters FAILED
	Expected $.length = 0 to equal 2.
	Expected $[0] = undefined to equal [ Function, ParamDecoratorFactory({ value: 'a' }) ].
	Expected $[1] = undefined to equal [ Function, ParamDecoratorFactory({ value: 'b' }) ].
	    at UserContext.it (packages/core/test/reflection/reflector_spec.ts:314:65 <- angular/packages/core/test/reflection/reflector_spec.js:301:78)
	    at ZoneDelegate.invoke (node_modules/zone.js/dist/zone.js:388:26)
	    at ProxyZoneSpec.onInvoke (node_modules/zone.js/dist/zone-testing.js:288:39)
	    at ZoneDelegate.invoke (node_modules/zone.js/dist/zone.js:387:32)

@gregmagolan gregmagolan changed the title Build/update rules ts 0.24.1 Build/update rules ts 0.25.0 Feb 20, 2019
@gregmagolan gregmagolan changed the title Build/update rules ts 0.25.0 Build/update rules ts 0.25.1 Feb 21, 2019
Updated a spot in the compiler which assumed es5 downlevelling get ready for es2015 devmode in the future.
@kara kara added the action: review The PR is still awaiting reviews from at least one requested reviewer label Feb 21, 2019
@alexeagle alexeagle added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 21, 2019
@alexeagle

Copy link
Copy Markdown
Contributor

ticket to migrate remaining packages is in https://angular-team.atlassian.net/browse/FW-1061

@IgorMinar

Copy link
Copy Markdown
Contributor

@gregmagolan please provide a bit more info in the commit message the next time - this is quite a big change for almost no description of what's going on here. thanks!

@IgorMinar IgorMinar added target: major This PR is targeted for the next major release and removed target: patch This PR is targeted for the next patch release labels Feb 21, 2019
@IgorMinar

Copy link
Copy Markdown
Contributor

this PR doesn't apply cleanly to the patch branch - @gregmagolan can you please send a separate patch-only PR? thanks

@IgorMinar IgorMinar closed this in ebffde7 Feb 21, 2019
@gregmagolan

Copy link
Copy Markdown
Contributor Author

@gregmagolan please provide a bit more info in the commit message the next time - this is quite a big change for almost no description of what's going on here. thanks!

Will do

this PR doesn't apply cleanly to the patch branch - @gregmagolan can you please send a separate patch-only PR? thanks

👍

@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: bazel Issues related to the published `@angular/bazel` build rules cla: yes target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants