Skip to content

# Class diagram for updated LintContext diagnostics helpers #326

@Dargon789

Description

@Dargon789

Reviewer's Guide

This PR updates several dependencies and CI toolchains, tightens the RUSTSEC deny configuration, and removes or refactors unused/obsolete APIs and helpers across multiple crates while making small behavior fixes related to blob sidecars, solar source selection, lint diagnostics, wallet signing, and tests.

Class diagram for updated LintContext diagnostics helpers

classDiagram
    class Session
    class LintConfig
    class Lint
    class DiagBuilder {
        help(str help) DiagBuilder
        code(DiagId id) DiagBuilder
        span(MultiSpan span) DiagBuilder
        emit()
    }
    class LintContext {
        -sess : &Session
        -with_description : bool
        -with_json_emitter : bool
        -config : &LintConfig
        -active_lints : Vec~Lint~
        +new(sess, with_description, with_json_emitter, config, active_lints) LintContext
        +session() &Session
        +emit_lint(lint, span)
        +emit_lint_for_node(lint, node_id, span)
        -add_help(diag, help) DiagBuilder
    }

    LintContext --> Session : uses
    LintContext --> LintConfig : uses
    LintContext --> Lint : configures
    LintContext --> DiagBuilder : builds diagnostics
Loading

Flow diagram for get_solar_sources_from_compile_output with ignored imports

flowchart TD
    A[start get_solar_sources_from_compile_output]
    A --> B[receive config, output, target_paths, ignored_paths]
    B --> C{target_paths provided
and non empty}
    C -- yes --> D[initialize source_paths from target_paths]
    C -- no --> E[initialize source_paths from all solidity sources in project]
    D --> F[initialize queue with initial source_paths]
    E --> F

    F --> G{queue not empty?}
    G -- yes --> H[pop path from queue]
    H --> I[insert path into source_paths]
    I --> J[iterate imports of path from output.graph]
    J --> K{import is ignored?}
    K -- yes --> G
    K -- no --> L[push import path into queue]
    L --> G
    G -- no --> M[build SolcVersionedInput from source_paths and config]
    M --> N[return SolcVersionedInput]

    subgraph ignore_check
        J --> K
    end
Loading

File-Level Changes

Change Details Files
Bump core Ethereum/alloy-related and UI dependencies to newer versions
  • Update multiple alloy-* crates from 1.1.3 to 1.4 with unchanged feature flags
  • Bump alloy core crates (dyn-abi, json-abi, primitives, sol-macro-*, sol-types) from 1.5.1 to 1.5.2
  • Upgrade evm-disassembler from 0.5 to 0.6
  • Upgrade debugger ratatui dependency from 0.29 to 0.30
Cargo.toml
crates/debugger/Cargo.toml
Cargo.lock
Pin CI and docs workflows to a specific nightly toolchain
  • Change rust-toolchain in CI clippy and rustfmt jobs to nightly-2026-01-10 instead of floating nightly
  • Change rust-toolchain in docs workflow to nightly-2026-01-10
.github/workflows/ci.yml
.github/workflows/docs.yml
Tighten cargo-deny RUSTSEC ignore list
  • Remove ignores for RUSTSEC-2024-0437 and RUSTSEC-2025-0137 from deny configuration, keeping only the paste! advisory
deny.toml
Simplify or remove unused APIs and config fields across crates
  • Remove SessionSource::clear_global and clear_contract, and to_script_source as unused helpers
  • Delete bench helpers get_benchmark_versions and setup_benchmark_repos
  • Remove CLI helper get_cached_entry_by_name for compiler cache lookup
  • Drop allowed_paths and chain-related fields from CheatsConfig and associated initialization/default wiring
  • Remove FeeManager free function calculate_next_block_base_fee wrapper
  • Remove InlineLink::ref_name_exact helper in doc preprocessor
  • Remove ContractsByArtifact::find_abi_by_name_or_identifier helper
  • Remove RawCallResult::from_execution_result helper
  • Remove EvmArgs::ensure_fork_url convenience method
  • Remove Wallets::add_private_key helper in cheatcodes script module
crates/chisel/src/source.rs
benches/src/lib.rs
crates/cli/src/utils/cmd.rs
crates/cheatcodes/src/config.rs
crates/anvil/src/eth/fees.rs
crates/doc/src/preprocessor/infer_hyperlinks.rs
crates/common/src/contracts.rs
crates/evm/evm/src/executors/mod.rs
crates/cli/src/opts/evm.rs
crates/cheatcodes/src/script.rs
Adjust blob sidecar handling and related API surface in Anvil
  • Use sidecar.sidecar.blobs() and commitments() accessors instead of direct field access in mem backend
  • Remove Backend::get_blob_sidecars_by_block_id and EthApi::anvil_get_blob_sidecars_by_block_id handlers
  • Drop corresponding EthRequest::GetBlobSidecarsByBlockId variant from the core RPC enum
  • Update get_blob_by_versioned_hash to use sidecar accessors when locating blobs/commitments
crates/anvil/src/eth/backend/mem/mod.rs
crates/anvil/src/eth/api.rs
crates/anvil/core/src/eth/mod.rs
Clarify blob sidecar types and fix EIP-4844 tests and API usage
  • Explicitly type SidecarBuilder::build() results as BlobTransactionSidecar in EIP-4844 tests to align with new alloy APIs
  • Update transaction tests to assert inclusion of the higher-priced replacement transaction and its receipt instead of leaving commented-out assertions
  • Ensure fill-transaction EIP-4844 tests compile with typed BlobTransactionSidecar sidecars
crates/anvil/tests/it/eip4844.rs
crates/anvil/tests/it/transaction.rs
crates/anvil/tests/it/api.rs
Improve lint diagnostics helper handling and reuse
  • Introduce LintContext::add_help helper that conditionally wraps messages in hyperlinks based on JSON emitter mode
  • Refactor lint emission paths to use add_help instead of duplicating conditional help logic
crates/lint/src/linter/mod.rs
Refine solar source selection by supporting ignored paths
  • Extend get_solar_sources_from_compile_output to accept an optional ignored_paths list and skip queued imports in that set
  • Update build and lint paths to pass appropriate ignored paths (lint passes ignored; build uses None)
  • Ensure configure_pcx_from_compile_output continues to call get_solar_sources_from_compile_output with no ignored paths
crates/cli/src/opts/build/utils.rs
crates/forge/src/cmd/lint.rs
crates/forge/src/cmd/build.rs
Minor refactors and cleanups in utilities and signing
  • Remove unused from_int_or_hex_opt deserializer helper from serde_helpers
  • Change git submodules_uninitialized to delegate to has_missing_dependencies, avoiding duplicated logic for detecting '-' status lines
  • Fix Bloom computation to pass an iterator of &LogInner directly instead of allocating an intermediate Vec
  • Adjust WalletSigner and BrowserSigner TxSigner implementations to delegate through the Signer trait or TxSigner trait instead of manual logic
crates/common/src/serde_helpers.rs
crates/cli/src/utils/mod.rs
crates/primitives/src/transaction/receipt.rs
crates/wallets/src/signer.rs
crates/wallets/src/wallet_browser/signer.rs
flake.lock

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Originally posted by @sourcery-ai[bot] in #325 (comment)

Metadata

Metadata

Assignees

Labels

dependenciesPull requests that update a dependency filedocumentationImprovements or additions to documentationgithub_actionsPull requests that update GitHub Actions codegood first issueGood for newcomersrustPull requests that update rust code

Projects

Status

In Review

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions