Skip to content
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

Don't throw in source_url() due to a non-existing source file #1964

Merged
merged 1 commit into from
Oct 9, 2022

Conversation

mortenpi
Copy link
Member

@mortenpi mortenpi commented Oct 8, 2022

@clouds56: sorry it took me this long to get back to you on #1923, but I think this fix is more correct. relpath_from_repo_root and repo_commit are only called in edit_url and source_url, and they should never get called with a non-existing file. That source_url sometimes does was an oversight from #1808.

It might still be a good idea to add an isfile(file) || error("...") to those functions though, just to explicitly catch this case in the future, and you're welcome to update the PR with that.

This should fix the CI errors you reported, which I'm testing over at JuliaLang/julia#47105.

@mortenpi mortenpi changed the title Don't throw in source_url() Don't throws in source_url() due to a non-existing source link Oct 8, 2022
@mortenpi mortenpi changed the title Don't throws in source_url() due to a non-existing source link Don't throws in source_url() due to a non-existing source file Oct 8, 2022
@fredrikekre
Copy link
Member

WIll the fact that these are not found mean links will be broken in the julia docs?

@clouds56
Copy link
Contributor

clouds56 commented Oct 8, 2022

Thanks!

@mortenpi mortenpi changed the title Don't throws in source_url() due to a non-existing source file Don't throw in source_url() due to a non-existing source file Oct 8, 2022
@mortenpi
Copy link
Member Author

mortenpi commented Oct 8, 2022

WIll the fact that these are not found mean links will be broken in the julia docs?

Yes, there are broken links, already now. In particular, the standard libraries are problematic, e.g. see anything in LinearAlgebra. That's next on my list to look into, but goes a bit out of scope of this one, which just aims to fix the regression where it now throws and kills Documenter.

@mortenpi mortenpi merged commit 2d02013 into master Oct 9, 2022
@mortenpi mortenpi deleted the mp/fix-source-url branch October 9, 2022 05:05
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.

3 participants