tonyhffong / Lint.jl

A lint tool for Julia code
Other
169 stars 33 forks source link

LoadError on package precompilation #229

Closed marekdedic closed 7 years ago

marekdedic commented 7 years ago

I installed Lint by running Pkg.add("Lint") on julia 0.5.1. When I try to import by invoking using Lint, I get the following:

INFO: Precompiling module Lint.
ERROR: LoadError: LoadError: MethodError: no method matching open(::Void)
Closest candidates are:
  open(::AbstractString) at iostream.jl:98
  open(::AbstractString, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at iostream.jl:88
  open(::AbstractString, ::AbstractString) at iostream.jl:101
  ...
 in open(::Base.#readstring, ::Void) at ./iostream.jl:111
 in initDeprecateInfo() at /home/user/.julia/v0.5/Lint/src/knowndeprec.jl:13
 in include_from_node1(::String) at ./loading.jl:488 (repeats 2 times)
 in macro expansion; at ./none:2 [inlined]
 in anonymous at ./<missing>:?
 in eval(::Module, ::Any) at ./boot.jl:234
 in process_options(::Base.JLOptions) at ./client.jl:242
 in _start() at ./client.jl:321
while loading /home/user/.julia/v0.5/Lint/src/init.jl, in expression starting on line 2
while loading /home/user/.julia/v0.5/Lint/src/Lint.jl, in expression starting on line 53
------ ErrorException ------------------ Stacktrace (most recent call last)

 [1] — require(::Symbol) at loading.jl:422

 [2] — compilecache(::String) at loading.jl:593

Failed to precompile Lint to /home/user/.julia/lib/v0.5/Lint.ji.

(I am using OhMyREPL...)

TotalVerb commented 7 years ago

Can you run Pkg.status("Lint") and report the results?

marekdedic commented 7 years ago

Here you go:

julia> Pkg.status("Lint")
 - Lint                          0.5.1
TotalVerb commented 7 years ago

I can't reproduce this with the latest master (installing 0.5.1 does not work because of Pkg issues; I'll wait for Julia 0.5.2 and test again). Can you try Pkg.checkout("Lint") and see if the problem persists?

marekdedic commented 7 years ago

I did a checkout and the issue still persist. Same error message:

julia> using Lint
INFO: Precompiling module Lint.
ERROR: LoadError: LoadError: MethodError: no method matching open(::Void)
Closest candidates are:
  open(::AbstractString) at iostream.jl:98
  open(::AbstractString, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at iostream.jl:88
  open(::AbstractString, ::AbstractString) at iostream.jl:101
  ...
 in open(::Base.#readstring, ::Void) at ./iostream.jl:111
 in initDeprecateInfo() at /home/user/.julia/v0.5/Lint/src/knowndeprec.jl:13
 in include_from_node1(::String) at ./loading.jl:488 (repeats 2 times)
 in macro expansion; at ./none:2 [inlined]
 in anonymous at ./<missing>:?
 in eval(::Module, ::Any) at ./boot.jl:234
 in process_options(::Base.JLOptions) at ./client.jl:242
 in _start() at ./client.jl:321
while loading /home/user/.julia/v0.5/Lint/src/init.jl, in expression starting on line 1
while loading /home/user/.julia/v0.5/Lint/src/Lint.jl, in expression starting on line 67
------ ErrorException ------------------ Stacktrace (most recent call last)

 [1] — require(::Symbol) at loading.jl:422

 [2] — compilecache(::String) at loading.jl:593

Failed to precompile Lint to /home/user/.julia/lib/v0.5/Lint.ji.
TotalVerb commented 7 years ago

Thanks. Would you mind providing details on how you obtained your copy of Julia? Did you download the generic binaries/use a PPA?

marekdedic commented 7 years ago

No, I built from source following https://github.com/JuliaLang/julia/blob/master/README.md Guess I should have told you that in the beginning... :D There is no Julia 0.5.X available for Debian, which I am using.

TotalVerb commented 7 years ago

Thanks, I believe that #230 should fix this. Could you test the branch there (using Pkg.checkout("Lint", "fw/fix229") for example) and report if that fixes the problem?

marekdedic commented 7 years ago

That fixed it. Thank you very much for such a quick response and fix. You can close this issue.

TotalVerb commented 7 years ago

Thank you for the report! Make sure to Pkg.free("Lint") to go back to the latest tagged release, now that Lint 0.5.2 has been tagged.