-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Support Runfiles on Windows #1212
Comments
On Windows, we use hard links in runfiles tree, and we need to delete and recreate all of them on every runfiles tree update (otherwise the links might still point to outdated files). Occasionally the hard link cannot be unlinked (due to permissions or file being busy). This CL just ignores the error (and hopes for the best). This will allow us to make progress on Windows. Work towards #1212. -- MOS_MIGRATED_REVID=121949474
This adds a new configuration option that allows disabling the creation of symlink forest for runfiles. On Windows, symlink forest is disabled by default; only the runfiles manifest is created. For shell tests, a function 'rlocation' is provided that converts from runfiles location to a real location. Work towards #1212. -- MOS_MIGRATED_REVID=125439553
This adds a new configuration option that allows disabling the creation of symlink forest for runfiles. On Windows, symlink forest is disabled by default; only the runfiles manifest is created. For shell tests, a function 'rlocation' is provided that converts from runfiles location to a real location. Work towards bazelbuild#1212. -- MOS_MIGRATED_REVID=125439553
Need to document the current plan for runfiles. |
Does this get put into milestone 0.5, or is it still possible to ship in the 0.4.x |
We do not version documentation yet. I think this should be done ASAP now. |
Oh - I meant this ticket, not the docs output of it. |
Infeasible. Non-elevated (not running as Administrator) processes cannot create symlinks, and we don't want to require elevation to run builds. Bazel writes runfiles manifest files instead, that describe the mapping. |
@laszlocsomor : Since it now possible to enable creating symlinks on Windows without admin rights or UAC (:tada:), is there a way to tell bazel to create symlinks as it would on linux (instead of creating a |
Hey @gkalpak : sure it would be possible, but I'm afraid we don't have capacity to do the migration, plus this would make it impossible to support older Windows versions (since this feature requires Win 10, v1709). That said, it is much easier now to use runfiles on Windows, thanks to the language-specific runfiles libraries (see below). Usage:
See:
[1] this should move to |
Thx for the info. Unfortunately, I want to use the runfiles in Node.js, which doesn't seem to have a helper lib 😞 Regarding:
Just to be clear, I didn't mean make this the default behavior for Windows. But it would be great if there was a way to tell bazel that symlinks are supported (e.g. set an env var) and then it could behave the same as on linux/macOS. |
Sure, I agree. :) Alas, I don't know to do that, and we already have plenty of other things to do, I'm afraid I can't spend time on it, sorry :( Maybe someone else will pick it up?... |
https://github.com/bazelbuild/rules_nodejs can be used for runfile resolution, but there are problems with the manifest approach (like #5926). I've opened an issue for the native symlink support too, at the time I hadn't seen the discussion here: #5807 |
Currently build-runfiles.exe uncoditionally creates hardlinks to individual runfiles on Windows.
This is problematic on several levels:
The text was updated successfully, but these errors were encountered: