I have created a simple test project with the following structure:
greet() = print("Hello World!")
I activate the Julia project and run the main.jl in the REPL:
Then I change
greet as follows:
greet() = print("Hello!")
And run main again:
However, it still outputs “Hello World!”, so Revise seems to be not working at all.
Welcome to Julia discourse.
If I understand correctly TestRevise is a package.
Then the only thing you need to do is
Note the t in includet. This is a Revise function for tracking simple files.
I think this should work. You should be able to modifiy TestRevise.jl and without calling again includet(“main.jl”) you should be able to see the modifications.
Thank you for your reply. I tried this:
julia> using Revise
[ Info: Precompiling TestRevise [02a7098f-09b0-4b01-acae-27578462e065]
# Changing to `greet()` to output "Hello"
# --> does not output anything anymore
includet after editing
greet() results in no output at all.
So you don’t need to call includet(“main.jl”) again.
You call it just once, you then you make your modifications to TestRevise and/or main.jl you can call those modifications from the repl.
In your example you would just do from Julia repl
# You then modify TestRevise.jl by making the change greet() = print("Hello!")
This does not work either. But I think I have found the issue.
I am using WSL2 and a mounted Windows drive:
~/.bashrc it works.
ok, good you found the real issue!