Skip to content

Documentation: Imrpove "Contributing" (and amend Sphinx builders) #4494

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

Merged
merged 2 commits into from
Feb 16, 2025

Conversation

dschrempf
Copy link
Contributor

Contains opinionated changes, please check!

I was compiling the documentation using nix build .#docs. Two observations:

  1. The Nix build command uses a different sphinx-build command than the one used in docs/Makefile.
  2. The Nix build command actually failed because warnings were treated as errors.

So I fixed the warnings (duplicate IDs etc.) and thought, why not use the Makefile to build the documentation also with Nix?
However, that was not easily possible because the Makefile passed on all arguments (i.e., even arguments to the make command itself) to sphinx-build. (I think that is/was actually a bug.)

Anyways, I ended up changing the Makefile in ways that you may not agree with. In particular,

  • I added the -n and -W flags to the sphinx-build invocation (warnings are errors).
  • I removed the help target which seemed a bit unnecessary and overcomplicates things.
  • I added a single html target to build the documentaiton using the HTML builder.

Have a look and let me know what you think!

@dschrempf
Copy link
Contributor Author

The "Contributing" help page also states that

The documentation is also built and previewed on every PR

but I could not find any GitHub Action/workflow doing so. Maybe this information is outdated and should be removed?

@fendor
Copy link
Collaborator

fendor commented Feb 12, 2025

Thanks for the PR!

The docs are built for each PR:
image

I was able to look at the docs and verify the links are still working

Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

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

LGTM! I appreciate the consistency in naming.

Also fix some warnings when compiling the documentation with Sphinx.
@fendor fendor added the status: needs review This PR is ready for review label Feb 15, 2025
Copy link
Collaborator

@michaelpj michaelpj left a comment

Choose a reason for hiding this comment

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

LGTM!

@michaelpj michaelpj added the merge me Label to trigger pull request merge label Feb 16, 2025
@mergify mergify bot merged commit 9891292 into haskell:master Feb 16, 2025
38 checks passed
@dschrempf dschrempf deleted the docs-contributing branch February 16, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge status: needs review This PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants