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

Move away from 2015 edition? #3898

Open
eduardosm opened this issue Sep 5, 2024 · 7 comments
Open

Move away from 2015 edition? #3898

eduardosm opened this issue Sep 5, 2024 · 7 comments
Labels
breakage-candidate E-medium E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
Milestone

Comments

@eduardosm
Copy link
Contributor

eduardosm commented Sep 5, 2024

Right now, the libc crate is at Rust edition 2015. Is there a desire to bump to a newer edition?

That would require a significant amount of changes, such as adding crate to paths that being with :: (e.g., crate::c_int instead of ::c_int). It would also require types inside an union to be Copy or wrapped in a ManuallyDrop.

@tgross35
Copy link
Contributor

tgross35 commented Sep 6, 2024

Yeah, we should probably target 2021 as part of 1.0. Thanks for writing this up, I have been meaning to for a while but never got to it.

@tgross35 tgross35 added the E-medium E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. label Sep 6, 2024
@tgross35 tgross35 added this to the 1.0 milestone Sep 6, 2024
@ChrisDenton
Copy link
Member

Note that doing this may make some backports more involved.

@eduardosm
Copy link
Contributor Author

It looks like JohnTitor/ctest2#48 blocks this.

@tgross35
Copy link
Contributor

tgross35 commented Sep 6, 2024

@ChrisDenton are you just referring to maintaining both 1.0 and 0.2 at the same time like we do currently? We have a handful of planned changes like this that would make backports worse, it would probably be good to get everything else lined up then do them right before we plan to release 1.0.

@ChrisDenton
Copy link
Member

are you just referring to maintaining both 1.0 and 0.2 at the same time like we do currently?

Yes, that's what I was referring to.

We have a handful of planned changes like this that would make backports worse, it would probably be good to get everything else lined up then do them right before we plan to release 1.0.

Makes sense.

@ismailarilik
Copy link

I have tried to migrate it to 2021 using cargo fix --edition, and cargo build is now working with the edition set to 2021 in Cargo.toml. Isn't this that simple?

@tgross35
Copy link
Contributor

tgross35 commented Sep 17, 2024

We cherry pick commits from main to libc-0.2 for the stable release. Doing a lot of tiny changes from the autofix means that these many cherry picks won't apply as cleanly, which would be a huge annoyance - since doing this change is so easy/automated, we can defer it until we get closer to 1.0 and are almost ready to abandon libc-0.2 (and hence the cherry picks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breakage-candidate E-medium E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
Projects
None yet
Development

No branches or pull requests

4 participants