# Revise not working in WSL2?

**URL:** <https://discourse.julialang.org/t/revise-not-working-in-wsl2/105981>\
**Category:** General Usage\
**Tags:** revise\
**Created:** [November 9, 2023, 8:57am UTC](https://discourse.julialang.org/t/revise-not-working-in-wsl2/105981 "2023-11-09T08:57:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris101112](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chris101112/32/30997_2.png) [@chris101112](https://discourse.julialang.org/u/chris101112)\
**Post date:** [November 9, 2023, 8:57am UTC](https://discourse.julialang.org/t/revise-not-working-in-wsl2/105981/1 "2023-11-09T08:57:21Z")

</div>

I have created a simple test project with the following structure:

```bash
.
├── Manifest.toml
├── Project.toml
├── main.jl
└── src
    └── TestRevise.jl

```

`TestRevise.jl`:

```julia
module TestRevise

export greet

greet() = print("Hello World!")

end

```

`main.jl`:

```julia
using Revise
using TestRevise

greet()

```

I activate the Julia project and run the main.jl in the REPL:

```bash
julia --project=.
julia> include("main.jl")
Hello World!

```

Then I change `greet` as follows:

```julia
greet() = print("Hello!")

```

And run main again:

```bash
julia> include("main.jl")

```

However, it still outputs “Hello World!”, so Revise seems to be not working at all.

Why?

---

<div class="post-metadata">

**Author:** ![Olivier\_Merchiers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivier_merchiers/32/4073_2.png) [@Olivier\_Merchiers](https://discourse.julialang.org/u/Olivier_Merchiers)\
**Post date:** [November 9, 2023, 9:20am UTC](https://discourse.julialang.org/t/revise-not-working-in-wsl2/105981/2 "2023-11-09T09:20:39Z")

</div>

Hi!  
Welcome to Julia discourse.

If I understand correctly TestRevise is a package.  
Then the only thing you need to do is

```julia
julia --project=.
julia> includet("main.jl")
Hello World!

```

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.

Best,  
Olivier

---

<div class="post-metadata">

**Author:** ![chris101112](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chris101112/32/30997_2.png) [@chris101112](https://discourse.julialang.org/u/chris101112)\
**Post date:** [November 9, 2023, 9:27am UTC](https://discourse.julialang.org/t/revise-not-working-in-wsl2/105981/3 "2023-11-09T09:27:49Z")

</div>

Thank you for your reply. I tried this:

```bash
julia> using Revise

julia> includet("main.jl")
[Info: Precompiling TestRevise [02a7098f-09b0-4b01-acae-27578462e065]
Hello World!

# Changing to `greet()` to output "Hello"
julia> includet("main.jl")

# --> does not output anything anymore

```

Calling via `includet` after editing `greet()` results in no output at all.

---

<div class="post-metadata">

**Author:** ![Olivier\_Merchiers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivier_merchiers/32/4073_2.png) [@Olivier\_Merchiers](https://discourse.julialang.org/u/Olivier_Merchiers)\
**Post date:** [November 9, 2023, 9:42am UTC](https://discourse.julialang.org/t/revise-not-working-in-wsl2/105981/4 "2023-11-09T09:42:25Z")

</div>

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

```julia
julia --project=.
julia> includet("main.jl")
Hello World!
# You then modify TestRevise.jl by making the change greet() = print("Hello!")
julia> greet()
Hello!

```

---

<div class="post-metadata">

**Author:** ![chris101112](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chris101112/32/30997_2.png) [@chris101112](https://discourse.julialang.org/u/chris101112)\
**Post date:** [November 9, 2023, 9:54am UTC](https://discourse.julialang.org/t/revise-not-working-in-wsl2/105981/5 "2023-11-09T09:54:22Z")

</div>

This does not work either. But I think I have found the issue.

I am using WSL2 and a mounted Windows drive:

> **[Configuration · Revise.jl](https://timholy.github.io/Revise.jl/stable/config/#Polling-and-NFS-mounted-code-directories)**
>
> Documentation for Revise.jl.

After setting

```julia
export JULIA_REVISE_POLL=1

```

in the `~/.bashrc` it works.

---

<div class="post-metadata">

**Author:** ![Olivier\_Merchiers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivier_merchiers/32/4073_2.png) [@Olivier\_Merchiers](https://discourse.julialang.org/u/Olivier_Merchiers)\
**Post date:** [November 9, 2023, 10:24am UTC](https://discourse.julialang.org/t/revise-not-working-in-wsl2/105981/6 "2023-11-09T10:24:59Z")

</div>

ok, good you found the real issue!
