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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

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-16T10:44:01Z

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: 0837e53

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

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