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

feat: Add section about partial clones with git clone --filter='blob:none' #2035

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

futile
Copy link

@futile futile commented Aug 4, 2024

I found this option, --filter='blob:none', while setting up my clone of rustc, and I think it's much nicer than a shallow clone with --depth 1 :).

https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone/ describes what it does compared to a --depth 1 clone.

In short, as I understand it, it doesn't pull blobs per default, only on demand.
"Blobs" are all file and directory contents.
So initially, only file and directory contents for the current HEAD commit will be downloaded, and operations like jumping back in the git history will then automatically pull required blobs on demand.

I.e., this doesn't break git operations like a shallow clone does.

Question: Building the book locally worked fine, until I switched to a new branch.
Now mdbook-linkcheck throws a lot of errors about unlinked things that I a) didn't touch, and b) that seem to be linked properly. Maybe due to f15edb8?

Log of linkcheck errors:
❯ mdbook build
2024-08-04 20:56:34 [INFO] (mdbook::book): Book building has started
Warning: The mdbook-mermaid preprocessor was built against version 0.4.36 of mdbook, but we're being called from version 0.4.40
Warning: The mdbook-toc preprocessor was built against version 0.4.36 of mdbook, but we're being called from version 0.4.40
2024-08-04 20:56:34 [INFO] (mdbook::book): Running the html backend
Warning: The mdbook-toc preprocessor was built against version 0.4.36 of mdbook, but we're being called from version 0.4.40
2024-08-04 20:56:35 [INFO] (mdbook::book): Running the linkcheck backend
2024-08-04 20:56:35 [INFO] (mdbook::renderer): Invoking the "linkcheck" renderer
Checking files changed in master...: building/how-to-build-and-run.md
exec mdbook-linkcheck -f building/how-to-build-and-run.md
error: It looks like "building/quickstart.md" wasn't included in SUMMARY.md
   ┌─ building/how-to-build-and-run.md:24:70
   │
24 │ For a less in-depth quick-start of getting the compiler running, see [quickstart](./quickstart.md).
   │                                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It looks like "building/quickstart.md" wasn't included in SUMMARY.md

error: It looks like "building/bootstrapping/intro.md" wasn't included in SUMMARY.md
   ┌─ building/how-to-build-and-run.md:90:41
   │
90 │ if you want to learn more about `x.py`, [read this chapter][bootstrap].
   │                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It looks like "building/bootstrapping/intro.md" wasn't included in SUMMARY.md

error: It looks like "building/suggested.md" wasn't included in SUMMARY.md
    ┌─ building/how-to-build-and-run.md:197:60
    │
197 │ | `./x check` | Quick check to see if most things compile; [rust-analyzer can run this automatically for you][rust-analyzer] |
    │                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It looks like "building/suggested.md" wasn't included in SUMMARY.md

error: It looks like "tests/running.md" wasn't included in SUMMARY.md
    ┌─ building/how-to-build-and-run.md:215:1
    │
215 │ [testing](../tests/running.md) and [rustdoc](../rustdoc.md) for more details.
    │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It looks like "tests/running.md" wasn't included in SUMMARY.md

error: It looks like "rustdoc.md" wasn't included in SUMMARY.md
    ┌─ building/how-to-build-and-run.md:215:36
    │
215 │ [testing](../tests/running.md) and [rustdoc](../rustdoc.md) for more details.
    │                                    ^^^^^^^^^^^^^^^^^^^^^^^^ It looks like "rustdoc.md" wasn't included in SUMMARY.md

error: It looks like "building/suggested.md" wasn't included in SUMMARY.md
    ┌─ building/how-to-build-and-run.md:244:5
    │
244 │ see [the section on avoiding rebuilds for std][keep-stage].
    │     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It looks like "building/suggested.md" wasn't included in SUMMARY.md

error: It looks like "tests/docker.md" wasn't included in SUMMARY.md
    ┌─ building/how-to-build-and-run.md:360:21
    │
360 │ it may be useful to [inspect the Dockerfiles](../tests/docker.md)
    │                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It looks like "tests/docker.md" wasn't included in SUMMARY.md

error: It looks like "tests/running.md" wasn't included in SUMMARY.md
    ┌─ building/how-to-build-and-run.md:380:26
    │
380 │ - Running tests (see the [section on running tests](../tests/running.html) for
    │                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It looks like "tests/running.md" wasn't included in SUMMARY.md

Error: One or more incorrect links
2024-08-04 20:56:36 [ERROR] (mdbook::renderer): Renderer exited with non-zero return code.
2024-08-04 20:56:36 [ERROR] (mdbook::utils): Error: Rendering failed
2024-08-04 20:56:36 [ERROR] (mdbook::utils):    Caused By: The "linkcheck" renderer failed

Edit: Ah, seems like CI is throwing them as well :)

@futile
Copy link
Author

futile commented Aug 8, 2024

Rebased against master to pick up the commit that disables linkcheck for now.

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.

1 participant