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: --cfg=docsrs is now a default set by docs.rs #190

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,18 @@ jobs:
rustdoc:
name: Rustdoc
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: dtolnay/rust-toolchain@nightly
id: rust-toolchain
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ steps.rust-toolchain.outputs.cachekey }}-rustdoc-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-${{ steps.rust-toolchain.outputs.cachekey }}-rustdoc-
${{ runner.os }}-cargo-${{ steps.rust-toolchain.outputs.cachekey }}-
${{ runner.os }}-cargo-
- run: cargo rustdoc --all-features -- --cfg docsrs
- uses: dtolnay/install@cargo-docs-rs
- run: cargo docs-rs
- run: mv "target/$(rustc -vV | awk '/^host/ { print $2 }')/doc" "target/doc"
- run: chmod -c -R +rX "target/doc"
- run: echo "<meta http-equiv=refresh content=0;url=substrait>" > target/doc/index.html
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand Down
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ Or to enable automatic feature information (requires a nightly toolchain):
cargo +nightly rustdoc -- --cfg docsrs
```

Or use [cargo-doc-rs](https://crates.io/crates/cargo-docs-rs):

```
cargo +nightly docs-rs
```

### Formatting

All Rust code is formatted using [rustfmt](https://github.com/rust-lang/rustfmt):
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,3 @@ walkdir = "2.5.0"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
2 changes: 1 addition & 1 deletion src/parse/proto/extensions/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0

//! Parsing of [proto::extensions] types.
//! Parsing of [crate::proto::extensions] types.

mod simple_extension_uri;
pub use simple_extension_uri::SimpleExtensionUri;
3 changes: 2 additions & 1 deletion src/proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#![allow(
clippy::large_enum_variant,
clippy::needless_borrow,
clippy::needless_borrows_for_generic_args
clippy::needless_borrows_for_generic_args,
rustdoc::invalid_html_tags
)]

//! Generated types for the protobuf `substrait` package.
Expand Down