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 do not build for 0.6.2 #13

Closed
hudson-ayers opened this issue Oct 26, 2020 · 5 comments
Closed

Docs do not build for 0.6.2 #13

hudson-ayers opened this issue Oct 26, 2020 · 5 comments

Comments

@hudson-ayers
Copy link
Contributor

See: https://docs.rs/crate/haybale/0.6.2 . Not a huge deal because you can just visit an older version of the docs, but thought you might want to be aware because all of the links in the README are now broken.

@cdisselkoen
Copy link
Collaborator

Thanks for pointing this out. Looks like docs.rs is failing to build a number of crates dependent on llvm-sys - not just haybale but e.g. llvm-ir (https://docs.rs/crate/llvm-ir/0.7.3/builds/307117). Somehow this llvm-sys issue seems to have resurfaced, and I'm not immediately sure why. Based on the error messages in the docs.rs builds, it seems that somehow #[cfg(not(doc))] (line 485 here) must be true for these docs.rs builds. I don't think this would be caused by any change here or in llvm-sys - maybe there was some change to docs.rs or even to cargo? I'll keep looking into it but if you have any insight here I'm happy to hear it.

@hudson-ayers hudson-ayers changed the title Docs do not built for 0.6.2 Docs do not build for 0.6.2 Oct 26, 2020
@hudson-ayers
Copy link
Contributor Author

It seems that the failure corresponds with the move to building docs for LLVM-11 by default. I tried running the docs build script with the last nightly that succeeded on docs.rs and it still fails (I don't have LLVM-11 on my local machine), so I don't think it has to do with a change to cargo or even to docs.rs.

I believe the default docs.rs docker container is https://github.com/rust-lang/crates-build-env , which by default runs apt-get install llvm (https://github.com/rust-lang/crates-build-env/blob/f93739b81540357d178fe00fcd1f033f13ed622b/packages.txt#L991) and the ubuntu 20.04 llvm package depends on llvm-10 or higher (from my local machine):

hudson: ~/code_repos/haybale (master) $ apt depends llvm
llvm
  Depends: llvm-runtime (= 1:10.0-50~exp1)
  Depends: llvm-10 (>= 10~)

so I am guessing that the llvm-sys issue you linked was not actually the right fix, and only works because the docs.rs build does have a system LLVM-10 present, even though the doc cfg is not actually being set correctly.

So a quick fix is probably to change back Cargo.toml

[package.metadata.docs.rs]
# Generate docs.rs documentation with the llvm-10 feature
features = ["llvm-10"]

until a working fix is committed to the llvm-sys crate.

@cdisselkoen
Copy link
Collaborator

great find! That must be it. I will switch back to llvm-10 for docs.rs and release a 0.6.3.

@cdisselkoen
Copy link
Collaborator

Fixed in 4dde7dd and in 296dabf. And I believe the links in the README are live now. Thanks for the report!

@cdisselkoen
Copy link
Collaborator

Upstream issue for more permanent fix: rust-lang/cargo#8811

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

No branches or pull requests

2 participants