Skip to content

Update MSRV to 1.86#669

Merged
samueltardieu merged 3 commits intomainfrom
msrv-1.86
Jun 1, 2025
Merged

Update MSRV to 1.86#669
samueltardieu merged 3 commits intomainfrom
msrv-1.86

Conversation

@samueltardieu
Copy link
Copy Markdown
Member

@samueltardieu samueltardieu commented Apr 1, 2025

Note: the PR will fail until 1.86 is released

Summary by CodeRabbit

  • Documentation

    • Updated documentation to reflect the new minimum supported Rust version (1.86.0).
  • Refactor

    • Improved internal logic for vector handling in the A* algorithm, with no changes to public behavior.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2025

Walkthrough

The updates include raising the Rust toolchain minimum version requirement from 1.85.0 to 1.86.0 in both documentation and configuration files. Additionally, a method in the A* algorithm implementation was refactored for conciseness, but no public interfaces were changed.

Changes

File(s) Change Summary
Cargo.toml, src/lib.rs Updated Rust MSRV from 1.85.0 to 1.86.0 in manifest and documentation comments.
src/directed/astar.rs Refactored the next_vec method to use a more concise loop for popping vectors of length 1.

Poem

Rust hops ahead, a version new,
The code refines its logic too.
With 1.86, we boldly stride,
And cleaner loops now gently guide.
The garden grows with every patch,
As rabbits code and carrots hatch! 🥕

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

In order to test with not yet released Rust versions, the `check` step,
which is run first, needs to use the most recent compiler.
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented May 15, 2025

CodSpeed Performance Report

Merging #669 will improve performances by 23.78%

Comparing msrv-1.86 (f6ba459) with main (dd809a7)

Summary

⚡ 5 improvements
✅ 33 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
Compare kuhn_munkres with different input sizes[128] 2.1 ms 1.7 ms +23.78%
Compare kuhn_munkres with different input sizes[256] 23 ms 19.1 ms +20.1%
Compare kuhn_munkres with different input sizes[32] 125.7 µs 108.3 µs +16.12%
Compare kuhn_munkres with different input sizes[512] 532.6 ms 453.7 ms +17.39%
Compare kuhn_munkres with different input sizes[64] 585.5 µs 488.2 µs +19.93%

@samueltardieu samueltardieu marked this pull request as ready for review June 1, 2025 20:09
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dd809a7 and f6ba459.

📒 Files selected for processing (3)
  • Cargo.toml (1 hunks)
  • src/directed/astar.rs (1 hunks)
  • src/lib.rs (1 hunks)
🔇 Additional comments (1)
src/lib.rs (1)

80-80: LGTM! Documentation properly updated to match MSRV.

The documentation update correctly reflects the new minimum supported Rust version and maintains consistency with the Cargo.toml configuration.

Comment thread Cargo.toml
readme = "README.md"
edition = "2024"
rust-version = "1.85.0"
rust-version = "1.86.0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Verify Rust 1.86.0 release status before merging.

The MSRV update looks correct and aligns with the PR objective. However, as mentioned in the PR description, this will fail until Rust 1.86.0 is officially released.

Please confirm the release status of Rust 1.86.0:


🌐 Web query:

Has Rust 1.86.0 been officially released? What is the current stable version of Rust?

💡 Result:

As of June 1, 2025, Rust 1.86.0 has not been officially released. The latest stable version is Rust 1.85.0, which was released on February 20, 2025. (blog.rust-lang.org) Rust 1.86.0 is currently in the beta phase and is scheduled to become stable on April 3, 2025. (releases.rs)

Citations:


Hold off MSRV bump until Rust 1.86.0 is officially stable

As of June 1, 2025, Rust 1.86.0 remains in beta and the latest stable release is 1.85.0 (Feb 20, 2025). Bumping rust-version to 1.86.0 will break builds when using the stable toolchain.

• File: Cargo.toml, line 14
• Suggested diff:

- rust-version = "1.86.0"
+ rust-version = "1.85.0"

Please revert this change or wait for the Rust 1.86.0 stable release before merging.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
rust-version = "1.86.0"
# Cargo.toml
rust-version = "1.85.0"
🤖 Prompt for AI Agents
In Cargo.toml at line 14, the rust-version is set to "1.86.0" which is not yet
officially released and will cause build failures. Revert the rust-version back
to the latest stable release "1.85.0" or wait until Rust 1.86.0 is officially
stable before updating this version.

Comment thread src/directed/astar.rs
while self.current.last().map(Vec::len) == Some(1) {
self.current.pop();
}
while self.current.pop_if(|v| v.len() == 1).is_some() {}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Verify pop_if method availability and approve the refactoring.

The refactoring to use pop_if makes the code more concise and idiomatic. This change likely necessitates the MSRV bump to 1.86.0.

Please verify that the pop_if method is available in Rust 1.86.0:


🌐 Web query:

When was the Vec::pop_if method stabilized in Rust? Is it available in Rust 1.86.0?

💡 Result:

The Vec::pop_if method was stabilized in Rust 1.87.0, released on May 15, 2025. Therefore, it is not available in Rust 1.86.0. In Rust 1.86.0, the Vec::pop_if method was still marked as unstable. (doc.rust-lang.org)

Citations:


pop_if requires Rust 1.87.0—bump MSRV or revert to manual loop

The newly introduced Vec::pop_if wasn’t stabilized until Rust 1.87.0 (May 15, 2025). It’s still unstable in 1.86.0, so this change will break compilation under the current MSRV.

Locations to update:

  • src/directed/astar.rs: line 367
    while self.current.pop_if(|v| v.len() == 1).is_some() {}
    • Either bump your MSRV to ≥ 1.87.0 (update Cargo.toml, CI, documentation)
    • Or restore the previous manual loop (e.g., while matches!(self.current.last(), Some(v) if v.len() == 1) { self.current.pop(); })
🤖 Prompt for AI Agents
In src/directed/astar.rs at line 367, the use of Vec::pop_if requires Rust
1.87.0, but the current MSRV is 1.86.0 where pop_if is unstable. To fix this,
either update the MSRV to 1.87.0 or revert the code to the previous manual loop
approach that checks the last element's length and pops it if it equals 1.

@samueltardieu samueltardieu added this pull request to the merge queue Jun 1, 2025
Merged via the queue into main with commit 2a9b27e Jun 1, 2025
14 checks passed
@samueltardieu samueltardieu deleted the msrv-1.86 branch June 1, 2025 20:18
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