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

Tests without Pluto #9

Merged
merged 5 commits into from
Mar 2, 2022
Merged

Tests without Pluto #9

merged 5 commits into from
Mar 2, 2022

Conversation

fonsp
Copy link
Member

@fonsp fonsp commented Dec 14, 2021

PlutoHooks should 'work' when running without Pluto, right?

For example, this would let me develop a web server inside pluto with hooks to cleanup routes and such, and then run the server with julia notebook.jl

@fonsp fonsp marked this pull request as draft December 14, 2021 09:54
@Pangoraw
Copy link
Member

@dralletje do you have a particular idea for this now ? 😃

Not yet sure how these should react when they are called outside of Pluto...
So... Uhhh..., they throw an error now!

@dralletje
Copy link
Member

Yeah, I think they should basically just "melt away".

My idea:
Ref and memo should "just" return the value.
State should return the value and setstate should be a no-op.
Effect should "just" run the initializer and throw away the disposer.

That's all right?

Was wondering if ref should preserve it's state even outside of Pluto, but honestly I think that doesn't make much sense: that would only apply when the code containing the macro is run multiple times, but that shouldn't even ever happen.. Ideally I'd even build in ways to detect that case and throw.

@Pangoraw Pangoraw marked this pull request as ready for review March 2, 2022 20:35
@Pangoraw Pangoraw merged commit ecc88b9 into main Mar 2, 2022
@Pangoraw Pangoraw deleted the tests-without-pluto branch March 2, 2022 20:40
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

Successfully merging this pull request may close these issues.

None yet

3 participants