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

FileWatching has issues with WSL2 #37029

Open
nhabedi opened this issue Aug 13, 2020 · 2 comments
Open

FileWatching has issues with WSL2 #37029

nhabedi opened this issue Aug 13, 2020 · 2 comments
Labels
system:windows Affects only Windows upstream The issue is with an upstream dependency, e.g. LLVM

Comments

@nhabedi
Copy link

nhabedi commented Aug 13, 2020

This was originally a comment on an issue with Revise.jl, but Tim Holy recommended filing this as a Julia bug, so this is what I'm doing now.

It seems FileWatching has problems with WSL2. Below is what I can reproduce. The gist of it seems to be that FileWatching works within the "native" file system of WSL, but ceases to work in the normal Windows file system. (One funny thing is that it makes a slight difference if the file is modified from a WSL program - but only if you watch the directory it's in. That's the last working case below.)

julia> using FileWatching

julia> watch_file("/tmp/")
# change /tmp/foo from WSL bash
FileWatching.FileEvent(false, true, false) 

julia> watch_file("/tmp/foo")
# change /tmp/foo from WSL bash
FileWatching.FileEvent(false, true, false)

julia> watch_file("/tmp/")
# change /tmp/foo from Windows-Emacs
FileWatching.FileEvent(false, true, false) 

julia> watch_file("/tmp/foo")
# change /tmp/foo from Windows-Emacs
FileWatching.FileEvent(false, true, false)

julia> watch_file("/mnt/c/Users/edi/Desktop")
# change c:/Users/edi/Desktop/foo from WSL bash
FileWatching.FileEvent(false, true, false)

julia> watch_file("/mnt/c/Users/edi/Desktop/foo")
# change c:/Users/edi/Desktop/foo from WSL bash
# NOTHING HAPPENS

julia> watch_file("/mnt/c/Users/edi/Desktop")
# change c:/Users/edi/Desktop/foo from Windows-Emacs
# NOTHING HAPPENS

julia> watch_file("/mnt/c/Users/edi/Desktop/foo")
# change c:/Users/edi/Desktop/foo from Windows-Emacs
# NOTHING HAPPENS

julia> versioninfo()
Julia Version 1.4.2
Commit 44fa15b150* (2020-05-23 18:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
@jks-liu
Copy link

jks-liu commented Dec 16, 2020

This maybe a WSL issue, ref to microsoft/WSL#4739.

@StefanKarpinski StefanKarpinski added upstream The issue is with an upstream dependency, e.g. LLVM system:windows Affects only Windows labels Dec 16, 2020
@StefanKarpinski
Copy link
Member

It does look like an upstream bug. Thanks for the cross-link, @jks-liu!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system:windows Affects only Windows upstream The issue is with an upstream dependency, e.g. LLVM
Projects
None yet
Development

No branches or pull requests

3 participants