8000 Dead Code: Unused Fields in Constraint Generation Module · Issue #309 · iden3/circom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Dead Code: Unused Fields in Constraint Generation Module #309
Open
@wamimi

Description

@wamimi

While building Circom from source, several "dead code" warnings were identified in the constraint generation module. These warnings indicate multiple struct fields that are defined but never read in the codebase.

Specific Locations

In constraint_generation/src/execution_data/executed_bus.rs:

  1. BusConnexion struct:

    • full_name: String
    • dag_offset: usize
    • dag_jump: usize
  2. ExecutedBus struct:

    • report_name: String
    • bus_id: Option<usize>

In constraint_generation/src/execution_data/type_definitions.rs:

  1. BusData struct:

    • name: String
  2. AccessingInformation struct:

    • tag_access: Option<String>

Questions for Maintainers

  1. Are these fields intentionally kept for future implementation?
  2. If not, would removing these unused fields be a welcome contribution?
  3. If the fields should be retained, would you prefer:
    • Adding documentation explaining their intended future use?
    • Adding #[allow(dead_code)] annotations?
    • Implementing functionality that utilizes these fields?

Proposed Solutions

I'm willing to contribute a PR with one of these approaches:

  1. Remove unused fields if they're no longer needed
  2. Add proper documentation if they're for future use
  3. Add #[allow(dead_code)] annotations if preferred
  4. Implement missing functionality if there's a specific intended use

Additional Context

These warnings appear during the build process with:

cargo build --release
cargo install --path circom

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0