rules_nodejs
rules_nodejs copied to clipboard
googmodules example fails to compile prodmode with worker
π bug report
This bug was originally filed as https://github.com/bazelbuild/rules_typescript/issues/396, but has been ignored, so re-filing here now that rules_typescript was moved to this repository. It appears the referenced example was also lost in the transition.
Affected Rule
The issue is caused by the rule: ts_libraryIs this a regression?
Yes.Description
The prodmode compile of the googlemodules example fails while trying to write .externs.js when run in a worker.
π¬ Minimal Reproduction
- Checkout the latest release (https://github.com/bazelbuild/rules_typescript/releases/tag/0.22.1)
- Run
bazel build //examples/googmodule --output_groups=es6_sources - Notice compile error
- Comment out
build --strategy=TypeScriptCompile=workerin.bazelrc - Run
bazel build //examples/googmodule --output_groups=es6_sourcesagain. - Notice successful compile
Also note: adding generate_externs = False, to the ts_library and adding "tsickleGenerateExterns": false, to the bazelOptions in tsconfig.json fail to prevent the error.
π₯ Exception or Error
ERROR: /home/jaredneil/code/rules_typescript/examples/googmodule/BUILD.bazel:5:1: Compiling TypeScript (prodmode) //examples/googmodule:googmodule failed (Exit 1)
Compilation failed Error: EACCES: permission denied, open 'bazel-out/k8-fastbuild/bin/examples/googmodule/googmodule.externs.js'
at Object.openSync (fs.js:436:3)
at Object.writeFileSync (fs.js:1187:35)
at emitWithTsickle (/home/jaredneil/.cache/bazel/_bazel_jaredneil/19dfd516ff256fd1671b6233e232dcc8/execroot/build_bazel_rules_typescript/bazel-out/host/bin/external/build_bazel_rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts:323:8)
at runFromOptions (/home/jaredneil/.cache/bazel/_bazel_jaredneil/19dfd516ff256fd1671b6233e232dcc8/execroot/build_bazel_rules_typescript/bazel-out/host/bin/external/build_bazel_rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts:242:19)
at runOneBuild (/home/jaredneil/.cache/bazel/_bazel_jaredneil/19dfd516ff256fd1671b6233e232dcc8/execroot/build_bazel_rules_typescript/bazel-out/host/bin/external/build_bazel_rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts:159:12)
at Socket. (/home/jaredneil/.cache/bazel/_bazel_jaredneil/19dfd516ff256fd1671b6233e232dcc8/execroot/build_bazel_rules_typescript/bazel-out/host/bin/external/build_bazel_rules_typescript/internal/tsc_wrapped/worker.ts:112:26)
at Socket.emit (events.js:182:13)
at emitReadable_ (_stream_readable.js:534:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
Target //examples/googmodule:googmodule failed to build
π Your Environment
Operating System:
Ubuntu 18.04.1 LTS
Output of bazel version:
0.24.1
bump
This issue has been automatically marked as stale because it has not had any activity for 90 days. It will be closed if no further activity occurs in two weeks. Collaborators can add a "cleanup" or "need: discussion" label to keep it open indefinitely. Thanks for your contributions to rules_nodejs!
I think this is still an issue. We got around it by commenting out the line that writes the externs file using patch-package.
This issue has been automatically marked as stale because it has not had any activity for 90 days. It will be closed if no further activity occurs in two weeks. Collaborators can add a "cleanup" or "need: discussion" label to keep it open indefinitely. Thanks for your contributions to rules_nodejs!
bump
No longer in scope for rules_nodejs which only supplies the Node.js toolchain as of v6.0.0.
Downstream canonical JavaScript + Node.js ruleset is now https://github.com/aspect-build/rules_js.