Skip to content

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

Closed
@bkamins

Description

@bkamins

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions