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

Documentation links to types that conflict with a package name #3543

Open
mahrud opened this issue Oct 26, 2024 · 1 comment
Open

Documentation links to types that conflict with a package name #3543

mahrud opened this issue Oct 26, 2024 · 1 comment

Comments

@mahrud
Copy link
Member

mahrud commented Oct 26, 2024

Here's a sentence from the documentation of SpaceCurves:

The method smoothDivisors produces a list of Divisor of a given degree on a given surface.

The first link is to a method in the package SpaceCurves, but the second link is to the package Divisor rather than the type Divisor introduced in SpaceCurves.

This is even an issue in the documentation for methods that use a Divisor, e.g. curve:

Inputs:

  • D, an instance of the type Divisor

We try to make sure TO links prioritize the current package before exploring matching nodes in other packages, possibly by prepending currentPackage here:

-- TODO: if Package$Core was the same as Macaulay2Doc, this would not be necessary
fetchAnyRawDocumentation String := fkey -> scan(prepend("Macaulay2Doc", loadedPackages), pkg -> (
rawdoc := fetchRawDocumentation getPrimaryTag makeDocumentTag(fkey, Package => pkg);
if rawdoc =!= null then break rawdoc))

@mahrud
Copy link
Member Author

mahrud commented Oct 26, 2024

I think the situation is more complicated when both SpaceCurves and Divisor packages are loaded, since we need to make sure there's some way to access help for both the type and the package.

Perhaps a simpler fix is to rename the package to Divisors and encourage package titles to use plural names for this reason?

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

No branches or pull requests

1 participant