-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
BitIntegers does not work in Pluto #2984
Comments
A macro cannot be used in the same expression as the julia> begin
using BitIntegers
@define_integers 24
end
ERROR: LoadError: UndefVarError: `@define_integers` not defined
in expression starting at REPL[4]:3 |
I seem to have gone too far with providing a minimum non-working example, thanks for pointing out the problem (and sorry for testing the code in the REPL outside of the However, the issue is that BigIntegers does not work in Pluto: using BitIntegers @define_integers 24 throws an error on the REPL which started
Writing it separately seems to work initially, but it then fails permanently for the session. It seems that it can be triggered by changing |
@Pangoraw Could you please reopen the issue, as the problem persists, only the MWE was incorrect. As a temporary workaround, the following seems to work: using BitIntegers try
@define_integers 24
catch
end |
@PatrickHaecker are you by chance on julia 1.11? Can you try if this does not throw that error on 1.10? This seems related to #2907 and JuliaPluto/Malt.jl#77 |
This is indeed the same as #2907 |
Yes, I am on 1.11 indeed. Sorry that I forgot to mention this. Thanks for #3000. I installed Pluto#main and both the above mentioned error in the browser as well as the error in the REPL which started Pluto are gone. However, I now get
when switching between The problem seems to be this line
When I have a Pluto notebook with only this line and change it to
the error is triggered. Switching it back to 24 bits does not fix it. The error persists until I restart the Pluto notebook. |
Thanks for reporting this one, this should be fixed by updating ExpressionExplorer.jl to 1.0.3. |
Thanks a lot for fixing that one! However, I now get quite some errors on the starting REPL where the
Please give me a hint if I should change versions. [ Info: It looks like you are developing the Pluto package, using the unbundled frontend...
Precompiling PlutoRunner...
1 dependency successfully precompiled in 12 seconds. 32 already precompiled.
┌ Warning: unknown use of `=`. Assignee is unrecognised.
│ ex = :($(Expr(:$, :acc)))
└ @ ExpressionExplorer ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:177
┌ Warning: unknown use of `=`. Assignee is unrecognised.
│ ex = :($(Expr(:$, :acc)))
└ @ ExpressionExplorer ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:177
┌ Warning: unknown use of `=`. Assignee is unrecognised.
│ ex = :($(Expr(:$, :acc)))
└ @ ExpressionExplorer ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:177
┌ Error: Expression explorer failed on:
│ ex = :(primitive type $(Expr(:escape, :InfrastructureElementType)) <: Enum{Int32} 32 end)
└ @ ExpressionExplorer ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:1178
AssertionError: ex.head === :curly
Stacktrace:
[1] uncurly!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:195
[2] explore_funcdef!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:978
[3] explore_funcdef!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:924
[4] explore_function_macro!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:554
[5] explore!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:798
[6] explore_struct!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:527
[7] explore_primitive!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:540
[8] explore!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:794
[9] compute_symbolreferences
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:1185 [inlined]
[10] compute_symbols_state
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:1173
[11] pretransform_pluto
@ ~/.julia/packages/PlutoDependencyExplorer/AB0rJ/src/ExpressionExplorer.jl:43
[12] #1
@ ./none:0
[13] iterate
@ ./generator.jl:48
[14] pretransform_pluto
@ ~/.julia/packages/PlutoDependencyExplorer/AB0rJ/src/ExpressionExplorer.jl:78
[15] pretransform_pluto
@ ~/.julia/packages/PlutoDependencyExplorer/AB0rJ/src/ExpressionExplorer.jl:66
[16] #1
@ ./none:0
[17] iterate
@ ./generator.jl:48
[18] pretransform_pluto
@ ~/.julia/packages/PlutoDependencyExplorer/AB0rJ/src/ExpressionExplorer.jl:78
[19] #updated_topology#46
@ ~/.julia/packages/PlutoDependencyExplorer/AB0rJ/src/TopologyUpdate.jl:44
[20] updated_topology
@ ~/.julia/packages/PlutoDependencyExplorer/AB0rJ/src/TopologyUpdate.jl:25 [inlined]
[21] updated_topology
@ ~/.julia/packages/Pluto/N16V2/src/analysis/Parse.jl:125 [inlined]
[22] #load_notebook#58
@ ~/.julia/packages/Pluto/N16V2/src/notebook/saving and loading.jl:361
[23] load_notebook
@ ~/.julia/packages/Pluto/N16V2/src/notebook/saving and loading.jl:349 [inlined]
[24] #open#2
@ ~/.julia/packages/Pluto/N16V2/src/webserver/SessionActions.jl:68
[25] open
@ ~/.julia/packages/Pluto/N16V2/src/webserver/SessionActions.jl:44 [inlined]
[26] (::Pluto.var"#try_launch_notebook_response#296"{Pluto.var"#try_launch_notebook_response#290#297"{Pluto.ServerSession}})(action::typeof(Pluto.SessionActions.open), path_or_url::String; as_redirect::Bool, title::String, advice::String, home_url::String, action_kwargs::@Kwargs{execution_allowed::Bool, as_sample::Bool, risky_file_source::Nothing})
@ Pluto ~/.julia/packages/Pluto/N16V2/src/webserver/Router.jl:23
[27] (::Pluto.var"#serve_openfile#299"{Pluto.ServerSession})(request::HTTP.Messages.Request)
@ Pluto ~/.julia/packages/Pluto/N16V2/src/webserver/Router.jl:51
[28] (::HTTP.Handlers.Router{typeof(Pluto.default_404), typeof(HTTP.Handlers.default405), Nothing})(req::HTTP.Messages.Request)
@ HTTP.Handlers ~/.julia/packages/HTTP/sJD5V/src/Handlers.jl:439
[29] (::Pluto.var"#283#285"{HTTP.Handlers.Router{typeof(Pluto.default_404), typeof(HTTP.Handlers.default405), Nothing}})(request::HTTP.Messages.Request)
@ Pluto ~/.julia/packages/Pluto/N16V2/src/webserver/Authentication.jl:102
[30] #280
@ ~/.julia/packages/Pluto/N16V2/src/webserver/Authentication.jl:54 [inlined]
[31] (::Pluto.var"#378#388"{Pluto.ServerSession, Pluto.var"#280#282"{Pluto.var"#283#285"{HTTP.Handlers.Router{typeof(Pluto.default_404), typeof(HTTP.Handlers.default405), Nothing}}, Pluto.ServerSession}})(http::HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.Connections.Connection{Sockets.TCPSocket}})
@ Pluto ~/.julia/packages/Pluto/N16V2/src/webserver/WebServer.jl:289
[32] #invokelatest#2
@ ./essentials.jl:1043 [inlined]
[33] invokelatest
@ ./essentials.jl:1040 [inlined]
[34] handle_connection(f::Function, c::HTTP.Connections.Connection{Sockets.TCPSocket}, listener::HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, readtimeout::Int64, access_log::Nothing)
@ HTTP.Servers ~/.julia/packages/HTTP/sJD5V/src/Servers.jl:469
[35] (::HTTP.Servers.var"#16#17"{Pluto.var"#378#388"{Pluto.ServerSession, Pluto.var"#280#282"{Pluto.var"#283#285"{HTTP.Handlers.Router{typeof(Pluto.default_404), typeof(HTTP.Handlers.default405), Nothing}}, Pluto.ServerSession}}, HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, Set{HTTP.Connections.Connection}, Int64, Nothing, ReentrantLock, Base.Semaphore, HTTP.Connections.Connection{Sockets.TCPSocket}})()
@ HTTP.Servers ~/.julia/packages/HTTP/sJD5V/src/Servers.jl:401┌ Warning: unknown use of `=`. Assignee is unrecognised.
│ ex = :($(Expr(:$, :acc)))
└ @ ExpressionExplorer ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:177
┌ Warning: unknown use of `=`. Assignee is unrecognised.
│ ex = :($(Expr(:$, :acc)))
└ @ ExpressionExplorer ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:177
┌ Warning: unknown use of `=`. Assignee is unrecognised.
│ ex = :($(Expr(:$, :acc)))
└ @ ExpressionExplorer ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:177
┌ Error: Expression explorer failed on:
│ ex = :(primitive type $(Expr(:escape, :InfrastructureElementType)) <: Enum{Int32} 32 end)
└ @ ExpressionExplorer ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:1178
AssertionError: ex.head === :curly
Stacktrace:
[1] uncurly!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:195
[2] explore_funcdef!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:978
[3] explore_funcdef!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:924
[4] explore_function_macro!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:554
[5] explore!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:798
[6] explore_struct!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:527
[7] explore_primitive!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:540
[8] explore!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:794
[9] compute_symbolreferences
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:1185 [inlined]
[10] compute_symbols_state
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:1173
[11] pretransform_pluto
@ ~/.julia/packages/PlutoDependencyExplorer/AB0rJ/src/ExpressionExplorer.jl:43
[12] #1
@ ./none:0
[13] iterate
@ ./generator.jl:48
[14] pretransform_pluto
@ ~/.julia/packages/PlutoDependencyExplorer/AB0rJ/src/ExpressionExplorer.jl:78
[15] #1
@ ./none:0
[16] iterate
@ ./generator.jl:48
[17] pretransform_pluto
@ ~/.julia/packages/PlutoDependencyExplorer/AB0rJ/src/ExpressionExplorer.jl:78
[18] static_macroexpand
@ ~/.julia/packages/Pluto/N16V2/src/evaluation/MacroAnalysis.jl:188
[19] #112
@ ./none:0 [inlined]
[20] iterate
@ ./generator.jl:48 [inlined]
[21] Dict
@ ./dict.jl:95
[22] static_resolve_topology
@ ~/.julia/packages/Pluto/N16V2/src/evaluation/MacroAnalysis.jl:202
[23] |>
@ ./operators.jl:926 [inlined]
[24] #load_notebook#58
@ ~/.julia/packages/Pluto/N16V2/src/notebook/saving and loading.jl:361
[25] load_notebook
@ ~/.julia/packages/Pluto/N16V2/src/notebook/saving and loading.jl:349 [inlined]
[26] #open#2
@ ~/.julia/packages/Pluto/N16V2/src/webserver/SessionActions.jl:68
[27] open
@ ~/.julia/packages/Pluto/N16V2/src/webserver/SessionActions.jl:44 [inlined]
[28] (::Pluto.var"#try_launch_notebook_response#296"{Pluto.var"#try_launch_notebook_response#290#297"{Pluto.ServerSession}})(action::typeof(Pluto.SessionActions.open), path_or_url::String; as_redirect::Bool, title::String, advice::String, home_url::String, action_kwargs::@Kwargs{execution_allowed::Bool, as_sample::Bool, risky_file_source::Nothing})
@ Pluto ~/.julia/packages/Pluto/N16V2/src/webserver/Router.jl:23
[29] (::Pluto.var"#serve_openfile#299"{Pluto.ServerSession})(request::HTTP.Messages.Request)
@ Pluto ~/.julia/packages/Pluto/N16V2/src/webserver/Router.jl:51
[30] (::HTTP.Handlers.Router{typeof(Pluto.default_404), typeof(HTTP.Handlers.default405), Nothing})(req::HTTP.Messages.Request)
@ HTTP.Handlers ~/.julia/packages/HTTP/sJD5V/src/Handlers.jl:439
[31] (::Pluto.var"#283#285"{HTTP.Handlers.Router{typeof(Pluto.default_404), typeof(HTTP.Handlers.default405), Nothing}})(request::HTTP.Messages.Request)
@ Pluto ~/.julia/packages/Pluto/N16V2/src/webserver/Authentication.jl:102
[32] #280
@ ~/.julia/packages/Pluto/N16V2/src/webserver/Authentication.jl:54 [inlined]
[33] (::Pluto.var"#378#388"{Pluto.ServerSession, Pluto.var"#280#282"{Pluto.var"#283#285"{HTTP.Handlers.Router{typeof(Pluto.default_404), typeof(HTTP.Handlers.default405), Nothing}}, Pluto.ServerSession}})(http::HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.Connections.Connection{Sockets.TCPSocket}})
@ Pluto ~/.julia/packages/Pluto/N16V2/src/webserver/WebServer.jl:289
[34] #invokelatest#2
@ ./essentials.jl:1043 [inlined]
[35] invokelatest
@ ./essentials.jl:1040 [inlined]
[36] handle_connection(f::Function, c::HTTP.Connections.Connection{Sockets.TCPSocket}, listener::HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, readtimeout::Int64, access_log::Nothing)
@ HTTP.Servers ~/.julia/packages/HTTP/sJD5V/src/Servers.jl:469
[37] (::HTTP.Servers.var"#16#17"{Pluto.var"#378#388"{Pluto.ServerSession, Pluto.var"#280#282"{Pluto.var"#283#285"{HTTP.Handlers.Router{typeof(Pluto.default_404), typeof(HTTP.Handlers.default405), Nothing}}, Pluto.ServerSession}}, HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, Set{HTTP.Connections.Connection}, Int64, Nothing, ReentrantLock, Base.Semaphore, HTTP.Connections.Connection{Sockets.TCPSocket}})()
@ HTTP.Servers ~/.julia/packages/HTTP/sJD5V/src/Servers.jl:401┌ Warning: unknown use of `=`. Assignee is unrecognised.
│ ex = :($(Expr(:$, :acc)))
└ @ ExpressionExplorer ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:177
┌ Warning: unknown use of `=`. Assignee is unrecognised.
│ ex = :($(Expr(:$, :acc)))
└ @ ExpressionExplorer ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:177
┌ Warning: unknown use of `=`. Assignee is unrecognised.
│ ex = :($(Expr(:$, :acc)))
└ @ ExpressionExplorer ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:177
┌ Error: Expression explorer failed on:
│ ex = :(primitive type $(Expr(:escape, :InfrastructureElementType)) <: Enum{Int32} 32 end)
└ @ ExpressionExplorer ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:1178
AssertionError: ex.head === :curly
Stacktrace:
[1] uncurly!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:195
[2] explore_funcdef!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:978
[3] explore_funcdef!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:924
[4] explore_function_macro!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:554
[5] explore!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:798
[6] explore_struct!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:527
[7] explore_primitive!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:540
[8] explore!
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:794
[9] compute_symbolreferences
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:1185 [inlined]
[10] compute_symbols_state
@ ~/.julia/packages/ExpressionExplorer/3RpwT/src/explore.jl:1173
[11] pretransform_pluto
@ ~/.julia/packages/PlutoDependencyExplorer/AB0rJ/src/ExpressionExplorer.jl:43
[12] #1
@ ./none:0
[13] iterate
@ ./generator.jl:48
[14] pretransform_pluto
@ ~/.julia/packages/PlutoDependencyExplorer/AB0rJ/src/ExpressionExplorer.jl:78
[15] pretransform_pluto
@ ~/.julia/packages/PlutoDependencyExplorer/AB0rJ/src/ExpressionExplorer.jl:66
[16] #1
@ ./none:0
[17] iterate
@ ./generator.jl:48
[18] pretransform_pluto
@ ~/.julia/packages/PlutoDependencyExplorer/AB0rJ/src/ExpressionExplorer.jl:78
[19] #updated_topology#46
@ ~/.julia/packages/PlutoDependencyExplorer/AB0rJ/src/TopologyUpdate.jl:44
[20] updated_topology
@ ~/.julia/packages/PlutoDependencyExplorer/AB0rJ/src/TopologyUpdate.jl:25 [inlined]
[21] updated_topology
@ ~/.julia/packages/Pluto/N16V2/src/analysis/Parse.jl:125 [inlined]
[22] #update_save_run!#231
@ ~/.julia/packages/Pluto/N16V2/src/evaluation/Run.jl:383
[23] update_save_run!
@ ~/.julia/packages/Pluto/N16V2/src/evaluation/Run.jl:370 [inlined]
[24] #open#2
@ ~/.julia/packages/Pluto/N16V2/src/webserver/SessionActions.jl:99
[25] open
@ ~/.julia/packages/Pluto/N16V2/src/webserver/SessionActions.jl:44 [inlined]
[26] (::Pluto.var"#try_launch_notebook_response#296"{Pluto.var"#try_launch_notebook_response#290#297"{Pluto.ServerSession}})(action::typeof(Pluto.SessionActions.open), path_or_url::String; as_redirect::Bool, title::String, advice::String, home_url::String, action_kwargs::@Kwargs{execution_allowed::Bool, as_sample::Bool, risky_file_source::Nothing})
@ Pluto ~/.julia/packages/Pluto/N16V2/src/webserver/Router.jl:23
[27] (::Pluto.var"#serve_openfile#299"{Pluto.ServerSession})(request::HTTP.Messages.Request)
@ Pluto ~/.julia/packages/Pluto/N16V2/src/webserver/Router.jl:51
[28] (::HTTP.Handlers.Router{typeof(Pluto.default_404), typeof(HTTP.Handlers.default405), Nothing})(req::HTTP.Messages.Request)
@ HTTP.Handlers ~/.julia/packages/HTTP/sJD5V/src/Handlers.jl:439
[29] (::Pluto.var"#283#285"{HTTP.Handlers.Router{typeof(Pluto.default_404), typeof(HTTP.Handlers.default405), Nothing}})(request::HTTP.Messages.Request)
@ Pluto ~/.julia/packages/Pluto/N16V2/src/webserver/Authentication.jl:102
[30] #280
@ ~/.julia/packages/Pluto/N16V2/src/webserver/Authentication.jl:54 [inlined]
[31] (::Pluto.var"#378#388"{Pluto.ServerSession, Pluto.var"#280#282"{Pluto.var"#283#285"{HTTP.Handlers.Router{typeof(Pluto.default_404), typeof(HTTP.Handlers.default405), Nothing}}, Pluto.ServerSession}})(http::HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.Connections.Connection{Sockets.TCPSocket}})
@ Pluto ~/.julia/packages/Pluto/N16V2/src/webserver/WebServer.jl:289
[32] #invokelatest#2
@ ./essentials.jl:1043 [inlined]
[33] invokelatest
@ ./essentials.jl:1040 [inlined]
[34] handle_connection(f::Function, c::HTTP.Connections.Connection{Sockets.TCPSocket}, listener::HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, readtimeout::Int64, access_log::Nothing)
@ HTTP.Servers ~/.julia/packages/HTTP/sJD5V/src/Servers.jl:469
[35] (::HTTP.Servers.var"#16#17"{Pluto.var"#378#388"{Pluto.ServerSession, Pluto.var"#280#282"{Pluto.var"#283#285"{HTTP.Handlers.Router{typeof(Pluto.default_404), typeof(HTTP.Handlers.default405), Nothing}}, Pluto.ServerSession}}, HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, Set{HTTP.Connections.Connection}, Int64, Nothing, ReentrantLock, Base.Semaphore, HTTP.Connections.Connection{Sockets.TCPSocket}})()
@ HTTP.Servers ~/.julia/packages/HTTP/sJD5V/src/Servers.jl:401 |
The following code does not work in Pluto, but works in a REPL:
Pluto shows the following error:
The text was updated successfully, but these errors were encountered: