Skip to content

Conversation

@clouds56
Copy link
Contributor

@clouds56 clouds56 commented Sep 7, 2022

now relpath_from_repo_root would fail if file not exists

ERROR: LoadError: IOError: cd("/cache/build/default-amdci5-1/julialang/julia-master/usr/share/julia/stdlib/v1.9/CRC32c/src"): no such file or directory (ENOENT)
Stacktrace:
  [1] uv_error
    @ ./libuv.jl:100 [inlined]
  [2] cd(dir::String)
    @ Base.Filesystem ./file.jl:91
  [3] cd(f::Documenter.Utilities.var"#3#4"{String}, dir::String)
    @ Base.Filesystem ./file.jl:111
  [4] relpath_from_repo_root
    @ /cache/build/default-amdci4-6/julialang/julia-master/doc/deps/packages/Documenter/GS7EF/src/Utilities/Utilities.jl:423 [inlined]
  [5] source_url(repo::Documenter.Utilities.Remotes.GitHub, mod::Module, file::String, linerange::UnitRange{Int64})
    @ Documenter.Utilities /cache/build/default-amdci4-6/julialang/julia-master/doc/deps/packages/Documenter/GS7EF/src/Utilities/Utilities.jl:471

@mortenpi
Copy link
Member

We should indeed handle this case. How did you run into this by the way? Was that when building the Julia manual? Locally or on CI?

I am not sure returning nothing fixes it though.. don't you now get a MethodError from repofile?

@clouds56
Copy link
Contributor Author

Was that when building the Julia manual? Locally or on CI?

On CI, just use the master julia and master Document.jl would repro this

Before the change: https://buildkite.com/julialang/julia-master/builds/15556#018313da-c7ff-4313-903a-e52390834827
after the change: https://buildkite.com/julialang/julia-master/builds/15581#01831796-6847-4ab9-9c7e-ce63d813c377
(other changes are unrelated, just focus on doctest.

@clouds56
Copy link
Contributor Author

The key is julia is not installed at prefix it build, so it would trying to find file (/cache/build/default-amdci5-1/julialang/julia-master/usr/share/julia/stdlib/v1.9/CRC32c/src)
but there's only /cache/build/default-amdci4-6/julialang/julia-master/doc/deps/packages/Documenter/GS7EF/src

Copy link
Member

@mortenpi mortenpi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In reference to #1964.

Co-authored-by: Morten Piibeleht <[email protected]>
@mortenpi
Copy link
Member

mortenpi commented Oct 9, 2022

Copy link
Member

@mortenpi mortenpi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh, sorry, my bad, it was repo_commit we changed to throw an error, not repo_root.

Co-authored-by: Morten Piibeleht <[email protected]>
@mortenpi mortenpi merged commit 91701a5 into JuliaDocs:master Oct 10, 2022
@mortenpi
Copy link
Member

Thanks @clouds56!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants