FS#63255 - [julia] @which and @edit do not work
Attached to Project:
Community Packages
Opened by Benoît Legat (blegat) - Monday, 22 July 2019, 15:46 GMT
Last edited by Antonio Rojas (arojas) - Sunday, 22 March 2020, 10:00 GMT
Opened by Benoît Legat (blegat) - Monday, 22 July 2019, 15:46 GMT
Last edited by Antonio Rojas (arojas) - Sunday, 22 March 2020, 10:00 GMT
|
Details
Description:
For stdlib files, the `@which` and `edit` functions do not look at the files in the right directory. The prefix `/build/julia/src/julia-1.1.1` should be removed. Additional info: * package version: julia 2:1.1.1-3 Steps to reproduce: ```julia @which ones(1, 1) * ones(1, 1) *(A::AbstractArray{T,2} where T, B::AbstractArray{T,2} where T) in LinearAlgebra at /build/julia/src/julia-1.1.1/usr/share/julia/stdlib/v1.1/LinearAlgebra/src/matmul.jl:141 julia> @edit ones(1, 1) * ones(1, 1) # Tries to open /build/julia/src/julia-1.1.1/usr/share/julia/stdlib/v1.1/LinearAlgebra/src/matmul.jl:141 ``` The path should be `/usr/share/julia/stdlib/v1.1/LinearAlgebra/src/matmul.jl` |
This task depends upon
Closed by Antonio Rojas (arojas)
Sunday, 22 March 2020, 10:00 GMT
Reason for closing: Fixed
Additional comments about closing: julia 1.4.0
Sunday, 22 March 2020, 10:00 GMT
Reason for closing: Fixed
Additional comments about closing: julia 1.4.0
BTW: if you download the prebuilt binaries from https://julialang.org/downloads/ and try running that, it tries to edit the file /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/LinearAlgebra/src/matmul.jl:141 instead.
So it seems quite obvious to me this isn't intended to work for things in the language's standard library -- and really, why would you want to, since you probably won't have write access to it anyway?
My advice: submit an upstream bug report asking for the build system to respect and strip the prefix= defined in Make.user, or better yet, embed a symbol denoting that it is part of the stdlib and causing the @edit feature to refuse to operate on such files.
> My advice: submit an upstream bug report asking for the build system to respect and strip the prefix= defined in Make.user, or better yet, embed a symbol denoting that it is part of the stdlib and causing the @edit feature to refuse to operate on such files.
Is there an upstream bug report now?
I can help to follow it and do some tests.
I also found someone who just days ago submitted https://github.com/JuliaLang/julia/pull/32763 in relation to it. Try checking to see if this fixes your problem.
I'll keep an eye on it.
(Among numerous other issues, the package will fail to install once built, because it will clash with the source files.)
It doesn't matter whether you call it "$HOME" or "$srcdir", it is still) wrong...