-
Notifications
You must be signed in to change notification settings - Fork 28
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
Compilation error, unexpected token ...
#53
Comments
Your https://docs.rs/quote/1.0.23/src/quote/lib.rs.html#471-477
I'm closing here though, because it's not a |
pkg-config checks performed by build scripts need to be disabled when building docs on docs.rs. rust version 1.41 introduced a new `doc` feature for doc-build mode detection, which replaced the previous ugly `dox` solution, but unfortunately the official `doc` flag is not passed along to build scripts (see [1]). a workaround was thus needed which was to use a cargo.toml entry to force presence of a flag that build scripts can see. i chose to use the name `doc` for this simply for consistency with the official flag. this solution worked fine until the authors of the `quote` crate made a change (see [2] as pointed out to me at [3]) such that when the `doc` flag is detected, their macro is substituted with an empty one in the name of cleaner documentation. this caused docs.rs builds of my crate to fail with errors (pointing to the `num-derive` crate, which must be the one pulling in `quote). the fix it seems is to either (a) simply use a different name, e.g. "docsrs", or (b) to switch to using the new `DOCS_RS` environment variable as recommended at [4]. i have chosen to go with the latter. if the issue at [1] is ever resolved, we could switch back to using `cfg!(doc)` based detection in the build scripts to disable the check for local doc building (unnecessary) as well as for docs.rs. note, when re-reading 7147efa to refresh my memory i was initially confused by the second to last paragraph, so i'm going to briefly clarify for my own future benefit: i did not mean that the name `docsrs` could not have been used for `rustc-args` at that time, i just meant that i wanted to use the more official name of `doc` in this case, whilst the `rustdoc-args` entry that uses `docsrs` could not use `doc` since it would not have compiled with the stable compiler, and the inconsistency was just going to be temporary since the `rustdoc-args` entry is just there until the `doc_cfg` feature stablises. [1]: rust-lang/cargo#8944 [2]: https://docs.rs/quote/1.0.23/src/quote/lib.rs.html#471-477 [3]: rust-num/num-derive#53 [4]: https://docs.rs/about/builds
Hi.
I've just published some new versions of some crates, only to find the docs.rs builds failing. I had no issues with
cargo doc
locally.As you can see in this example build log, it looks like it's trying to compile
num-derive
version0.3.3
and running into an unexpected error.Please advise.
Here's a copy of the build log:
The text was updated successfully, but these errors were encountered: