-
Notifications
You must be signed in to change notification settings - Fork 111
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
Wrong "Invalid redefinition of type" for certain UnionAll
field types
#770
Comments
The above example seems to work on the latest master and v1.10-beta3 with Revise v3.5.7. What is your Julia version and Revise version? |
I did not try yet on v1.10 or master |
I managed to reproduce both on Julia |
Might be a dup of #753? |
Thanks for the MWE! Bad news: this may be a Julia bug. (Revise just exploits the standard Julia functionality here.) # don't load Revise
julia> mktemp() do f, io
write(io, """
struct A{T} end
struct B{T, S}
a::A{<:T}
end
""")
close(io)
include(f)
include(f)
end
ERROR: LoadError: invalid redefinition of type B
Stacktrace:
[1] top-level scope
@ /tmp/jl_KJFFPN:2
[2] include
@ ./client.jl:489 [inlined]
[3] (::var"#1#2")(f::String, io::IOStream)
@ Main ./REPL[1]:10
[4] mktemp(fn::var"#1#2", parent::String)
@ Base.Filesystem ./file.jl:738
[5] mktemp(fn::Function)
@ Base.Filesystem ./file.jl:736
[6] top-level scope
@ REPL[1]:1
in expression starting at /tmp/jl_KJFFPN:2 but changing |
Fixes #52686 Fixes timholy/Revise.jl#770 --------- Co-authored-by: Jameson Nash <[email protected]> Co-authored-by: Kristoffer Carlsson <[email protected]> Co-authored-by: Shuhei Kadowaki <[email protected]>
Fixes #52686 Fixes timholy/Revise.jl#770 --------- Co-authored-by: Jameson Nash <[email protected]> Co-authored-by: Kristoffer Carlsson <[email protected]> Co-authored-by: Shuhei Kadowaki <[email protected]>
Fixes JuliaLang#52686 Fixes timholy/Revise.jl#770 --------- Co-authored-by: Jameson Nash <[email protected]> Co-authored-by: Kristoffer Carlsson <[email protected]> Co-authored-by: Shuhei Kadowaki <[email protected]>
Minimal example:
results in
The above works (try in fresh session) if either:
A{<:T}
is replaced withA{T}
,S
is removed, orincludet
replaced by standardinclude
This breaks normal
Revise
workflow even if no types are changed at all.#734 possibly related.
The text was updated successfully, but these errors were encountered: