You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think many people have known this is possible for a while.
Because compatibility is checked at package install time on a per enviroment basis.
And because modules are not reloaded (ever), including after changing enviroments.
Today I think I saw this in the wild.
Here is a way to reproduce what i saw posted in Slack:
# julia --startup-file=no# make for fresh enviromentsrm("a"; recursive=true, force=true); rm("b", recursive=true; force=true);
mkdir("a"); mkdir("b");
using Pkg
Pkg.activate("a")
pkg"add CodeTracking@1"using CodeTracking # Load CodeTracking@1
Pkg.activate("b")
pkg"add Revise@2.7.2"using Revise # Load Revise, which would load CodeTracking@5.9 but doesn't because CodeTracking@1 is already loaded# We have now put Revise in an invalid state because # Revise@2.7.2 is compatible only with CodeTracking@5.9, # and errors if it is used with CodeTracking@1# Demonstrate the error:pkg"add Example"using Example
pkg"dev --local Example"
Revise will then flip-out because the API of CodeTracking is not what it said it was compatible with.
(b) pkg> Revise.LogRecord(Error, evaluation error starting at /Users/oxinabox/.julia/packages/Example/aqsx3/src/Example.jl:4, lowered
, Revise_e943ed8b, "/Users/oxinabox/.julia/packages/Revise/tV8FE/src/lowered.jl", 106, (mod=Example, ex=begin#= /Users/oxinabox/.julia/packages/Example/aqsx3/src/Example.jl:4 =#hello(who::String) =begin#= /Users/oxinabox/.julia/packages/Example/aqsx3/src/Example.jl:9 =#"Hello, $(who)"endend)MethodError: Cannot `convert` an object of type Tuple{LineNumberNode,Expr} to an object of type Array{Tuple{LineNumberNode,Expr},
1}
...
Stacktrace:
[1] convert(::Type{Union{Missing, Array{Tuple{LineNumberNode,Expr},1}}}, ::Tuple{LineNumberNode,Expr}) at ./missing.jl:69
[2] setindex!(::IdDict{Type,Union{Missing, Array{Tuple{LineNumberNode,Expr},1}}}, ::Any, ::Any) at ./abstractdict.jl:585
[3] add_signature!(::Revise.CodeTrackingMethodInfo, ::Any, ::LineNumberNode) at /Users/oxinabox/.julia/packages/Revise/tV8FE/src/Rev
ise.jl:489)Revise.LogRecord(Error, evaluation error starting at /Users/oxinabox/.julia/packages/Example/aqsx3/src/Example.jl:11, lowe
red, Revise_e943ed8b, "/Users/oxinabox/.julia/packages/Revise/tV8FE/src/lowered.jl", 106, (mod=Example, ex=begin#= /Users/oxinabox/.julia/packages/Example/aqsx3/src/Example.jl:11 =#domath(x::Number) =begin#= /Users/oxinabox/.julia/packages/Example/aqsx3/src/Example.jl:16 =#
x +5end
The text was updated successfully, but these errors were encountered:
I think many people have known this is possible for a while.
Because compatibility is checked at package install time on a per enviroment basis.
And because modules are not reloaded (ever), including after changing enviroments.
Today I think I saw this in the wild.
Here is a way to reproduce what i saw posted in Slack:
Revise will then flip-out because the API of CodeTracking is not what it said it was compatible with.
The text was updated successfully, but these errors were encountered: