Skip to content

8.0.0

Choose a tag to compare

@rohaquinlop rohaquinlop released this 03 Sep 21:41
· 9 commits to main since this release

Major release: complexipy is now a native Rust implementation end to end. The Python CLI is retired in favor of a Rust binary exposed through a thin console-script shim, so the whole pipeline runs without a Python interpreter. The Python API is unchanged and gains diff comparison (compute_diff, has_regressions, DiffEntry, DiffStatus) backed by the same Rust engine as the CLI. Check the migration guide before upgrading.

Changed

  • The Python CLI is retired: complexipy is now a native Rust implementation exposed through a thin console-script shim, so the whole pipeline runs without a Python interpreter. The Python API is unchanged and now includes the diff comparison (compute_diff, has_regressions, DiffEntry, DiffStatus) backed by the same Rust engine as the CLI. The extension module keeps being distributed via maturin wheels. (#224, #243)

Removed

  • Git-URL analysis (complexipy <repository-url>) - local paths only.
  • Legacy cache migration - the previous .complexipy_cache/<hash>.json layout is no longer migrated; existing legacy files are ignored and the delta history starts fresh.
  • Legacy snapshot files - snapshots created with older versions are no longer detected; recreate them with --snapshot-create.
  • -mx short flag for --max-complexity-allowed - carried over from the Python CLI but never ported to the clap-based parser; use --max-complexity-allowed instead.

Fixed

  • The C007 collapsible-if rule no longer suggests merging a nested if when a same-level statement with side effects precedes it - the merge would change program behavior. Comments in multiline headers and trailing comments are handled instead of being misplaceable by the replacement. (#228, #236)
  • The C007 preceding-statement guard no longer fails when blank or comment-only lines sit between the outer and inner if: the indent step detection now skips such lines, so the merge is still rejected instead of producing a replacement that drops code. (#245)
  • The C002 loop-guards suggestion keeps statements that sit between the chained ifs: they now appear in the replacement between the corresponding guards instead of being dropped. Guard conditions are now parenthesized (if not (<cond>):), so inverting conditions with and or or no longer silently changes what the guard skips.
  • The C005 extract-predicate suggestion keeps the statement keyword: while conditions stay while loops, and elif conditions get help text only instead of a broken standalone if replacement. The predicate body indent now follows the file's indent step.
  • C002 and C007 refuse machine suggestions when the shifted body holds a multi-line string literal: dedenting would change the string's value. The plans carry help text instead.
  • C002 loop guards strip a redundant top-level not from the guard condition (if not a: becomes guard if a:), and C005 predicate names get an underscore suffix when the source already defines the generated name.
  • C005 extract-predicate now emits a module-level helper whose parameters are the condition's free variables (attribute bases included, builtins excluded), so the helper is unit-testable. The snippet shows the enclosing context at the statement's real indentation. Conditions that bind a name (:=) or contain a lambda/comprehension get help text only.

PRs

New Contributors

Full Changelog: 7.0.1...8.0.0