diff options
author | Lukacs Berki <lberki@google.com> | 2016-01-27 14:10:01 +0000 |
---|---|---|
committer | Kristina Chodorow <kchodorow@google.com> | 2016-01-27 15:09:57 +0000 |
commit | 37c1b53292a35a4ce316e983731d9405ba3db3b7 (patch) | |
tree | 3d01be0b2b95e0d939ff1c8ba821d21326b28a1b /src/main/java/com/google/devtools | |
parent | 2dc9508ec8d41dba9d897c2de61468bb9600dfbf (diff) |
Add documentation about our plans to handle symlinks on Windows.
--
MOS_MIGRATED_REVID=113154309
Diffstat (limited to 'src/main/java/com/google/devtools')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/vfs/UnixFileSystem.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/vfs/UnixFileSystem.java b/src/main/java/com/google/devtools/build/lib/vfs/UnixFileSystem.java index c8854dbd81..57e3d98bdd 100644 --- a/src/main/java/com/google/devtools/build/lib/vfs/UnixFileSystem.java +++ b/src/main/java/com/google/devtools/build/lib/vfs/UnixFileSystem.java @@ -60,6 +60,29 @@ public class UnixFileSystem extends AbstractFileSystemWithCustomStat { /** * Write a log message for symlinks that won't be compatible with how we are planning to pretend * that they exist on Windows. + * + * <p>The current plan for emulating symlinks on Windows is that in order to create a "symlink", + * the target needs to exist, that is, we don't do dangling symlinks. Then: + * </p> + * + * <ul> + * <li>If the target is a directory, we create a junction. This is good because we don't need + * write access to the target and it Just Works. The link and its target can be on different + * file systems, which is important, because contrary to the popular belief, *can* do a + * mount() on Windows + * </li> + * <li>If the target is a file in the source tree or under the output base, we use a hard + * link. Hard links only work within the same file system and you need write access to the + * target. We assume that the source tree is writable, and we know that the output base is. + * </li> + * <li>If the target is a file not in one of these locations, we raise an error. The only + * places where we need to do this is in the implementation of local repository rules, + * which will be special-cased.</li> + * </ul> + * + * <p>What does <b>not</b> work is using symbolic links: they need local administrator rights, + * which would make Bazel only usable as local admin. + * </p> */ WINDOWS_COMPATIBLE, } |