Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The codegen performed in the build script returns an error in the
docs.rs build environment, as write permissions seem to be locked down.
This PR skips the codegen steps in the build script if the
DOCS_RS
environment variable is set.
I didn't find a simple way in my Googling to bypass codegen for all rustdoc
builds, but it doesn't seem to pose a real problem outside docs.rs anyway.
Testing
I didn't want to pull the 10GB needed to run the Docker images that
docs.rs uses. Instead, as a sanity check, I ran
cargo doc --all-features
with and without theDOCS_RS
environmentset and verified via strategically placed
panic!
macros that thebuild script was bypassed when the variable was set 😬
References
Fixes #51