Skip to content
New issue

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

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

Already on GitHub? # to your account

rules_nodejs is broken on Windows, Bazel CI didn't catch it #582

Closed
meteorcloudy opened this issue Feb 26, 2019 · 7 comments
Closed

rules_nodejs is broken on Windows, Bazel CI didn't catch it #582

meteorcloudy opened this issue Feb 26, 2019 · 7 comments

Comments

@meteorcloudy
Copy link
Collaborator

meteorcloudy commented Feb 26, 2019

🐞 bug report

Is this a regression?

Yes, rules_nodejs no longer builds on Windows

Description

Rules_nodejs is red in downstream test on Bazel CI:
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/826#40bcf682-9310-4cb7-8215-0b09f9f601bf

First I thought it was a Bazel bug, but while bisecting, even a previous good bazel commit fails with the same error.
https://buildkite.com/bazel/culprit-finder/builds/117#9cd512ab-6511-4941-8140-779f1bc47655

Then I tried to reproduce on my local Windows machine with Bazel 0.22.0, I got the same error.
After a local bisecting, I found #575 as the culprit.

I suspect we didn't catch this on presubmit because the actions were remote cached.
This means we have a hermetic problem in either rules_nodejs rule or Bazel, please help investigate.

🔬 Minimal Reproduction

With Bazel 0.22.0

bazel run --verbose_failures --announce_rc @nodejs//:yarn
bazel build --verbose_failures --announce_rc //...

🔥 Exception or Error



ERROR: D:/b/bk-windows-java8-5s95/bazel-downstream-projects/rules_nodejs/internal/e2e/rollup/BUILD.bazel:4:1: Couldn't build file internal/e2e/rollup/bundle.js: SkylarkAction internal/e2e/rollup/bundle.js failed (Exit 2): tsc.exe failed: error executing command
--
  | cd D:/b/vnydp666/execroot/build_bazel_rules_nodejs
  | bazel-out/host/bin/external/build_bazel_rules_nodejs/internal/rollup/tsc.exe --target es5 --allowJS bazel-out/x64_windows-fastbuild/bin/internal/e2e/rollup/bundle.es6.js --outFile bazel-out/x64_windows-fastbuild/bin/internal/e2e/rollup/bundle.js
  | Execution platform: @bazel_tools//platforms:host_platform
  | ../../../bk-windows-java8-5s95/bazel-downstream-projects/rules_nodejs/node_modules/@types/node/util.d.ts(117,88): error TS2304: Cannot find name 'Symbol'.

🌍 Your Environment

Operating System:

  
Windows
  

Output of bazel version:

  
0.22.0
  

Rules version (SHA):

  
8f1bcccc7e6b07f1b3ae55f39d9e94b4aedd12b5
  
@meteorcloudy
Copy link
Collaborator Author

@alexeagle This also means rules_nodejs 0.26.0 release doesn't work on Windows.

@meteorcloudy
Copy link
Collaborator Author

I can reproduce the issue on CI after disabling remote cache in tests
https://buildkite.com/bazel/rules-nodejs-nodejs/builds/1535#8a7323c9-7102-4f1e-98b1-e865bbc4fedb

@alexeagle
Copy link
Collaborator

Maybe we should disable remote caching until we have a way to test the hermeticity of rules?

@meteorcloudy
Copy link
Collaborator Author

Yes, I already did that for running the tests, there is no easy way to disable remote cache for the build currently. (Maybe we should add one @fweikert)

@alexeagle @gregmagolan Please work on a fix for this, otherwise the presubmit of rules_nodejs will always be red.

@gregmagolan
Copy link
Collaborator

@meteorcloudy Thanks for reporting. I'll TAL today or tomorrow.

@gregmagolan
Copy link
Collaborator

gregmagolan commented Mar 5, 2019

I tried reproducing on my local Windows machine with Bazel 0.22.0 with no luck

@gregmagolan
Copy link
Collaborator

That's strange. I checked the latest builds https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/840 & https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/839 and rules_nodejs is all green. Don't know what caused the failure or how you managed to reproduce it locally @meteorcloudy. Closing this as its now passing at head but feel free to re-open if it shows up again.

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

No branches or pull requests

3 participants