Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix(builtin): fix runfiles linking issue on Windows #1789

Closed

Conversation

gregmagolan
Copy link
Collaborator

@gregmagolan gregmagolan commented Apr 5, 2020

Fix 1 of 2 for linker issue on Windows when all build actions are cached #1781. This fixes incorrectly symlinks but it does not actually address the underlying issue of programs (tests) running outside of the sandbox and directly out of the execroot on Windows (either out of execroot sources or execroot bazel-out).

If all build actions are cached then the linker only runs for the test that is executed. If there are no third-part npm deps then it makes a node_modules folder in the runfiles for that test and puts its symlinks in there. The problem is that when the test runs, the .js spec is in execroot bazel-out and it doesn't see the node_modules created in the runfiles folder. Since no build actions have run that may have created the symlinks needed for the test in the execroot node_modules, the symlinks that it needs do not exist.

The 2nd fix (still coming) seems to be to always symlink into the execroot which is below the runfiles folder. Some mental gymnastics needed to figure out if this is correct when in the sandbox as well and if there are third-party deps or not. I'll investigate.

Fix 1 of 2 for linker issue on Windows when all build actions are cached bazel-contrib#1781. This fixes incorrectly symlinks but it does not actually address the underlying issue of programs (tests) running outside of the sandbox and directly out of the execroot on Windows (either out of execroot sources or execroot bazel-out).

If all build actions are cached then the linker only runs for the test that is executed. If there are no third-part npm deps then it makes a node_modules folder in the runfiles for that test and puts its symlinks in there. The problem is that when the test runs, the .js spec is in execroot bazel-out and it doesn't see the node_modules created in the runfiles folder. Since no build actions have run that may have created the symlinks needed for the test in the execroot node_modules, the symlinks that it needs do not exist.

The 2nd fix (still coming) seems to be to always symlink into the execroot which is below the runfiles folder. Some mental gymnastics needed to figure out if this is correct when in the sandbox as well and if there are third-party deps or not. I'll investigate.
@gregmagolan
Copy link
Collaborator Author

Replaced by #1805 which includes this fix and adds the 2nd fix as well.

@gregmagolan gregmagolan closed this Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants