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

Revise not tracking subdirectories inside WSL2 when updating LOAD_PATH variable #615

Closed
juandarias opened this issue Mar 24, 2021 · 5 comments

Comments

@juandarias
Copy link

juandarias commented Mar 24, 2021

  • MWE
  1. Create a subdirectory src or any other name in your working directory. The working directory has to be inside a mounted windows partition

  2. Create a file MyModule.jl in subdirectory with content:

module MyModule

export anotherfunc

function anotherfunc(x)
    display(sin(x))
end

end
  1. Run julia from working directory and execute following code:
push!(LOAD_PATH, pwd()*"/src")
using Revise
using MyModule
anotherfunc(0)
  1. Edit MyModule.jl to display(cos(x)). Output of anotherfunc(0) in REPL doesn't change
  • System
  1. Julia 1.5.2
  2. Revise 3.1.14
  3. Ubuntu 18.04 in WSL2
@fredrikekre
Copy link
Collaborator

Can't reproduce. Perhaps you were loading MyModule from an earlier entry in LOAD_PATH? What happens if you instead of push! use pushfirst!?

@juandarias
Copy link
Author

juandarias commented Mar 24, 2021

@fredrikekre: It seems to be because the folder and files were inside a mounted partition inside WSL2!

So actually I am using WSL2 with Ubuntu 18.04, and the tests I performed were with files inside the mounted Windows partition. So any test with files inside "/mnt/c/" fails.

With files inside the Linux filesystem, the behavior of Revise is the expected one.

Perhaps, this is not an issue of Revise at all.

@fredrikekre
Copy link
Collaborator

Ok, probably #514 then?

@juandarias
Copy link
Author

Yes, that seems to be the problem. Only for the record, if the module is in the working directory and not a subdirectory, the behaviour is the correct one.

@juandarias juandarias changed the title Revise not tracking subdirectories when updating LOAD_PATH variable Revise not tracking subdirectories inside WSL2 when updating LOAD_PATH variable Mar 25, 2021
@timholy
Copy link
Owner

timholy commented Aug 7, 2021

I'll close this as a near-duplicate of #514, but I linked back here for the info re subdirectories. Thanks to both!

@timholy timholy closed this as completed Aug 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants