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

name field of TypeName is const on 1.8 #4

Open
KristofferC opened this issue Feb 19, 2022 · 1 comment
Open

name field of TypeName is const on 1.8 #4

KristofferC opened this issue Feb 19, 2022 · 1 comment

Comments

@KristofferC
Copy link

Just a heads up of a change in the internals in Julia for 1.8 that causes a breakage of this package:

valid: Error During Test at /home/pkgeval/.julia/packages/RedefStructs/JMYNd/test/runtests.jl:7
  Test threw exception
  Expression: begin
    #= /home/pkgeval/.julia/packages/RedefStructs/JMYNd/test/runtests.jl:7 =# @redef struct S
        end
    true
end
  setfield!: const field .name of type TypeName cannot be changed
  Stacktrace:
   [1] setproperty!(x::Core.TypeName, f::Symbol, v::Symbol)
     @ Base ./Base.jl:39
   [2] macro expansion
     @ ~/.julia/packages/RedefStructs/JMYNd/src/RedefStructs.jl:45 [inlined]
   [3] macro expansion
     @ /opt/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:464 [inlined]
   [4] macro expansion
     @ ~/.julia/packages/RedefStructs/JMYNd/test/runtests.jl:7 [inlined]
   [5] macro expansion

PkgEval log: https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_hash/f51f24c_vs_2ca8b0c/RedefStructs.primary.log

@FedericoStra
Copy link
Owner

Thanks a lot! It's been a while since I played with this package and I don't remember all the details so I'll have to take a closer look as soon as I find the time.

At a glance, I would say that if the fields of Core.TypeName are now constant (at least .name) then this package deserves to be thrown in the garbage bin. I'll see whether I manage to circumvent the new limitation or at least salvage something useful out of it.

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