rust-lang / rust-lang/rust

Automatic edition migration broken for diesel.

Open
#136,345 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug E-needs-investigation E-needs-mcve T-cargo T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

I tried this code:

https://github.com/diesel-rs/diesel/commit/1c5cf1c88cace42869add2258cb636a2cc7163e2

and followed the setups outlined here to test migrating to the 2024 edition.

I expected to see this happen: Migration succeeds
Instead, this happened: I get the following compiler errors: Gist link as the log is too large to even post it inline
I did not investigate why which error happens, but it seems like that there is again something strange going on with feature unification, as otherwise you wouldn't end up with this kind of error messages that mix different backend types like this.

I also want to highlight that this is now the third edition in row that breaks diesel and that requires significant manual migration effort on our side. At least for me that doesn't uphold the promises made by various edition RFC's and team members.

Meta

rustc --version --verbose:

rustc 1.85.0-beta.6 (14445aaf3 2025-01-26)
binary: rustc
commit-hash: 14445aaf35d45f62fddda8cb5027f44ba4316e7f
commit-date: 2025-01-26
host: x86_64-unknown-linux-gnu
release: 1.85.0-beta.6
LLVM version: 19.1.7

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the migration with the linked Diesel commit and the Rust 2024 beta setup described in the report. Read the compiler errors in the linked gist and investigate the reported feature-unification and mixed-backend-type failures. The work is done when Diesel's edition migration succeeds without these compiler errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.