Skip to content

refactor: extract_archive_with_options and extract_archive_with_options_and_progress have inverted naming convention #259

@bug-ops

Description

@bug-ops

Description

The public API exposes these four extraction functions:

  • extract_archive — base
  • extract_archive_with_progress — adds progress
  • extract_archive_with_options_and_progress — adds options + progress
  • extract_archive_with_options — adds options (no progress)

The suffix order is inconsistent: _with_options_and_progress puts options before progress, while the simpler variants add progress as the single suffix. The most capable variant should be the canonical name; the others should be convenience wrappers. Currently callers must scan four function names to find the right one.

A more composable design: a single extract method on a builder / options struct avoids the exponential naming problem as new axes are added.

Reproduction Steps

Compare the four function signatures in api.rs.

Expected Behavior

Either (a) consistent suffix ordering across all variants, or (b) a single ExtractionOptions-based entry point that replaces the combinatorial functions.

Actual Behavior

Four public functions with inconsistent suffix ordering that will grow to 8+ if more axes (e.g. dry-run, verbosity) are added.

Environment

  • Version: 0.4.0
  • Binding: Rust API

Logs / Evidence

src/api.rs:52,97,155,182 — the four extract functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions