Skip to content

Conversation

@mladedav
Copy link
Collaborator

Motivation

The diagnostic_namespace was stabilized in nightly 1.78 and gives warnings. Some trybuild tests were broken.

Solution

The diagnostic_namespace feature was removed and tests were updated automatically.

Copy link
Member

@jplatte jplatte left a comment

Choose a reason for hiding this comment

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

Thanks!

@jplatte
Copy link
Member

jplatte commented Mar 14, 2024

You'll have to bump the nightly version in the GitHub actions workflow file to fix CI.

@mladedav
Copy link
Collaborator Author

mladedav commented Mar 14, 2024

Fixed.

I thought it pulled latest nightly (since I didn't find any version in the CI file) and I thought that's why I saw breakage in the other PR. Turns out there were just actual errors and when I tried to run the tests locally I must have ran them from the parent directory so the rust-toolchain file was ignored.

@jplatte jplatte merged commit 3569950 into tokio-rs:main Mar 14, 2024
@tisonkun
Copy link
Contributor

tisonkun commented Mar 29, 2024

cc @jplatte Now with an earlier nightly toolchain I got:

error[E0658]: `#[diagnostic]` attribute name space is experimental
   --> /Users/tison/.cargo/registry/src/index.crates.io-6f17d22bba15001f/axum-0.7.5/src/handler/mod.rs:130:5
    |
130 |     diagnostic::on_unimplemented(
    |     ^^^^^^^^^^
    |
    = note: see issue #111996 <https://github.com/rust-lang/rust/issues/111996> for more information
    = help: add `#![feature(diagnostic_namespace)]` to the crate attributes to enable
[toolchain]
channel = "nightly-2023-12-19"

Is it possible to switch the feature gate by different nightly toolchain? Or how can I work around this compile error.

Bump nightly toolchain can be a significant change for our project (new ICEs, features incompatible, although we'll do it sooner or later, but I'm trying not to couple everything. I'm bumping axum from 0.6 to 0.7 now)

@tisonkun
Copy link
Contributor

I use axum = { version = "=0.7.4" } to pin on an earlier axum version for now.

@jplatte
Copy link
Member

jplatte commented Mar 29, 2024

Is it possible to switch the feature gate by different nightly toolchain? Or how can I work around this compile error.

I think it's possible but I'd rather not. Instead, we can have an explicit feature to turn that attribute on. I'm thjnking something like msrv1.80 (if that's the right version, with a - instead of . if necessary).

For now, you can pin the version. Also I would recommend checking a lockfile into git when you are using nightly.

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.

3 participants