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

1.10 broken? #63

Closed
ParadaCarleton opened this issue Sep 13, 2023 · 6 comments
Closed

1.10 broken? #63

ParadaCarleton opened this issue Sep 13, 2023 · 6 comments

Comments

@ParadaCarleton
Copy link

On the 1.10 beta, this seems to just not work; I'm getting the very long (unfolded) stacktraces again.

@BioTurboNick
Copy link
Owner

Could you please provide more detail? I'm not seeing a problem on 1.10.0-beta2

@ParadaCarleton
Copy link
Author

It might only be on VSCode that it's a problem? When I use a terminal REPL it seems to work.

Example:

julia> using Folds, Transducers, Chain;  # semicolon makes it error, rather than prompt user to install packages
ERROR: ArgumentError: Package Chain not found in current path, maybe you meant `import/using .Chain`.
- Otherwise, run `import Pkg; Pkg.add("Chain")` to install the Chain package.
Stacktrace:
  [1] macro expansion
    @ Base ./loading.jl:1766 [inlined]
  [2] macro expansion
    @ Base ./lock.jl:267 [inlined]
  [3] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1747
  [4] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
  [5] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1740
  [7] eval
    @ VSCodeServer ./boot.jl:383 [inlined]
  [8] eval
    @ VSCodeServer ./Base.jl:88 [inlined]
  [9] repleval(m::Module, code::Expr, ::String)
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.51.2/scripts/packages/VSCodeServer/src/repl.jl:229
 [10] (::VSCodeServer.var"#110#112"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.51.2/scripts/packages/VSCodeServer/src/repl.jl:192
 [11] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:515
 [12] with_logger
    @ VSCodeServer ./logging.jl:627 [inlined]
 [13] (::VSCodeServer.var"#109#111"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.51.2/scripts/packages/VSCodeServer/src/repl.jl:193
 [14] #invokelatest#2
    @ Base ./essentials.jl:887 [inlined]
 [15] invokelatest(::Any)
    @ Base ./essentials.jl:884
 [16] (::VSCodeServer.var"#62#63")()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.51.2/scripts/packages/VSCodeServer/src/eval.jl:34

@BioTurboNick
Copy link
Owner

This is what I see when I run Julia 1.10-beta2 inside VS Code and then use the "Connect external REPL" command:

julia> using AbbreviatedStackTraces
julia> using Folds;
ERROR: ArgumentError: Package Folds not found in current path.
- Run `import Pkg; Pkg.add("Folds")` to install the Folds package.       
Stacktrace:
   [1-5] ⋮ internal
       @ Base
     [6] require(into::Module, mod::Symbol)
       @ Base .\loading.jl:1740
     [7] eval
       @ VSCodeServer .\boot.jl:383 [inlined]
     [8] eval
       @ VSCodeServer .\Base.jl:88 [inlined]
     [9] repleval(m::Module, code::Expr, ::String)
       @ VSCodeServer c:\Users\nicho\.vscode\extensions\julialang.language-julia-1.51.2\scripts\packages\VSCodeServer\src\repl.jl:229
    [10] (::VSCodeServer.var"#110#112"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
       @ VSCodeServer c:\Users\nicho\.vscode\extensions\julialang.language-julia-1.51.2\scripts\packages\VSCodeServer\src\repl.jl:192
    [11] with_logstate(f::Function, logstate::Any)
       @ Base.CoreLogging .\logging.jl:515
    [12] with_logger
       @ VSCodeServer .\logging.jl:627 [inlined]
    [13] (::VSCodeServer.var"#109#111"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
       @ VSCodeServer c:\Users\nicho\.vscode\extensions\julialang.language-julia-1.51.2\scripts\packages\VSCodeServer\src\repl.jl:193
    [14] ⋮ internal
       @ Base
    [15] invokelatest(::Any)
       @ Base .\essentials.jl:884
    [16] (::VSCodeServer.var"#62#63")()
       @ VSCodeServer c:\Users\nicho\.vscode\extensions\julialang.language-julia-1.51.2\scripts\packages\VSCodeServer\src\eval.jl:34
Use `err` to retrieve the full stack trace.

What you posted shows nothing missing however, whereas mine does exclude some frames, though not enough. What's happening here is that it thinks VSCodeServer is user code; the method for detecting these frames wasn't in the right module.

Does defining this fix the issue for you?

AbbreviatedStackTraces.is_ide_support(path) = contains(path, r"[/\\].vscode[/\\]")

If this does not, it's something else.

@ParadaCarleton
Copy link
Author

ParadaCarleton commented Sep 14, 2023

Unfortunately not.

[ Info: Precompiling AbbreviatedStackTraces [ac637c84-cc71-43bf-9c33-c1b4316be3d4]
[ Info: Skipping precompilation since __precompile__(false). Importing AbbreviatedStackTraces [ac637c84-cc71-43bf-9c33-c1b4316be3d4].
julia> AbbreviatedStackTraces.is_ide_support(path) = contains(path, r"[/\\].vscode[/\\]")

julia> using Turing;
ERROR: ArgumentError: Package Turing not found in current path.
- Run `import Pkg; Pkg.add("Turing")` to install the Turing package.
Stacktrace:
  [1] macro expansion
    @ Base ./loading.jl:1766 [inlined]
  [2] macro expansion
    @ Base ./lock.jl:267 [inlined]
  [3] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1747
  [4] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
  [5] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1740
  [7] eval
    @ VSCodeServer ./boot.jl:383 [inlined]
  [8] eval
    @ VSCodeServer ./Base.jl:88 [inlined]
  [9] repleval(m::Module, code::Expr, ::String)
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.51.2/scripts/packages/VSCodeServer/src/repl.jl:229
 [10] (::VSCodeServer.var"#110#112"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.51.2/scripts/packages/VSCodeServer/src/repl.jl:192
 [11] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:515
 [12] with_logger
    @ VSCodeServer ./logging.jl:627 [inlined]
 [13] (::VSCodeServer.var"#109#111"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.51.2/scripts/packages/VSCodeServer/src/repl.jl:193
 [14] #invokelatest#2
    @ Base ./essentials.jl:887 [inlined]
 [15] invokelatest(::Any)
    @ Base ./essentials.jl:884
 [16] (::VSCodeServer.var"#62#63")()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.51.2/scripts/packages/VSCodeServer/src/eval.jl:34

@BioTurboNick
Copy link
Owner

Any chance you're trying to use it from startup.jl? #38

@ParadaCarleton
Copy link
Author

Yes! Thank you.

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