Skip to content

Conversation

@musoke
Copy link
Contributor

@musoke musoke commented Apr 16, 2024

I am unsure whether this is a bug fix or a new feature.

Recent versions of Documenter use @extref links to refer to the documentation of external packages.
This was introduced in JuliaDocs/Documenter.jl#2366 and JuliaDocs/Documenter.jl#2424 and currently is documented at https://documenter.juliadocs.org/stable/man/syntax/#@extref-link.

This pull request removes @extref links in the same way and under the same conditions as @ref and @id tags.

This is technically a breaking change if it is not considered a bug fix. It seems natural though, especially if the @extref syntax becomes more widely adopted.

I attempted to write a changelog entry but it is quite likely that I got the syntax wrong.

musoke added 3 commits April 16, 2024 18:19
Recent versions of Documenter use `@extref` link to documentation of
external packages.

Remove these in the same way and under the same conditions as `@ref` and
`@id` tags.
@fredrikekre
Copy link
Owner

Thanks a lot! Really appreciate that it comes with test and changelog.

@fredrikekre fredrikekre merged commit 142bbee into fredrikekre:master Apr 16, 2024
- Documenter style `@ref`s and `@id` will be removed. This means that you can use
`@ref` and `@id` in the source file without them leaking to the script.
- Documenter style `@ref`s, `@extref`s and `@id` will be removed. This means that you can use
`@ref`, `@extref` and `@id` in the source file without them leaking to the script.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only place in the docs where I see the existing functionality mentioned.

Oddly it is in the context of a keyword argument feature that is deprecated in the source, but the deprecation is not mentioned in the docs.

Copy link
Owner

Choose a reason for hiding this comment

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

It is discussed a bit here: https://fredrikekre.github.io/Literate.jl/v2/documenter/ but perhaps it can be improved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's the page I was looking at. The first paragraph gave me the impression that this is all dependent on documenter = (true|false), which left me confused until I saw the deprecation notice in the changelog.

The generators (Literate.markdown, Literate.notebook and Literate.script) supports a keyword argument documenter that lets the generator perform some extra things, keeping in mind that the source code have been written with Documenter.jl in mind. So let's take a look at what will happen if we set documenter = true:

Copy link
Owner

Choose a reason for hiding this comment

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

Yea you are right. It should be updated to use Literate.markdown(...; flavor = DocumenterFlavor()).

@musoke
Copy link
Contributor Author

musoke commented Apr 16, 2024

Oh, that was faster than expected!

Thank you for the package!

@musoke musoke deleted the remove-extref branch April 16, 2024 22:55
@fredrikekre
Copy link
Owner

Release: JuliaRegistries/General#105051

@musoke
Copy link
Contributor Author

musoke commented Apr 16, 2024

You merged and released this before I managed to get my CI building docs with my patch. Simplifies my life 😺

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

Successfully merging this pull request may close these issues.

3 participants