JuliaAstro / FITSIO.jl

Flexible Image Transport System (FITS) file support for Julia
http://juliaastro.org/FITSIO.jl/
MIT License
55 stars 29 forks source link

TypeError: apply_type: in Array, expected Type{T} #31

Closed jeff-regier closed 9 years ago

jeff-regier commented 9 years ago

I get the error below when I try to load FITSIO with Julia (Version 0.4.0-dev+4603). Is FITSIO compatible with Julia 0.4?

julia> using FITSIO
WARNING: int32(x) is deprecated, use Int32(x) instead.
 in depwarn at ./deprecated.jl:40
 in int32 at deprecated.jl:29
 in include at ./boot.jl:250
 in include_from_node1 at ./loading.jl:132
 in include at ./boot.jl:250
 in include_from_node1 at ./loading.jl:132
 in reload_path at ./loading.jl:156
 in _require at ./loading.jl:68
 in require at ./loading.jl:51
ERROR: LoadError: LoadError: TypeError: apply_type: in Array, expected Type{T}, got Tuple{DataType,DataType,DataType}
 in anonymous at no file:463
 in include at ./boot.jl:250
 in include_from_node1 at ./loading.jl:132
 in include at ./boot.jl:250
 in include_from_node1 at ./loading.jl:132
 in reload_path at ./loading.jl:156
 in _require at ./loading.jl:68
 in require at ./loading.jl:51
while loading /home/jeff/.julia/v0.4/FITSIO/src/cfitsio.jl, in expression starting on line 461
while loading /home/jeff/.julia/v0.4/FITSIO/src/FITSIO.jl, in expression starting on line 70
kbarbary commented 9 years ago

The current release version of FITSIO isn't compatible with Julia 0.4. However, master is, and we plan to tag a new version of FITSIO soon (by the end of the week).

jeff-regier commented 9 years ago

OK sounds good, I'm looking forward to the release! I get an error message with master too currently...I wonder if it's something about my setup, since I see your travis-ci builds are passing.

julia> Pkg.clone("https://github.com/JuliaAstro/FITSIO.jl.git")
INFO: Initializing package repository /home/jeff/.julia/v0.4
INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl
INFO: Cloning FITSIO from https://github.com/JuliaAstro/FITSIO.jl.git
INFO: Computing changes...
INFO: Installing BinDeps v0.3.11
INFO: Installing Compat v0.4.3
INFO: Installing SHA v0.0.4
INFO: Installing URIParser v0.0.5
INFO: Package database updated

julia> Pkg.test("FITSIO")
INFO: Testing FITSIO
ERROR: LoadError: LoadError: FITSIO not properly installed. Please run Pkg.build("FITSIO")
 in error at error.jl:19
 in include at ./boot.jl:250
 in include_from_node1 at ./loading.jl:132
 in reload_path at ./loading.jl:156
 in _require at ./loading.jl:68
 in require at ./loading.jl:51
 in include at ./boot.jl:250
 in include_from_node1 at loading.jl:132
 in process_options at ./client.jl:308
 in _start at ./client.jl:407
while loading /home/jeff/.julia/v0.4/FITSIO/src/FITSIO.jl, in expression starting on line 74
while loading /home/jeff/.julia/v0.4/FITSIO/test/runtests.jl, in expression starting on line 1

====================================[ ERROR: FITSIO ]=====================================

failed process: Process(`/home/jeff/julia_4/bin/julia --check-bounds=yes --code-coverage=none --color=yes /home/jeff/.julia/v0.4/FITSIO/test/runtests.jl`, ProcessExited(1)) [1]

==========================================================================================
INFO: No packages to install, update or remove
ERROR: FITSIO had test errors
 in error at error.jl:19
 in test at pkg/entry.jl:720
 in anonymous at pkg/dir.jl:29
 in cd at file.jl:20
 in cd at pkg/dir.jl:29
 in test at pkg.jl:69
kbarbary commented 9 years ago

Did you try running Pkg.build("FITSIO")? It happens automatically with Pkg.add, but I'm not sure it does with Pkg.clone.

jeff-regier commented 9 years ago

Ah, that fixed it, thanks! Btw, Pkg.build("FITSIO") generated one minor warning you might want to address before tagging the new version.

julia> Pkg.build("FITSIO")
INFO: Building FITSIO

WARNING: deprecated syntax "[a=>b, ...]" at /home/jeff/.julia/v0.4/FITSIO/deps/build.jl:28.
Use "Dict(a=>b, ...)" instead.
kbarbary commented 9 years ago

Thanks. Fixed as part of #30.

kbarbary commented 9 years ago

New version (v0.6.0) is now tagged.