-
Notifications
You must be signed in to change notification settings - Fork 16
[RSDK-8992] Upgrade to rust 1.82 #354
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
Conversation
Also, note the espidf_time32 flag, added per rust-lang/libc#3993
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some notes. Also, need to think about how to get this green in CI because right now it fails in anything using the docker image since they haven't been updated to 1.82, but we would need to merge this in order to build new docker images that had 1.82, so it is a bit of a chicken/egg thing.
| linker = "ldproxy" | ||
| runner = "espflash --monitor" | ||
| rustflags = ["-C", "default-linker-libraries", "-Clink-args=-Wl,-Map=./esp-build.map"] | ||
| rustflags = ["-C", "default-linker-libraries", "-Clink-args=-Wl,-Map=./esp-build.map", "--cfg", "espidf_time32"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required due to libc crate upgrade and rust-lang/libc#3993.
Cargo.toml
Outdated
|
|
||
| [workspace.dependencies] | ||
| anyhow = "1.0.89" | ||
| anyhow = "1.0.93" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updates to this section per cargo upgrade with rust 1.82 enabled.
Cargo.toml
Outdated
| chrono = "0.4.38" | ||
| chrono-tz = "0.10.0" | ||
| clap = "4.5.20" | ||
| clap = "4.5.21" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⬇️ - I had hoped to upgrade embedded-svc and esp-idf-svc, but did not succeed due to a puzzling error. I'll take another go at it, since I believe all that was blocking it was the rust version.
| #[cfg(not(feature = "test"))] | ||
| #[cfg(not(test))] | ||
| { | ||
| println!("cargo:rustc-check-cfg=cfg(has_robot_config)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this, newer clippy yelled at me about cfg(has_robot_config) as an unknown config check.
|
|
||
| fn main() { | ||
| #[cfg(not(feature = "test"))] | ||
| #[cfg(not(test))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was an error before? I'm not sure.
| use regex::Regex; | ||
|
|
||
| fn main() { | ||
| println!("cargo::rustc-check-cfg=cfg(esp32)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like above, clippy would complain that this was an unknown config in esp32/board.rs.
| } else { | ||
| vec![] | ||
| }; | ||
| let i2c_confs = cfg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newer clippy suggestion
| ) -> Result<Option<protobuf::Struct>, crate::common::generic::GenericError> { | ||
| if let Some(cmd) = command_struct { | ||
| if cmd.fields.get("sizes").is_some() { | ||
| if cmd.fields.contains_key("sizes") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and ⬇️ are from newer clippy suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
I built the docker containers and validated a build within it, so I think that aspect is good to go. |
|
FYI I'm not planning to merge this until next week |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@mattjperez and @gvaradarajan - I held back on merging this due to the license finder failures. @stevebriskin - Please have a look at the license finder failure on this if you have a minute. Is Unicode-3 something we can add to our accepted licenses, should we need to? I also intend to check whether we can actually disable the dependency edge that has dragged in the relevant unicode stuff, as it all appears to be IDNA related and I suspect we can live without that. |
|
Discussed with @stevebriskin today and got approval to add Unicode-3.0 as an approved license, pushed a commit to do so per |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gvaradarajan and @mattjperez - Well, rust 1.83 came out while we were iterating on this with the license finder stuff. So, here is 1.83 supported. Please take a look, as I'm hoping to merge this either later tonight or first thing monday morning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| &'a self, | ||
| ssid: &'a str, | ||
| password: &'a str, | ||
| ) -> Pin<Box<dyn Future<Output = Result<(), WifiManagerError>> + '_>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting that this inverse change is needed opposed to the other lifetime changes. I guess because it's the returned result and not the input parameter.
Rust 1.82 is the latest that esp-rs offers.