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

Seems like problem that Revise doesn't work in Visual Studio Code notebooks has never been fixed #865

Closed
lewisl opened this issue Nov 15, 2024 · 2 comments

Comments

@lewisl
Copy link

lewisl commented Nov 15, 2024

IJulia created a "default" kernel when in the Julia REPL.

Now, open a notebook, previously created in Jupyter in the browser in Visual Studio Code.

Add cells:
using Revise
Revise.revise()

Note that the notebook includes a source file using included().

Save the notebook and close Visual Studio Code (to make sure everything really restarts--see below, restart does work).
Open Visual Studio Code.
Open the notebook. Run all cells. All good.
Change a value assigned to a variable in the includet'ed source file and save it. This variable is the input to a function. Running that function in the notebook should show a changed result.

It does not. Hence, Revise isn't revising.

The only way to show the change is to Restart the kernel in the visual studio notebook.

I know this is old. I commented on it in 2019. The solution then was to "use" Revise and explicitly call Revise.revise(). The solution doesn't work.

@lewisl
Copy link
Author

lewisl commented Nov 15, 2024

So, to make this more mystifying, revise doesn't work when the same notebook is run after starting Jupyter lab from a shell using jupyter lab to open the notebook in the browser. Edit the included file and it has no effect.

My Julia is 1.10.6 on MacOS 15.1 and an Apple Silicon Mac. This stuff used work. Surely it is a config problem but I how should this be diagnosed?

Partial mea culpa! My original startup_ijulia.jl was:

try
    using Revise
catch e
    @warn "Error initializing Revise" exception = (e, catch_backtrace())
end

@eval is meant to prefix using Revise. So, I fixed that! Unfortunately, it has no effect.

@lewisl
Copy link
Author

lewisl commented Nov 15, 2024

Well, OOPS! MEA CULPA! The doc says Revise doesn't track data. I am changing a source file (that is includet'ed)--specifically a global variable within the source file. It's just used as test data. so, I am closing this!

@lewisl lewisl closed this as completed Nov 15, 2024
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

1 participant