Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Edition 2024 #1732

Closed
shadaj opened this issue Feb 21, 2025 · 10 comments
Closed

Upgrade to Edition 2024 #1732

shadaj opened this issue Feb 21, 2025 · 10 comments
Assignees

Comments

@shadaj
Copy link
Member

shadaj commented Feb 21, 2025

Lots of goodies, but we'll need to make sure nothing is broken.

@MingweiSamuel
Copy link
Member

There are some clippy lints that flag problem spots before enabling

@MingweiSamuel
Copy link
Member

MingweiSamuel commented Feb 27, 2025

Besides some small issues, main thing blocking is cargo test -p hydro_lang --doc --features deploy fails on some sort of trybuild issue

---- hydro_lang\src\stream.rs - stream::Stream<T,L,Unbounded,O>::union (line 1163) stdout ---- Error: "Failed to build crate (exit code: 101):\nerror[E0432]: unresolved import `hydro_lang::__staged::__doctest_35`\n --> src\\bin\\_process_0_B34660DE.rs:36:47\n |\n36 | use hydro_lang::__staged::__doctest_35::*;\n | ^^^^^^^^^^^^ could not find `__doctest_35` in `__staged`\n\nerror[E0432]: unresolved import `hydro_lang::__staged::__doctest_35`\n --> src\\bin\\_process_0_B34660DE.rs:141:55\n |\n141 | ... use hydro_lang::__staged::__doctest_35::*;\n | ^^^^^^^^^^^^ could not find `__doctest_35` in `__staged`\n\nFor more information about this error, try `rustc --explain E0432`.

@shadaj
Copy link
Member Author

shadaj commented Feb 27, 2025

Oh no, this looks like a side effect of single compilation unit for doctests! Do you have a branch where I can play around with this? My best guess is we need to just disable staging logic for doctests as was done before.

@MingweiSamuel
Copy link
Member

@shadaj
Copy link
Member Author

shadaj commented Feb 27, 2025

Fix: #1743

@MingweiSamuel
Copy link
Member

Workspace appears to be Rust 2024 ready now after #1737 #1743 #1744, PR soon

@MingweiSamuel MingweiSamuel self-assigned this Feb 27, 2025
@jhellerstein
Copy link
Collaborator

Nice!

@MingweiSamuel
Copy link
Member

49a387d #1747

@MingweiSamuel
Copy link
Member

@shadaj It is apparently also an option to use rust,standalone_crate as the code snippet language to prevent combining of tests:

https://doc.rust-lang.org/edition-guide/rust-2024/rustdoc-doctests.html#standalone_crate-tag

@shadaj
Copy link
Member Author

shadaj commented Feb 28, 2025

That won't actually fix the bug, we had the same limitation in Rust 2021 just it surfaces differently now.

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

No branches or pull requests

3 participants