Skip to content

feat!: update to edition 2024 and update deps to latest #3386

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

Merged
merged 11 commits into from
Jul 23, 2025

Conversation

dignifiedquire
Copy link
Contributor

@dignifiedquire dignifiedquire commented Jul 12, 2025

Description

Updates dependencies where possible.

Closes #3385

Depends on

Breaking Changes

All crates are now edition2024

@n0bot n0bot bot added this to iroh Jul 12, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Jul 12, 2025
Copy link

github-actions bot commented Jul 12, 2025

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3386/docs/iroh/

Last updated: 2025-07-23T09:36:11Z

Copy link

github-actions bot commented Jul 12, 2025

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: 44f53ca

Copy link
Contributor

@rklaehn rklaehn left a comment

Choose a reason for hiding this comment

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

If it works, it works, I guess.

But tbh I would prefer to use 'static wherever possible to indicate that the returned thing is fully self-contained.

Especially this one is probably redundant:

mpl Iterator<Item = hickory_resolver::proto::rr::Record> + 'static + use<>

It's an iterator that does not have a reference on any of the lifetimes of the input parameters. Why is the use<> needed then?

Copy link
Contributor

@flub flub left a comment

Choose a reason for hiding this comment

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

Now I know the intention from the other PR: all the Cargo.toml files in this PR also don't bump the edition.

@rklaehn
Copy link
Contributor

rklaehn commented Jul 14, 2025

There are lots of places where we have fn foo(&self) -> impl Bar + use<>.

As far as I can see all these places can be just replaced with -> impl Bar + 'static, which for me reads much more natural than the weird use<> syntax.

@dignifiedquire
Copy link
Contributor Author

As far as I can see all these places can be just replaced with -> impl Bar + 'static, which for me reads much more natural than the weird use<> syntax.

But asfaiu that does not mean the same thing though

@rklaehn
Copy link
Contributor

rklaehn commented Jul 14, 2025

As far as I can see all these places can be just replaced with -> impl Bar + 'static, which for me reads much more natural than the weird use<> syntax.

But asfaiu that does not mean the same thing though

Not in general, but in this case? The returned thing is supposed to have no lifetime dependencies on any of the parameters that are passed by reference (which is just &self). So how is that not the same as 'static? What other source of lifetimes other than the args is there?

@dignifiedquire
Copy link
Contributor Author

+ 'static definitely does sth different, the compiler is quite upset if I try to use it

@rklaehn
Copy link
Contributor

rklaehn commented Jul 16, 2025

+ 'static definitely does sth different, the compiler is quite upset if I try to use it

If you just use 'static everywhere instead of use<> everything still compiles. #3392

I will have to try out in play.rust-lang.org what the rules are from calling use<> from 'static or otherwise.

@dignifiedquire
Copy link
Contributor Author

I will have to try out in play.rust-lang.org what the rules are from calling use<> from 'static or otherwise.

asfaict use<> avoids capturing the lifetime of &self, which I think 'static does not do

@rklaehn
Copy link
Contributor

rklaehn commented Jul 21, 2025

I will have to try out in play.rust-lang.org what the rules are from calling use<> from 'static or otherwise.

asfaict use<> avoids capturing the lifetime of &self, which I think 'static does not do

'static does not capture &self. Static means fully self-contained, so you can use the future even after self goes out of scope. That is why tokio::task::spawn requires 'static. I really don't get what the difference is between use<> and 'static in that sense.

@matheus23
Copy link
Member

matheus23 commented Jul 21, 2025

We could merge this as-is probably, but we could follow this up with #3198 as well.

But we'd need another iroh-quinn release where we merge upstream's quinn-rs/quinn#2144

@dignifiedquire dignifiedquire added this pull request to the merge queue Jul 23, 2025
Merged via the queue into main with commit e2cfde7 Jul 23, 2025
28 of 29 checks passed
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in iroh Jul 23, 2025
@matheus23 matheus23 deleted the deps-update branch July 23, 2025 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

deps(netdev): build failure on FreeBSD/aarch64
4 participants