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

chore: don't rebuild docs from scratch when using make docs-serve #3957

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

Conversation

sloria
Copy link
Contributor

@sloria sloria commented Jan 15, 2025

Description

The docs take quite a long time to build from scratch (>1m on my old pre-Apple Silicon macbook air). After the initial build, they build quickly, so long as the _build dir isn't removed. I tend to kill then re-run sphinx-autobuild pretty often, so this ends up saving a lot of time

Closes

@sloria
Copy link
Contributor Author

sloria commented Jan 15, 2025

also, sorry for the barrage of tiny PRs 😬 some people are pretty opinionated about these little DX things, so i opted for independent PRs so they could be merged separately

@provinzkraut
Copy link
Member

Mmh. Not sure this is ideal. There's a reason we do the clean and rebuild, because some things don't always rebuild correctly, so I'm a bit hesitant to merge this one. @JacobCoffee?

@sloria
Copy link
Contributor Author

sloria commented Jan 16, 2025

yes, there are rare cases where stale build files end up in docs/_build, but imo the small cost of having to run make docs-clean manually for those cases doesn't outweigh the much faster builds for the common case.

@sloria
Copy link
Contributor Author

sloria commented Jan 16, 2025

also note that make docs-serve is only used for local development, so having clean docs/_build isn't as critical. i left the make docs command alone, since it does get used in CI so having a clean build dir makes more sense there

Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3957

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