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

Incompatible with the built-in @profview of VSCode #23

Closed
taketo1024 opened this issue Aug 24, 2022 · 3 comments
Closed

Incompatible with the built-in @profview of VSCode #23

taketo1024 opened this issue Aug 24, 2022 · 3 comments

Comments

@taketo1024
Copy link

GaloisFields seems to be incompatible with the built-in @profview of VSCode.
When I run the following simple code:

using GaloisFields
@profview println("hello")

I get the error:

ERROR: LoadError: UndefVarError: F not defined
Stacktrace:
  [1] Base.Broadcast.BroadcastStyle(T::Type{Tuple{}})
    @ GaloisFields.Broadcast ~/.julia/packages/GaloisFields/41126/src/Broadcast.jl:59
  [2] combine_styles(c::Tuple{})
    @ Base.Broadcast ./broadcast.jl:435
  [3] broadcasted(::Function, ::Tuple{})
    @ Base.Broadcast ./broadcast.jl:1298
  [4] var"@profview"(__source__::LineNumberNode, __module__::Module, ex::Any, args::Vararg{Any})
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.7.5/scripts/packages/VSCodeServer/src/profiler.jl:132
  [5] eval
    @ ./boot.jl:368 [inlined]
  [6] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:1428
  [7] include_string(m::Module, txt::String, fname::String)
    @ Base ./loading.jl:1438
  [8] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base ./essentials.jl:729
  [9] invokelatest(::Any, ::Any, ::Vararg{Any})
    @ Base ./essentials.jl:726
 [10] inlineeval(m::Module, code::String, code_line::Int64, code_column::Int64, file::String; softscope::Bool)
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.7.5/scripts/packages/VSCodeServer/src/eval.jl:233
 [11] (::VSCodeServer.var"#66#70"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.7.5/scripts/packages/VSCodeServer/src/eval.jl:157
 [12] withpath(f::VSCodeServer.var"#66#70"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, path::String)
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.7.5/scripts/packages/VSCodeServer/src/repl.jl:249
 [13] (::VSCodeServer.var"#65#69"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.7.5/scripts/packages/VSCodeServer/src/eval.jl:155
 [14] hideprompt(f::VSCodeServer.var"#65#69"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.7.5/scripts/packages/VSCodeServer/src/repl.jl:38
 [15] (::VSCodeServer.var"#64#68"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.7.5/scripts/packages/VSCodeServer/src/eval.jl:126
 [16] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:511
 [17] with_logger
    @ ./logging.jl:623 [inlined]
 [18] (::VSCodeServer.var"#63#67"{VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.7.5/scripts/packages/VSCodeServer/src/eval.jl:225
 [19] #invokelatest#2
    @ ./essentials.jl:729 [inlined]
 [20] invokelatest(::Any)
    @ Base ./essentials.jl:726
 [21] macro expansion
    @ ~/.vscode/extensions/julialang.language-julia-1.7.5/scripts/packages/VSCodeServer/src/eval.jl:34 [inlined]
 [22] (::VSCodeServer.var"#61#62")()
    @ VSCodeServer ./task.jl:484

I'd be glad if you could tell me a workaround for this issue.

tkluck added a commit that referenced this issue Aug 24, 2022
This is issue #23, thanks to @taketo1024 for finding and reporting it.
Also thanks to stackoverflow user Bogumił Kamiński for explaining how to
use a combination of Tuple and Varargs instead [1].

[1]: https://stackoverflow.com/questions/54217348/functions-taking-ntuple-as-arguments-but-imposing-static-size-constraints-how
@tkluck
Copy link
Owner

tkluck commented Aug 24, 2022

Thanks for reporting! I think I just fixed this and I'll push a new release.

@tkluck tkluck closed this as completed Aug 24, 2022
@tkluck
Copy link
Owner

tkluck commented Aug 24, 2022

Fixed in v1.2.1, to which you can upgrade when JuliaRegistries/General#66991 is merged.

@taketo1024
Copy link
Author

Thank you very much!
I have confirmed that @profview works fine in v1.2.1.

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

2 participants