aspect-build/rules_ts

[Bug]: Workers broken on Windows

alexeagle opened this issue · 5 comments

What happened?

With workers
https://buildkite.com/bazel/bcr-presubmit/builds/674#018443a2-60ec-4c83-b51b-021568de0748

(17:15:06) ERROR: C:/b/bk-windows-r2x7/bazel-downstream-projects/output/rules_ts-1.0.0-rc5/e2e/bzlmod/BUILD:4:11: Compiling TypeScript project @@//:ts [tsc -p tsconfig.json] failed: Worker process did not return a WorkResponse:
  |  
  | ---8<---8<--- Start of log, file at C:/b/kvdsqqpu/bazel-workers/worker-1-TsProject.log ---8<---8<---
  | node:internal/modules/cjs/loader:936
  | throw err;
  | ^
  |  
  | Error: Cannot find module 'google-protobuf'
  | Require stack:
  | - C:\b\kvdsqqpu\execroot\_main\bazel-out\x64_windows-opt-exec-2B5CBBC6\bin\external\aspect_rules_ts~override~ext~npm_typescript\tsc_worker.bat.runfiles\aspect_rules_ts~override~ext~npm_typescript\node_modules\@bazel\worker\src\worker_protocol.js
  | - C:\b\kvdsqqpu\execroot\_main\bazel-out\x64_windows-opt-exec-2B5CBBC6\bin\external\aspect_rules_ts~override~ext~npm_typescript\tsc_worker.bat.runfiles\aspect_rules_ts~override~ext~npm_typescript\node_modules\@bazel\worker\src\worker.js
  | - C:\b\kvdsqqpu\execroot\_main\bazel-out\x64_windows-opt-exec-2B5CBBC6\bin\external\aspect_rules_ts~override~ext~npm_typescript\tsc_worker.bat.runfiles\aspect_rules_ts~override~ext~npm_typescript\node_modules\@bazel\worker\index.js
  | - C:\b\kvdsqqpu\execroot\_main\bazel-out\x64_windows-opt-exec-2B5CBBC6\bin\external\aspect_rules_ts~override~ext~npm_typescript\tsc_worker.bat.runfiles\aspect_rules_ts~override~ext~npm_typescript\ts_project_worker.js
 

Without workers
https://buildkite.com/bazel/bcr-presubmit/builds/681#018443d0-fe66-4fd5-aa90-c872f24458f7

Version

rules_ts 1.0.0-rc5

How to reproduce

No response

Any other information?

No response

Fund our work

  • Sponsor our open source work by donating a bug bounty

@thesayyn any idea if this looks fixable this week?

@thesayyn any idea if this looks fixable this week?

I missed the comment. It's less likely given that I don't have a windows machine to debug and fix.

This looks tricky. I suggest we advertise the workers are not support yet on Windows in the 1.0.0 release. #244

Still noticing that rules_ts has no windows coverage on BCR :(

Due to bugs like this one, we are moving away from supporting the Persistent Worker in the next major 2.0 release of rules_ts, and likely will never fix this, sorry!