Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "raft-engine"
version = "0.4.2"
authors = ["The TiKV Project Developers"]
edition = "2018"
edition = "2024"
rust-version = "1.85.0"
Comment on lines +5 to 6
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, let's look at the repository structure
git ls-files | head -20

Repository: tikv/raft-engine

Length of output: 360


🏁 Script executed:

# Check for 'gen' usage as identifier
rg -n --type rust '\bgen\b' -g '!target/' -g '!Cargo.toml' | head -50

Repository: tikv/raft-engine

Length of output: 250


🏁 Script executed:

# Check unsafe fn patterns that might be affected by 2024 edition changes
ast-grep --pattern 'unsafe fn $NAME($$$) { $$$ }'

Repository: tikv/raft-engine

Length of output: 1751


🏁 Script executed:

# Let's also check the full Cargo.toml context
cat Cargo.toml

Repository: tikv/raft-engine

Length of output: 2619


Edition jump from 2018 → 2024 is significant — confirm this aligns with project requirements and downstream consumers.

The 2024 edition introduces breaking changes across two skipped editions (2021 and 2024), including the unsafe_op_in_unsafe_fn lint and new lifetime capture rules in impl Trait. The MSRV of 1.85.0 correctly matches the 2024 edition requirement.

A code scan shows no gen identifier conflicts (only .gen() method calls from rand) and no problematic unsafe function patterns, so the migration itself appears sound. Ensure CI passes cleanly with this edition, and verify compatibility with downstream consumers like TiKV that will depend on 2024-edition artifacts.

🤖 Prompt for AI Agents
In `@Cargo.toml` around lines 5 - 6, You bumped the Cargo.toml edition to "2024"
while setting rust-version = "1.85.0"; confirm this change aligns with project
and downstream requirements by running full CI and integration tests, validate
downstream consumers (e.g., TiKV) can consume 2024-edition artifacts, scan the
codebase for patterns affected by the edition (search for unsafe functions that
may trigger the unsafe_op_in_unsafe_fn lint and uses of impl Trait with inferred
lifetime captures), and if any incompatibilities appear either fix the offending
code or revert the edition change until downstream/CI compatibility is ensured.

description = "A persistent storage engine for Multi-Raft logs"
readme = "README.md"
Expand Down Expand Up @@ -58,7 +58,7 @@ protobuf = "2"
rayon = "1.5"
rhai = { version = "1.7", features = ["sync"], optional = true }
scopeguard = "1.1"
serde = { version = "=1.0.194", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
serde_repr = "0.1"
strum = { version = "0.26.2", features = ["derive"] }
thiserror = "1.0"
Expand Down
Loading