Path error when attempting to load Lazy (same issue as in Requires.jl)
I get the following error when I run using Lazy in the Julia REPL
ERROR: LoadError: LoadError: LoadError: InitError: UndefVarError: lastname/.julia/v0.4/MacroTools/src/utils.jl not defined
The correct path is /Users/firstname_lastname/.julia/v0.4/MacroTools/src/utils.jl and the file exists.
I can load the MacroTools package from the REPL without error
@sdacek I can't reproduce this, have you tried modifying the package directory (temporarily) in the REPL and reinstalling the packages?
julia> ENV["JULIA_PKGDIR"] = joinpath(homedir(), "test_underscore")
"/Users/jacobbolewski/test_underscore"
julia> Pkg.init()
INFO: Initializing package repository /Users/jacobbolewski/test_underscore/v0.4
INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl
julia> Pkg.add("Lazy")
INFO: Cloning cache of Compat from git://github.com/JuliaLang/Compat.jl.git
INFO: Cloning cache of Lazy from git://github.com/one-more-minute/Lazy.jl.git
INFO: Cloning cache of MacroTools from git://github.com/one-more-minute/MacroTools.jl.git
INFO: Installing Compat v0.7.8
INFO: Installing Lazy v0.10.1
INFO: Installing MacroTools v0.2.0
INFO: Package database updated
julia> using Lazy
INFO: Precompiling module Lazy...
INFO: Recompiling stale cache file /Users/jacobbolewski/.julia/lib/v0.4.1/Compat.ji for module Compat.
julia> versioninfo()
Julia Version 0.4.1
Commit cbe1bee* (2015-11-08 10:33 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin15.0.0)
CPU: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
WORD_SIZE: 64
BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3
I am assuming you are on OSX given the path above.
I still get this issue, at both places that underscores are present. A
I modified the package directory as you recommended and the package installs without issue, but after using Lazy I get a similar error in the new directory, this time split at both lastname and test
ERROR: LoadError: LoadError: UndefVarError: lastname/test not defined
in include at ./boot.jl:261
in include_from_node1 at ./loading.jl:304
in include at ./boot.jl:261
in include_from_node1 at ./loading.jl:304
[inlined code] from none:2
in anonymous at no file:0
in process_options at ./client.jl:257
in _start at ./client.jl:378
while loading /Users/firstname_ lastname/test_underscore/v0.4/Lazy/src/liblazy.jl, in expression starting on line 105
while loading /Users/firstname_ lastname/test_underscore/v0.4/Lazy/src/Lazy.jl, in expression starting on line 91
ERROR: Failed to precompile Lazy to /Users/firstname_ lastname/.julia/lib/v0.4/Lazy.ji
in error at ./error.jl:21
in compilecache at loading.jl:384
in require at ./loading.jl:250
Here is the version info
julia> versioninfo()
Julia Version 0.4.2-pre+1
Commit b8b3517* (2015-11-08 10:37 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin12.6.0)
CPU: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.3
You have a space in your path firstname_ lastname, :imp:!
I don't, its how it copied over. I have two logons, one with my firstname and lastname and another one wit the same format. Its easier for me to keep the issue agnostic. The actual trace for my user looks like this. Sorry, made a copy error
ERROR: LoadError: LoadError: UndefVarError: Dacek/.julia/v0.4/MacroTools/src/utils.jl not defined
in include at ./boot.jl:261
in include_from_node1 at ./loading.jl:304
in include at ./boot.jl:261
in include_from_node1 at ./loading.jl:304
[inlined code] from none:2
in anonymous at no file:0
in process_options at ./client.jl:257
in _start at ./client.jl:378
while loading /Users/Stephen_Dacek/.julia/v0.4/Lazy/src/liblazy.jl, in expression starting on line 105
while loading /Users/Stephen_Dacek/.julia/v0.4/Lazy/src/Lazy.jl, in expression starting on line 91
ERROR: Failed to precompile Lazy to /Users/Stephen_Dacek/.julia/lib/v0.4/Lazy.ji
in error at ./error.jl:21
in compilecache at loading.jl:384
in require at ./loading.jl:250
And heres the trace with the "test_underscore" directory
julia> ENV["JULIA_PKGDIR"] = joinpath(homedir(), "test_underscore")
"/Users/Stephen_Dacek/test_underscore"
julia> Pkg.init()
INFO: Initializing package repository /Users/Stephen_Dacek/test_underscore/v0.4
INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl
julia> Pkg.add("Lazy")
INFO: Cloning cache of Compat from git://github.com/JuliaLang/Compat.jl.git
INFO: Cloning cache of Lazy from git://github.com/one-more-minute/Lazy.jl.git
INFO: Cloning cache of MacroTools from git://github.com/one-more-minute/MacroTools.jl.git
INFO: Installing Compat v0.7.8
INFO: Installing Lazy v0.10.1
INFO: Installing MacroTools v0.2.0
INFO: Package database updated
julia> using Lazy
INFO: Precompiling module Lazy...
INFO: Recompiling stale cache file /Users/Stephen_Dacek/.julia/lib/v0.4/MacroTools.ji for module MacroTools.
INFO: Recompiling stale cache file /Users/Stephen_Dacek/.julia/lib/v0.4/Compat.ji for module Compat.
ERROR: LoadError: LoadError: UndefVarError: Dacek/test not defined
in include at ./boot.jl:261
in include_from_node1 at ./loading.jl:304
in include at ./boot.jl:261
in include_from_node1 at ./loading.jl:304
[inlined code] from none:2
in anonymous at no file:0
in process_options at ./client.jl:257
in _start at ./client.jl:378
while loading /Users/Stephen_Dacek/test_underscore/v0.4/Lazy/src/liblazy.jl, in expression starting on line 105
while loading /Users/Stephen_Dacek/test_underscore/v0.4/Lazy/src/Lazy.jl, in expression starting on line 91
ERROR: Failed to precompile Lazy to /Users/Stephen_Dacek/.julia/lib/v0.4/Lazy.ji
in error at ./error.jl:21
in compilecache at loading.jl:384
in require at ./loading.jl:250
The error is arising in MacroTools macro capture which calls the function tbnew in MacroTools file types.jl
This function gets passed a path and is split on "_" in line 16 of MacroTools types.jl (https://github.com/one-more-minute/MacroTools.jl/blob/master/src/types.jl)
function tbnew(s::Symbol)
istb(s) || return s
ts = map(symbol, split(string(s), "_"))
name = shift!(ts)
ts = map(totype, ts)
Expr(:$, :(MacroTools.TypeBind($(Expr(:quote, name)), Set{Any}([$(ts...)]))))
end
How to solve this problem? Have i change the user name?!! @sdacek
You can just Pkg.checkout("MacroTools") for now.