JuliaData / NamedTuples.jl

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

compatibility with Julia 1.0 #72

Closed schnirz closed 6 years ago

schnirz commented 6 years ago

I just tried to install NamedTuples in Julia 1.0, and I got the following error message:

julia> using NamedTuples
[ Info: Precompiling NamedTuples [73a701b4-84e1-5df0-88ff-1968ee2ee8dc]
ERROR: LoadError: UndefVarError: start not defined
Stacktrace:
 [1] getproperty(::Module, ::Symbol) at ./sysimg.jl:13
 [2] top-level scope at none:0
 [3] include at ./boot.jl:317 [inlined]
 [4] include_relative(::Module, ::String) at ./loading.jl:1038
 [5] include(::Module, ::String) at ./sysimg.jl:29
 [6] top-level scope at none:2
 [7] eval at ./boot.jl:319 [inlined]
 [8] eval(::Expr) at ./client.jl:389
 [9] top-level scope at ./none:3
in expression starting at /Users/martink/.julia/packages/NamedTuples/MIrnh/src/NamedTuples.jl:16
ERROR: Failed to precompile NamedTuples [73a701b4-84e1-5df0-88ff-1968ee2ee8dc] to /Users/martink/.julia/compiled/v1.0/NamedTuples/SN1pr.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:1184
 [4] _require(::Base.PkgId) at ./logging.jl:311
 [5] require(::Base.PkgId) at ./loading.jl:852
 [6] macro expansion at ./logging.jl:311 [inlined]
 [7] require(::Module, ::Symbol) at ./loading.jl:834

The problem seems to be that NamedTuples is trying to overload Base.start in NamedTuples.jl, which no longer exists in Julia 1.0.

I'm not familiar enough with the code base to fix this issue myself, any help would be greatly appreciated.

It should be noted that this issue also means that installing IndexedTables and JuliaDB currently throws an error message in 1.0...

davidanthoff commented 6 years ago

Julia 1.0 ships with a native named tuple type, and I think pretty much every package is using that on 1.0, so I don't think there is much interest in getting the NamedTuples.jl package to work on 1.0, because really it is no longer needed.

I think IndexedTables.jl and JuliaDB.jl have simply not tagged 1.0 compatible versions.

omus commented 6 years ago

This package isn't needed for NamedTuples on Julia 1.0 but if people are interested in having a backwards compatible version of the Julia 1.0 version we could do some updates to this package. Note these changes would be breaking with the current version of NamedTuples.jl

schnirz commented 6 years ago

Having looked into this a little more, I agree that there isn't much of a need to maintain the package any further, given that there is a native type in 1.0.

The statement "JuliaDB works on Julia 0.6" in the Getting Started section of JuliaDB should perhaps be changed to "JuliaDB only works on Julia 0.6 right now" to avoid confusion and frustration for new Julia users who are drawn in by the 1.0 hype.