JuliaData / NamedTuples.jl

[DEPRECATED] NamedTuples.jl
Other
30 stars 17 forks source link

Address world age issues with using moduleof #58

Closed omus closed 6 years ago

omus commented 6 years ago

While verifying #46 by including NamedTuples.jl in a system image I encountered:

INFO: Testing NamedTuples
Error During Test
  Test threw an exception of type MethodError
  Expression: map(-, @NT(x = 1, y = 2)) == @NT(x = -1, y = -2)
  MethodError: no method matching moduleof(::Type{NamedTuples._NT_x_y{Int64,Int64}})
  The applicable method may be too new: running in world age 21885, while current world is 21909.
  Closest candidates are:
    moduleof(::DataType) at /root/.julia/v0.6/NamedTuples/src/NamedTuples.jl:350 (method too new to be called from this world context.)
    moduleof(!Matched::UnionAll) at /root/.julia/v0.6/NamedTuples/src/NamedTuples.jl:356 (method too new to be called from this world context.)
  Stacktrace:
   [1] _map(...) at /root/.julia/v0.6/NamedTuples/src/NamedTuples.jl:279
   [2] map(::Function, ::NamedTuples._NT_x_y{Int64,Int64}) at /root/.julia/v0.6/NamedTuples/src/NamedTuples.jl:265
   [3] include_from_node1(::String) at ./loading.jl:576
   [4] include(::String) at ./sysimg.jl:14
   [5] process_options(::Base.JLOptions) at ./client.jl:305
   [6] _start() at ./client.jl:371
ERROR: LoadError: There was an error during testing
while loading /root/.julia/v0.6/NamedTuples/test/runtests.jl, in expression starting on line 63

This PR addresses this world age issue.

omus commented 6 years ago

Just the Julia 0.7 tests are failing.

omus commented 6 years ago

I'll let this PR sit until tomorrow. Then I'll tag a new version: v4.0.1

davidanthoff commented 6 years ago

Shouldn't this be v5.0.0, #46 certainly seems behavior changing?

omus commented 6 years ago

Shouldn't this be v5.0.0, #46 certainly seems behavior changing?

With #46 being reverted in #59 I think a patch release is acceptable. Do you have any concerns with this change also being included with the patch?

davidanthoff commented 6 years ago

That seems fine, essentially the whole release cleans up some internal code and fixes a bug, right?

omus commented 6 years ago

Correct. The v4.0.1 should be 100% non-breaking.