From cc32cc01469017c602cf132b53b619915f741a23 Mon Sep 17 00:00:00 2001 From: Gilad Chase Date: Fri, 20 Dec 2024 13:51:34 +0200 Subject: [PATCH] fix(ci): move rustdoc to nightly + deny warnings Also fixed warnings. Note: currently nightly fails on a bug in coverage, will be fixed async. TODO: add notifications on nightly failures. --- .github/workflows/main.yml | 6 ------ .github/workflows/main_nightly.yml | 13 +++++++++++++ crates/blockifier/src/execution/syscalls/mod.rs | 2 +- crates/starknet_api/src/state.rs | 2 +- crates/starknet_sequencer_node/src/clients.rs | 4 ++-- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dc047166b41..d29cbf3bdb7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -68,9 +68,6 @@ jobs: - name: "Run clippy pull request" if: github.event_name == 'pull_request' run: ci/bin/python scripts/run_tests.py --command clippy --changes_only --commit_id ${{ github.event.pull_request.base.sha }} - - name: "Run cargo doc pull request" - if: github.event_name == 'pull_request' - run: ci/bin/python scripts/run_tests.py --command doc --changes_only --commit_id ${{ github.event.pull_request.base.sha }} # Run code style on push. - name: "Run rustfmt on push" @@ -79,9 +76,6 @@ jobs: - name: "Run clippy on push" if: github.event_name == 'push' run: ci/bin/python scripts/run_tests.py --command clippy - - name: "Run cargo doc on push" - if: github.event_name == 'push' - run: ci/bin/python scripts/run_tests.py --command doc - name: "Run taplo" run: scripts/taplo.sh diff --git a/.github/workflows/main_nightly.yml b/.github/workflows/main_nightly.yml index f514ef7400f..2cc31c4bf13 100644 --- a/.github/workflows/main_nightly.yml +++ b/.github/workflows/main_nightly.yml @@ -54,4 +54,17 @@ jobs: fail_ci_if_error: true version: "v0.1.15" + rustdoc: + runs-on: starkware-ubuntu-latest-large + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: ./.github/actions/bootstrap + + - name: Build Documentation + run: cargo doc --all --no-deps + env: + # Note that cargo doc requires RUSTDOCFLAGS, not RUSTFLAGS. + RUSTDOCFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" diff --git a/crates/blockifier/src/execution/syscalls/mod.rs b/crates/blockifier/src/execution/syscalls/mod.rs index 965eb3efe42..835000d39eb 100644 --- a/crates/blockifier/src/execution/syscalls/mod.rs +++ b/crates/blockifier/src/execution/syscalls/mod.rs @@ -343,7 +343,7 @@ impl SyscallResponse for GetBlockHashResponse { /// Returns the block hash of a given block_number. /// Returns the expected block hash if the given block was created at least -/// [constants::STORED_BLOCK_HASH_BUFFER] blocks before the current block. Otherwise, returns an +/// [crate::abi::constants::STORED_BLOCK_HASH_BUFFER] blocks before the current block. Otherwise, returns an /// error. pub fn get_block_hash( request: GetBlockHashRequest, diff --git a/crates/starknet_api/src/state.rs b/crates/starknet_api/src/state.rs index 782db70fad2..bb19154fea5 100644 --- a/crates/starknet_api/src/state.rs +++ b/crates/starknet_api/src/state.rs @@ -247,7 +247,7 @@ impl From for Sierra } } -/// An entry point of a [ContractClass](`crate::state::ContractClass`). +/// An entry point of a [SierraContractClass](`SierraContractClass`). #[derive(Debug, Default, Clone, Eq, PartialEq, Hash, Deserialize, Serialize, PartialOrd, Ord)] pub struct EntryPoint { pub function_idx: FunctionIndex, diff --git a/crates/starknet_sequencer_node/src/clients.rs b/crates/starknet_sequencer_node/src/clients.rs index 0473cf3b059..5b8957841ac 100644 --- a/crates/starknet_sequencer_node/src/clients.rs +++ b/crates/starknet_sequencer_node/src/clients.rs @@ -64,8 +64,8 @@ pub struct SequencerNodeClients { /// /// # Returns /// -/// An Option> containing the available client (local_client or remote_client), -/// wrapped in Arc. If neither exists, returns None. +/// An `Option>` containing the available client (local_client or +/// remote_client), wrapped in Arc. If neither exists, returns None. /// /// # Example ///