jw3126 / Setfield.jl

Update deeply nested immutable structs.
Other
167 stars 17 forks source link

Precompilation fails on julia 0.7 #38

Closed dharasim closed 6 years ago

dharasim commented 6 years ago

It looks like Pkg.installed(...) doesn't work anymore on julia 0.7, but the package does precompile if I delete the hack that supports static arrays.

julia> using Setfield
[ Info: Precompiling Setfield [efcf1570-3423-57d1-acb7-fd33fddbac46]
WARNING: importing deprecated binding Base.Pkg into Setfield.
WARNING: Base.Pkg is deprecated, run `using Pkg` instead
  likely near /Users/daniel/.julia/packages/Setfield/Kc72F/src/Setfield.jl:5
ERROR: LoadError: MethodError: no method matching installed(::String)
Closest candidates are:
  installed() at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:261
Stacktrace:
 [1] top-level scope at none:0
 [2] include at ./boot.jl:317 [inlined]
 [3] include_relative(::Module, ::String) at ./loading.jl:1038
 [4] include(::Module, ::String) at ./sysimg.jl:29
 [5] top-level scope at none:2
 [6] eval at ./boot.jl:319 [inlined]
 [7] eval(::Expr) at ./client.jl:399
 [8] top-level scope at ./none:3
in expression starting at /Users/daniel/.julia/packages/Setfield/Kc72F/src/Setfield.jl:5
ERROR: Failed to precompile Setfield [efcf1570-3423-57d1-acb7-fd33fddbac46] to /Users/daniel/.julia/compiled/v0.7/Setfield/dVM1R.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] macro expansion at ./logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1185
 [4] macro expansion at ./logging.jl:311 [inlined]
 [5] _require(::Base.PkgId) at ./loading.jl:941
 [6] require(::Base.PkgId) at ./loading.jl:852
 [7] macro expansion at ./logging.jl:311 [inlined]
 [8] require(::Module, ::Symbol) at ./loading.jl:834
 [9] eval at ./boot.jl:319 [inlined]
 [10] #49 at /Users/daniel/.julia/packages/Atom/jJn7Y/src/repl.jl:125 [inlined]
 [11] with_logstate(::getfield(Main, Symbol("##49#51")), ::Base.CoreLogging.LogState) at ./logging.jl:397
 [12] with_logger(::Function, ::Atom.Progress.JunoProgressLogger) at ./logging.jl:493
 [13] top-level scope at /Users/daniel/.julia/packages/Atom/jJn7Y/src/repl.jl:124
julia> versioninfo()
Julia Version 0.7.0
Commit a4cb80f3ed (2018-08-08 06:46 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin14.5.0)
  CPU: Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, haswell)
Environment:
  JULIA_NUM_THREADS = 4
  JULIA_EDITOR = atom -a
tkf commented 6 years ago

Released version does not work at the moment. You can do pkg> add https://github.com/jw3126/Setfield.jl though.

tkf commented 6 years ago

or more simply pkg> add Setfield#master

dharasim commented 6 years ago

Thank you very much! That worked.