Skip to content

Wrong return value of which on Win10 for stdlib functions #28587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bkamins opened this issue Aug 11, 2018 · 1 comment
Closed

Wrong return value of which on Win10 for stdlib functions #28587

bkamins opened this issue Aug 11, 2018 · 1 comment

Comments

@bkamins
Copy link
Member

bkamins commented Aug 11, 2018

On current build of Julia 1.0 when you use where (or any other function that uses source location) looking up a definition of functions that are shipped with Julia in stdlib returns a wrong path (presumably a path to a file on a machine that was used to build system image that is used). Examples:

julia> which(rand, ())
rand() in Random at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Random\src\Random.jl:222


julia> using Pkg

julia> which(Pkg.add, (String,))
add(args...) in Pkg.API at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Pkg\src\API.jl:63

This causes commands like @edit rand() fail.

Locations of functions from Base are returned correctly, e.g.:

julia> which(pwd, ())
pwd() in Base.Filesystem at file.jl:51

julia> which(sin, (Float64,))
sin(x::T) where T<:Union{Float32, Float64} in Base.Math at special/trig.jl:30
@fredrikekre
Copy link
Member

#28052

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants