JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.62k stars 5.48k forks source link

`reload` not working #12780

Closed sam81 closed 9 years ago

sam81 commented 9 years ago

on Julia v0.4.0-dev+6930 (2015-08-24 09:35 UTC) Commit 40d2035* I'm unable to reload any file. I get the error message that the file is not found in path, even though the file exists. Using require gives the same error, but using include appears to work.

julia> readdir(".")
1-element Array{ByteString,1}:
 "foo.jl"

julia> reload("foo.jl")
WARNING: `require` is deprecated, use `using` or `import` instead
 in depwarn at ./deprecated.jl:63
 in require at deprecated.jl:648
while loading no file, in expression starting on line 0
ERROR: ArgumentError: foo.jl not found in path
 in require at ./loading.jl:196
 in require at deprecated.jl:649

julia> versioninfo()
Julia Version 0.4.0-dev+6930
Commit 40d2035* (2015-08-24 09:35 UTC)
Platform Info:
  System: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3
pao commented 9 years ago

Possibly consequence of #9079?

simonster commented 9 years ago

I think it's actually #12695 that changed this.

diegozea commented 9 years ago

Same problem:

julia> reload(MIToS.SIFTS)
ERROR: MethodError: `require` has no method matching require(::Module)

julia> versioninfo()
Julia Version 0.4.0-pre+7102
Commit dea65d7 (2015-08-30 00:28 UTC)
JeffBezanson commented 9 years ago

Fixed in d3bc374d58182aee9763dde168bb1d9ee264e07d. reload of a package name should work, and for files it will tell you to use include.