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.rs documentation is not avaiable #27

Closed
rnestler opened this issue Feb 22, 2019 · 7 comments
Closed

docs.rs documentation is not avaiable #27

rnestler opened this issue Feb 22, 2019 · 7 comments

Comments

@rnestler
Copy link
Contributor

The docs.rs project is unable to build the documentation for qmetaobject: https://docs.rs/crate/qmetaobject/0.0.5/builds/135061.
Probably because Qt is not installed in the build environment there. Is there a way to get this working?

@ogoffart
Copy link
Member

Is there a way to know that only the docs are being generated? Maybe then we could do something dummy in build.rs

@ogoffart
Copy link
Member

I don't know how to solve this problem. I guess installing Qt on the build environment is not an option. I wonder how other crates that have dependencies do it...

@jonas-schievink
Copy link

I've left a comment on the docs.rs issue, maybe they'll provide the Qt libraries in the build environment.

You can detect that docs.rs is running by telling it to enable a special feature (see https://docs.rs/about). cc rust-lang/docs.rs#147

@ogoffart
Copy link
Member

ogoffart commented Jun 3, 2019

Hopefully this will fix it: mystor/rust-cpp#57

@ogoffart
Copy link
Member

Well, that did not work :-(
First of all, i forgot to add a [feature] section in Cargo.toml for cpp_build and cpp_macros so the build of these crates is failling https://docs.rs/crate/cpp_build/0.5.2/builds/165974
(I did not know this was required)

Second: even then it would not work because it appears that the [package.metadata.docs.rs] in cpp_build is only interpreted when building the documentation for cpp_build. But when building the documentation for the qmetaobject crate, it is not interpreted. (As shown in the log of https://docs.rs/crate/qmetaobject/0.1.0/builds/165979 , the build of cpp_build succeed while it should have failled)
While I wanted to get that automatically.
Maybe there are some environment variable that need to be tested instead, or some other way.

@ogoffart
Copy link
Member

After more trial-error, i was able to get the documentation working: https://docs.rs/qmetaobject/0.1.2/qmetaobject/

@rnestler
Copy link
Contributor Author

Awesome! Thanks a lot for your efforts @ogoffart

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

3 participants