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

DataType's mutable field removal: put in NEWS.md or unintentional? #41049

Closed
daviehh opened this issue Jun 1, 2021 · 5 comments
Closed

DataType's mutable field removal: put in NEWS.md or unintentional? #41049

daviehh opened this issue Jun 1, 2021 · 5 comments

Comments

@daviehh
Copy link
Contributor

daviehh commented Jun 1, 2021

Up to the current 1.6.1 version, DataTypes have a mutable field

julia> Int.mutable
false

which seems to have gone in the 1.7 master branch:

julia> Int.mutable
ERROR: type DataType has no field mutable
Stacktrace:
 [1] getproperty(x::Type, f::Symbol)
   @ Base ./Base.jl:28
 [2] top-level scope
   @ REPL[1]:1

This has caused, e.g. BSON.jl to fail due to https://github.com/JuliaIO/BSON.jl/blob/ecae1169be8fb20a88ed2d23417e8585e4a2a7fe/src/write.jl#L46

Is this change intentional (in which case this should probably put into NEWS.md/provide a current way to check if certain type is mutable via ismutabletype)?

julia versioninfo():

Julia Version 1.7.0-DEV.1222
Commit 4a8572fc6d (2021-06-01 18:02 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin20.5.0)
  CPU: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.0 (ORCJIT, skylake)
Environment:
  JULIA_MATHLINK = /Applications/Mathematica.app/Contents/Frameworks/mathlink.framework
  JULIA_MATHKERNEL = /Applications/Mathematica.app/Contents/MacOS/MathKernel
@KristofferC
Copy link
Member

Is this change intentional (in which case this should probably put into NEWS.md/provide a current way to check if certain type is mutable)?

Changes to internals are typically not given a NEWS entry. People that use them are sort of expected to be able to look up what happened to it and how to fix their code.

@vtjnash
Copy link
Member

vtjnash commented Jun 1, 2021

I guess "people" in this case is Jeff 😂 JuliaIO/BSON.jl#63

@imciner2
Copy link
Contributor

imciner2 commented Jun 2, 2021

In 1.5+ there is a function ismutable that should give you the information you want about type mutability, so you could replace T.mutable with ismutable(T) in 1.5+.

@JeffBezanson
Copy link
Member

ismutabletype

@daviehh
Copy link
Contributor Author

daviehh commented Jun 3, 2021

Thanks for the info!

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

5 participants