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

[ docs ] Build IdrisDoc in a namespace. #2826

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jfdm
Copy link
Collaborator

@jfdm jfdm commented Dec 21, 2022

When invoking idris2 --mkdocs foobar.ipkg, the current behaviour is for the compiler to dump the documentation in ${builddir}/docs. The location ${builddir}/docs is used regardless of the package name. Thus for projects that present multiple packages the docs build directory will become polluted and corrupt if the developer is not careful. This one change ensures that for package x the documentation is generated in the directory: ${builddir}/docs/x.

Idris2 Makefile has been updated to reflect the change.

Should this change go in the CHANGELOG?

  • If this is a user-facing change or a compiler change, I have updated
    CHANGELOG.md (and potentially also CONTRIBUTORS.md).

When invoking `idris2 --mkdocs foobar.ipkg`, the current behaviour is for the compiler to dump the documentation in `${builddir}/docs`.
The location `${builddir}/docs` is used regardless of the package name.
Thus for projects that present multiple packages the `docs` build directory will become polluted and corrupt if the developer is not careful.
This one change ensures that for package `x` the documentation is generated in the directory: `${builddir}/docs/x`.

Idris2 `Makefile` has been updated to reflect the change.
@gallais
Copy link
Member

gallais commented Dec 21, 2022

IIUC this will require us to update the CI script that generates the docs automatically:

cp -r "$prefix"/"$libname"/build/docs/* html/"$libname"

Something like:

-     cp -r "$prefix"/"$libname"/build/docs/* html/"$libname"
+     cp -r "$prefix"/"$libname"/build/docs/"$libname"/* html/"$libname"

@jfdm
Copy link
Collaborator Author

jfdm commented Dec 22, 2022

Ah good catch! I thought I had updated everything that used the docs.

@jfdm
Copy link
Collaborator Author

jfdm commented Feb 10, 2023

I will leave this open until Tuesday, when I will merge it.

@gallais
Copy link
Member

gallais commented Feb 13, 2023

I don't know what to think.

On the one hand it allows you to know the output you're looking at
will only talk about that one package's content, on the other hand
it breaks sharing (or are we always recomputing the html docs no
matter what?).

Basically: why is this necessary for mkdocs but not build?

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