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

Can't run mdbook build locally without installing or disabling linkcheck #2178

Closed
Zalathar opened this issue Dec 30, 2024 · 5 comments · Fixed by #2180
Closed

Can't run mdbook build locally without installing or disabling linkcheck #2178

Zalathar opened this issue Dec 30, 2024 · 5 comments · Fixed by #2180

Comments

@Zalathar
Copy link
Contributor

Zalathar commented Dec 30, 2024

As of #2103:

$ mdbook build --open
2024-12-30 11:30:43 [INFO] (mdbook::book): Book building has started
2024-12-30 11:30:43 [INFO] (mdbook::book): Running the html backend
2024-12-30 11:30:44 [INFO] (mdbook::book): Running the linkcheck backend
2024-12-30 11:30:44 [INFO] (mdbook::renderer): Invoking the "linkcheck" renderer
Checking files changed in master...: 
exec mdbook-linkcheck2 -f 
/Users/stuart/Dev/rust/dev-guide/ci/linkcheck.sh: line 47: exec: mdbook-linkcheck2: not found
2024-12-30 11:30:44 [WARN] (mdbook::renderer): Error writing the RenderContext to the backend, Broken pipe (os error 32)
2024-12-30 11:30:44 [ERROR] (mdbook::renderer): Renderer exited with non-zero return code.
2024-12-30 11:30:44 [ERROR] (mdbook::utils): Error: Rendering failed
2024-12-30 11:30:44 [ERROR] (mdbook::utils): 	Caused By: The "linkcheck" renderer failed

Building the book now fails if mdbook-linkcheck2 has not been manually installed, even if the contributor doesn't care about linkcheck and just wants to build the book to preview their changes.

And while there is a workaround available, it isn't mentioned by the error message at all.


As a temporary workaround, this works:

$ SKIP_LINKCHECK=1 mdbook build
@camelid
Copy link
Member

camelid commented Dec 30, 2024

Do you have mdbook-linkcheck2 installed? That's what the error seems to suggest the issue is.

@Zalathar
Copy link
Contributor Author

I've never manually installed it, so presumably it isn't installed.

@camelid
Copy link
Member

camelid commented Dec 30, 2024

We've switched to a different version so you'll have to install it. Feel free to reopen if I misunderstood the issue. :)

@camelid camelid closed this as completed Dec 30, 2024
@Zalathar
Copy link
Contributor Author

Zalathar commented Dec 30, 2024

Well, the issue is that I can no longer build the book without either manually installing linkcheck, or manually disabling linkcheck. But I don't care about linkcheck; I just want to build the book to preview my changes. So the workflow for doing that has become more complicated.

At the very least, it would be nice to have an error message that indicates how to disable linkcheck.

@Zalathar Zalathar reopened this Dec 30, 2024
@Zalathar Zalathar changed the title Can't run mdbook build locally due to missing linkcheck Can't run mdbook build locally without installing or disabling linkcheck Dec 30, 2024
@camelid
Copy link
Member

camelid commented Dec 30, 2024

Fair enough. I've opened a PR to make it opt-in instead. #2180

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

Successfully merging a pull request may close this issue.

2 participants