Skip to content

Migrate proc-macro-error2 to proc-macro-error3 to avoid E0365 future-incompatibility warningΒ #3138

Description

@CollinsCMK

Future Compatibility Warning in sea-orm v2.0.0-rc.43

Description

Using sea-orm v2.0.0-rc.43 triggers a Rust future-incompatibility warning during compilation.

The warning originates from the proc-macro-error2 dependency, which re-exports the private proc_macro crate:

pub use proc_macro;

Current Rust versions still allow this behavior with a warning, but according to Rust issue #127909, it will become a hard compilation error in a future release.

As this is a release candidate for SeaORM 2.0, it would be beneficial to resolve this warning before the stable release.


Steps to Reproduce

  1. Create a new project using sea-orm v2.0.0-rc.43.

  2. Build the project:

    cargo build
    
  3. Observe the future compatibility warning.

  4. Run the following command for additional details:

    cargo report future-incompatibilities --id 1
    

Expected Behavior

The project should compile without future-incompatibility warnings, particularly those that are scheduled to become hard compiler errors in upcoming Rust releases.


Actual Behavior

Compilation succeeds, but Cargo emits the following warning:

warning[E0365]: extern crate `proc_macro` is private and cannot be re-exported
   --> /home/cmk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro-error2-2.0.1/src/lib.rs:494:13
    |
494 |     pub use proc_macro;
    |             ^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #127909: https://github.com/rust-lang/rust/issues/127909

Frequency

Always

The warning appears consistently on every clean build and dependency analysis.


Workarounds

None known.


Environment

Component | Version -- | -- SeaORM | 2.0.0-rc.43 Rust | rustc 1.97.1 Database | PostgreSQL Operating System | Linux (Ubuntu/Debian)

Dependency Chain

proc-macro-error2 v2.0.1
└── sea-bae v0.2.1 (proc-macro)
    └── sea-orm-macros v2.0.0-rc.43 (proc-macro)
        └── sea-orm v2.0.0-rc.43

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions