← 输入框|github.com|刷新
Skip to content

Run C API Clippy with its crate-local PyO3 configuration - #9385

Draft
youknowdot wants to merge 1 commit into
RustPython:mainfrom
youknowdot:split/capi-clippy-context-20261026
Draft

youknowdot wants to merge 1 commit into
RustPython:mainfrom
youknowdot:split/capi-clippy-context-20261026

Conversation

@youknowdot

Copy link
Copy Markdown
Contributor

Summary

Separate C API linting from the generic workspace Clippy invocation:

  • Exclude rustpython-capi as a selected workspace Clippy target.
  • Run cargo clippy --locked --all-targets -- -Dwarnings from crates/capi.

Cargo invoked at the workspace root does not load member-crate configuration. The dedicated invocation uses the existing crates/capi/.cargo/config.toml: PYO3_NO_PYTHON=1 and the RustPython 3.15 RustPython-abi3t-3.15 PyO3 configuration. No new feature or ABI fallback is introduced. Root benchmarks retain their independent configuration.

The C API library can still be a dependency of another selected workspace crate. The exclusion separates its explicitly selected test/example/bench targets from the root build context; it does not remove all C API production code from the workspace dependency graph.

The edited steps are shared by Linux and conditional macOS/Windows Clippy. Existing filters, matrices, environment, caches, permissions, features, exports, fixtures, and runtime test commands are unchanged. This is complementary to #9270's build/export work, not a modification of its contributor branch or a replacement for its export inventory.

Validation

  • Normal repository hooks passed.
  • Existing YAML parser confirmed shared Clippy anchors and unchanged other jobs; reversing the exact fragment restores the baseline bytes.
  • Offline zizmor 1.31.1 reports the same four existing low-severity self-repository findings on baseline and candidate (exit 12 on both). No new findings or suppression changes; this is not a clean scan.
  • Bounded Linux compile-only validation passed: cargo clippy --locked --offline --all-targets -- -Dwarnings, invoked from crates/capi with the existing ABI3T configuration.

No local C API tests, interpreter startup, lifecycle operations, or other runtime tests are executed. --all-targets compiles targets; it does not run tests. Linux lint evidence does not establish Windows/macOS or runtime correctness. Standard existing hosted CI remains responsible for its unchanged jobs on the new head.

AI assistance: OpenAI Codex, disclosed in the commit trailer.

Local lint validation used the exact candidate based on f3c443a. Before publication, main advanced to 30b8239d only through unrelated wasm JavaScript package updates (#9377 and #9378); workflow, Cargo and C API inputs were unchanged. The tested candidate was not rebased. Hosted CI must validate its actual merge context separately.

Exclude rustpython-capi as a selected target in generic workspace Clippy,
then lint its targets from crates/capi so Cargo loads the existing
RustPython ABI3T PyO3 configuration. The shared steps cover Linux and
conditional macOS/Windows Clippy without changing their filters.

Keep existing features, runtime test commands, cache, permissions,
exports and fixture behavior unchanged. This complements rather than
replaces the C API build/export work in RustPython#9270.

Assisted-by: OpenAI Codex:model version unavailable
@coderabbitai

coderabbitai Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codspeed

codspeed Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 62 untouched benchmarks
⏩ 4 skipped benchmarks1


Comparing youknowdot:split/capi-clippy-context-20261026 (4baae74) with main (30b8239)

Open in CodSpeed

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant