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
julia> using Pkg, Revise
julia> Pkg.generate("DemonstrationPackage")
Generating project DemonstrationPackage:
DemonstrationPackage/Project.toml
DemonstrationPackage/src/DemonstrationPackage.jl
Dict{String, Base.UUID} with 1 entry:
"DemonstrationPackage" => UUID("59767476-78e9-4613-8abe-91176a478dbc")
(@v1.11) pkg> activate DemonstrationPackage/
Activating project at `~/.julia/dev/DemonstrationPackage`
julia> open("DemonstrationPackage/src/DemonstrationPackage.jl", "w") do io
print(io, """
module DemonstrationPackage
struct NestedDict{K, V} <: AbstractDict{K, Union{V, NestedDict}} end
end
""")
end
julia> using DemonstrationPackage
[ Info: Precompiling DemonstrationPackage [59767476-78e9-4613-8abe-91176a478dbc]
julia> open("DemonstrationPackage/src/DemonstrationPackage.jl", "a") do io
println(io, "# Comment")
end
julia> 1+1
┌ Error: Failed to revise /home/x/.julia/dev/DemonstrationPackage/src/DemonstrationPackage.jl
│ exception =
│ invalid redefinition of constant DemonstrationPackage.NestedDict
│ Stacktrace:
│ [1] top-level scope
│ @ ~/.julia/dev/DemonstrationPackage/src/DemonstrationPackage.jl:3
│ Revise evaluation error at /home/x/.julia/dev/DemonstrationPackage/src/DemonstrationPackage.jl:3
│
└ @ Revise ~/.julia/packages/Revise/CawM1/src/packagedef.jl:776
┌ Warning: The running code does not match the saved version for the following files:
│
│ /home/x/.julia/dev/DemonstrationPackage/src/DemonstrationPackage.jl
│
│ If the error was due to evaluation order, it can sometimes be resolved by calling `Revise.retry()`.
│ Use Revise.errors() to report errors again. Only the first error in each file is shown.
│ Your prompt color may be yellow until the errors are resolved.
└ @ Revise ~/.julia/packages/Revise/CawM1/src/packagedef.jl:893
2
shell> cat DemonstrationPackage/src/DemonstrationPackage.jl
module DemonstrationPackage
struct NestedDict{K, V} <: AbstractDict{K, Union{V, NestedDict}} end
end
# Comment
The text was updated successfully, but these errors were encountered:
Reproducer on [email protected], [email protected]
The text was updated successfully, but these errors were encountered: