Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Fail to compile tsetse due to overwriting outputs #152

Closed
achew22 opened this issue Feb 19, 2018 · 2 comments
Closed

Fail to compile tsetse due to overwriting outputs #152

achew22 opened this issue Feb 19, 2018 · 2 comments
Assignees
Labels

Comments

@achew22
Copy link
Member

achew22 commented Feb 19, 2018

Running rules_typescript from inside a container is failing @ d3cc5cd72d89aee0e4c2553ae1b99c707ecbef4e (current HEAD as of posting).

Inside my docker container when I run bazel build @build_bazel_rules_typescript//internal/tsetse/rules:rules (not discovered by running it directly, I tried to build my target and this was a dep) I get:

ERROR: /var/jenkins_home/.cache/bazel/_bazel_jenkins/012289bd6d606b886bac5c41b583ff44/external/build_bazel_rules_typescript/internal/tsetse/rules/BUILD:19:1: Compiling TypeScript (devmode) @build_bazel_rules_typescript//internal/tsetse/rules:rules failed (Exit 1)
error TS5033: Could not write file '/var/jenkins_home/.cache/bazel/_bazel_jenkins/012289bd6d606b886bac5c41b583ff44/execroot/vics/bazel-out/host/bin/external/build_bazel_rules_typescript/internal/tsetse/checker.js': EACCES: permission denied, open '/var/jenkins_home/.cache/bazel/_bazel_jenkins/012289bd6d606b886bac5c41b583ff44/execroot/vics/bazel-out/host/bin/external/build_bazel_rules_typescript/internal/tsetse/checker.js'.
error TS5033: Could not write file '/var/jenkins_home/.cache/bazel/_bazel_jenkins/012289bd6d606b886bac5c41b583ff44/execroot/vics/bazel-out/host/bin/external/build_bazel_rules_typescript/internal/tsetse/error_code.js': EACCES: permission denied, open '/var/jenkins_home/.cache/bazel/_bazel_jenkins/012289bd6d606b886bac5c41b583ff44/execroot/vics/bazel-out/host/bin/external/build_bazel_rules_typescript/internal/tsetse/error_code.js'.
error TS5033: Could not write file '/var/jenkins_home/.cache/bazel/_bazel_jenkins/012289bd6d606b886bac5c41b583ff44/execroot/vics/bazel-out/host/bin/external/build_bazel_rules_typescript/internal/tsetse/failure.js': EACCES: permission denied, open '/var/jenkins_home/.cache/bazel/_bazel_jenkins/012289bd6d606b886bac5c41b583ff44/execroot/vics/bazel-out/host/bin/external/build_bazel_rules_typescript/internal/tsetse/failure.js'.
error TS5033: Could not write file '/var/jenkins_home/.cache/bazel/_bazel_jenkins/012289bd6d606b886bac5c41b583ff44/execroot/vics/bazel-out/host/bin/external/build_bazel_rules_typescript/internal/tsetse/rule.js': EACCES: permission denied, open '/var/jenkins_home/.cache/bazel/_bazel_jenkins/012289bd6d606b886bac5c41b583ff44/execroot/vics/bazel-out/host/bin/external/build_bazel_rules_typescript/internal/tsetse/rule.js'.
error TS5055: Cannot write file '/var/jenkins_home/.cache/bazel/_bazel_jenkins/012289bd6d606b886bac5c41b583ff44/execroot/vics/bazel-out/host/bin/external/build_bazel_rules_typescript/internal/tsetse/checker.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/var/jenkins_home/.cache/bazel/_bazel_jenkins/012289bd6d606b886bac5c41b583ff44/execroot/vics/bazel-out/host/bin/external/build_bazel_rules_typescript/internal/tsetse/error_code.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/var/jenkins_home/.cache/bazel/_bazel_jenkins/012289bd6d606b886bac5c41b583ff44/execroot/vics/bazel-out/host/bin/external/build_bazel_rules_typescript/internal/tsetse/failure.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/var/jenkins_home/.cache/bazel/_bazel_jenkins/012289bd6d606b886bac5c41b583ff44/execroot/vics/bazel-out/host/bin/external/build_bazel_rules_typescript/internal/tsetse/rule.d.ts' because it would overwrite input file.

Have you seen anything like this before? I tried to put together a minimal version of this bug, but thus far have been unable to do so. I'm happy to keep trying but I think I need a pointer to what is different. Unfortunately this was in the CL where I switched to rules_typescript so I have a +1500/-22000 line diff to comb through to figure out if it is something in there.

@alexeagle
Copy link
Contributor

Yes, it's a hermeticity violation with the vanilla typescript compiler (once we've compiled tsc_wrapped we have a workaround for this problem, which is that we elide unexpected writes to disk. But to compile tsc_wrapped itself, we have to work with plain tsc)

@gregmagolan has found this is blocking us on Windows as well. I'll work on it tomorrow probably.

@alexeagle alexeagle self-assigned this Feb 23, 2018
@alexeagle alexeagle changed the title Running inside docker container fails Fail to compile tsetse due to overwriting outputs Feb 23, 2018
@alexeagle alexeagle added the bug label Feb 23, 2018
@achew22 achew22 mentioned this issue Mar 2, 2018
@alexeagle
Copy link
Contributor

Fixed in ce000fd

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants