Skip to content

Fix broken CI (rustc 1.96)#7992

Merged
youknowone merged 3 commits into
RustPython:mainfrom
ShaharNaveh:fix-clippy-ci
May 30, 2026
Merged

Fix broken CI (rustc 1.96)#7992
youknowone merged 3 commits into
RustPython:mainfrom
ShaharNaveh:fix-clippy-ci

Conversation

@ShaharNaveh

@ShaharNaveh ShaharNaveh commented May 29, 2026

Copy link
Copy Markdown
Contributor

Wasm issues seems to be related to rust-lang/rust#149868

Summary

Summary by CodeRabbit

Summary

  • Refactor
    • Simplified weak reference comparison to ensure referent-equality is handled correctly when both targets are alive.
  • Chores
    • Removed a now-unnecessary lint suppression around modular exponentiation handling.
  • Build
    • Made a WASM import declaration explicit for the JS-free build to ensure correct linkage.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Simplifies weakref equality referent pairing, removes an unnecessary clippy expect in the pow builtin, and adds a #[link(wasm_import_module = "env")] attribute to a wasm import declaration.

Changes

Code Quality Improvements

Layer / File(s) Summary
Weak reference comparison simplification
crates/vm/src/builtins/weakref.rs
Equality-only comparison now pairs upgraded referents using upgrade().zip(other.upgrade()) instead of an and_then + map chain.
Lint suppression removal
crates/vm/src/stdlib/builtins.rs
Removed the #[expect(clippy::unnecessary_option_map_or_else)] annotation from the pow builtin's modulus computation.
WASM import module attribute
example_projects/wasm32_without_js/rustpython-without-js/src/lib.rs
Added #[link(wasm_import_module = "env")] to the print import in the unsafe extern "C" block.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • fanninpm
  • youknowone

Poem

A rabbit zipped two references tight,
Clippy's whisper hushed the night,
WASM learned which module to send,
Small hops, tidy fixes penned,
🐇✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ⚠️ Warning The title states 'Fix broken CI (rustc 1.96)' but the PR objectives and file summaries indicate the changes address clippy 1.96 lints, not rustc compatibility. This is misleading. Update the title to accurately reflect the main changes, such as 'Fix lints for clippy 1.96' which better represents the actual changes (lint fixes and wasm import attribute).
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@ShaharNaveh ShaharNaveh changed the title Fix lints for clippy 1.96 Fix broken CI (rustc 1.96) May 29, 2026
@youknowone youknowone merged commit 26f817a into RustPython:main May 30, 2026
26 checks passed
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.

2 participants