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

Packages that inject into Core/Base can't be unimported from a session #627

Closed
FelixBenning opened this issue Nov 1, 2020 · 9 comments · Fixed by #844
Closed

Packages that inject into Core/Base can't be unimported from a session #627

FelixBenning opened this issue Nov 1, 2020 · 9 comments · Fixed by #844
Labels
reactivity The Pluto programming paradigm

Comments

@FelixBenning
Copy link

I removed using Zygote at some point. Now I am getting an error _pullback(::Zygote.Context, ::typeof(Main.workspace250.flux), ::Float64)

Now this error probably do not have anything to do with pluto, but since Pluto aims to be reactive, it should probably stop using dependencies when the using/import statements were removed. So I probably should not get a reference to Zygote in my stacktrace. Well at least as long as Zygote is not in Base.

@fonsp
Copy link
Owner

fonsp commented Nov 1, 2020

Can you try to come up with a minimal working example?

@FelixBenning
Copy link
Author

grafik

after deletion:

grafik

copy and paste this: (Note that this is not a normal minus sign, apparently I fatfingered a unicode thing into a minus sign somewhere)

f(x) = x -̢ 1

@fonsp
Copy link
Owner

fonsp commented Nov 1, 2020

What happens if you run the last cell again after removing the import?

@FelixBenning
Copy link
Author

FelixBenning commented Nov 1, 2020

@fonsp The same error referencing Zygote (that is what I mean by "after deletion") - could you not reproduce that?

@fonsp
Copy link
Owner

fonsp commented Nov 1, 2020

Okay thanks! Haven't tried it yet 😅

@fonsp fonsp changed the title Dependencies are not reactive Packages that inject into Core/Base can't be unimported from a session Nov 1, 2020
@fonsp
Copy link
Owner

fonsp commented Nov 1, 2020

I think this can only be solved by restarting the julia process, but we probably don't want to do this automatically when you remove a using. Hmm... Maybe keep a list of "dangerous" packages that inject into Base?

@fonsp
Copy link
Owner

fonsp commented Nov 1, 2020

Much more important is #24, (which would also be solved by restarting the process).

@fonsp fonsp added the reactivity The Pluto programming paradigm label Nov 19, 2020
@mcabbott
Copy link
Contributor

This seems to be FluxML/Zygote.jl#260 BTW -- Zygote is committing piracy, not just adding methods.

@fonsp fonsp linked a pull request May 4, 2021 that will close this issue
66 tasks
@fonsp fonsp closed this as completed May 4, 2021
@fonsp
Copy link
Owner

fonsp commented May 4, 2021

Not something that we are responsible for fixing, but #844 will recommend restarting the notebook after you remove an import.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reactivity The Pluto programming paradigm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants