# Weird (and wrong) paths shown for source files in Julia 0.7 under Windows

**URL:** https://discourse.julialang.org/t/weird-and-wrong-paths-shown-for-source-files-in-julia-0-7-under-windows/10782
**Category:** General Usage
**Created:** [May 8, 2018, 2:55pm UTC](https://discourse.julialang.org/t/weird-and-wrong-paths-shown-for-source-files-in-julia-0-7-under-windows/10782 "2018-05-08T14:55:08Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![digital\_carver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/digital_carver/32/33818_2.png) [@digital\_carver](https://discourse.julialang.org/u/digital_carver)
#### Post date: [May 8, 2018, 2:55pm UTC](https://discourse.julialang.org/t/weird-and-wrong-paths-shown-for-source-files-in-julia-0-7-under-windows/10782/1 "2018-05-08T14:55:09Z")

</div>

I just downloaded and installed the Julia 0.7.0 nightly build for Windows. Something seems to have gone wonky with the installation though, since the paths Julia REPL messages output are weird non-existent ones.

```julia
julia> @which Markdown.parse("md *md* `md`")
parse(markdown::AbstractString) in Markdown at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Markdown\src\Markdown.jl:31

```

The actual path to the file is `C:\Programs\Julia-0.7.0-DEV\share\julia\stdlib\v0.7\Markdown\src\Markdown.jl`. The Julia installation folder `C:\Programs\Julia-0.7.0-DEV\` has been replaced in the output by some non-existent path `C:\cygwin\home\Administrator\...` Because the reconstructed path is wrong, commands like `@less` and `@edit` don’t work:

```julia
julia> @less Markdown.parse("md *md* `md`")
C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Markdown\src\Markdown.jl: No such file or directory

```

The weird part is that actual calls seem to work and use the correct path, but calls that generate an error have the wrongly constructed path in the output:

```julia
julia> Markdown.parse("asdf")
  asdf

julia> Markdown.parse(13)
ERROR: MethodError: no method matching parse(::Int64)
Closest candidates are:
  parse(::IO; flavor) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Markdown\src\parse\parse.jl:94
  parse(::IO, ::Markdown.MD; breaking) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Markdown\src\parse\parse.jl:90
  parse(::IO, ::Markdown.MD, ::Markdown.Config; breaking) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Markdown\src\parse\parse.jl:82
  ...

```

I first assumed this to be a Cygwin issue, or at least a consequence of running Julia under Cygwin, but the same thing happens in the Windows PowerShell command line too. The path shown there is also the `C:\cygwin\home\Administrator\...` one, which makes me think it’s a general issue of Julia reconstructing the path wrongly - perhaps the path prefix is something that got set during a cross-compilation that created the nightly build.

Is this a known issue? Or is it something set wrong in my local environment?

---

<div class="post-metadata">

### Author: ![tomaklutfu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomaklutfu/32/2411_2.png) [@tomaklutfu](https://discourse.julialang.org/u/tomaklutfu)
#### Post date: [May 8, 2018, 3:14pm UTC](https://discourse.julialang.org/t/weird-and-wrong-paths-shown-for-source-files-in-julia-0-7-under-windows/10782/2 "2018-05-08T15:14:43Z")

</div>

I guess precompiled system image caches line numbers and files of the functions at compile time. Maybe introduced from constant propagation improvements. I had seen them too. Does this happen in version 0.6

---

<div class="post-metadata">

### Author: ![digital\_carver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/digital_carver/32/33818_2.png) [@digital\_carver](https://discourse.julialang.org/u/digital_carver)
#### Post date: [May 8, 2018, 3:39pm UTC](https://discourse.julialang.org/t/weird-and-wrong-paths-shown-for-source-files-in-julia-0-7-under-windows/10782/3 "2018-05-08T15:39:55Z")

</div>

No, 0.6 sidesteps the issue by printing only the relative path (relative to `share/julia/base`).

Actually, while investigating this I found that this seems to happen only for the code under `stdlib/`. The `base` methods still print out only a relative path in 0.7:

```julia
julia> @which sin(3)
sin(x::Real) in Base.Math at special/trig.jl:53

```

(and `@less` works for these) while external packages print the full correct path:

```julia
julia> @which Primes.isprime(3)
isprime(n::Integer) in Primes at C:\Users\Sundar\.julia\v0.7\Primes\src\Primes.jl:150

```

It’s the methods in the stdlib code that get an absolute path output and get the wrong one as in the original post.

---

<div class="post-metadata">

### Author: ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)
#### Post date: [September 7, 2018, 7:36pm UTC](https://discourse.julialang.org/t/weird-and-wrong-paths-shown-for-source-files-in-julia-0-7-under-windows/10782/4 "2018-09-07T19:36:44Z")

</div>

Any progress on this/is there a github issue yet? I still have the same problem in Julia 1.0 on Windows 10.

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [September 7, 2018, 7:57pm UTC](https://discourse.julialang.org/t/weird-and-wrong-paths-shown-for-source-files-in-julia-0-7-under-windows/10782/5 "2018-09-07T19:57:25Z")

</div>

[https://github.com/JuliaLang/julia/issues/28052](https://github.com/JuliaLang/julia/issues/28052)

---

<div class="post-metadata">

### Author: ![JeffFessler](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jefffessler/32/6650_2.png) [@JeffFessler](https://discourse.julialang.org/u/JeffFessler)
#### Post date: [September 14, 2018, 4:34pm UTC](https://discourse.julialang.org/t/weird-and-wrong-paths-shown-for-source-files-in-julia-0-7-under-windows/10782/6 "2018-09-14T16:34:20Z")

</div>

Same issue with 1.0 (no surprise):

julia\> which(rank, (Matrix,))

rank(A::AbstractArray{T,2} where T) in LinearAlgebra at /Users/osx/buildbot/slave/package\_osx64/build/usr/share/julia/stdlib/v1.0/LinearAlgebra/src/generic.jl:742
