-
Notifications
You must be signed in to change notification settings - Fork 1k
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
chore: Upgrade to 2021 edition #808
Conversation
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.
tioli, but you may want to update to new-style modules with:
:; for f in $(find . -name mod.rs) ; do git mv $f ${f%%/mod.rs}.rs ; done
Is there something new about the new modules that wasn't there in 2018 edition? |
@LucioFranco now you can use |
nope. this was introduced in 2018. it's pretty nice though. prevents the situation where you have 6 files open in your editor all called |
Oh okay its not something new xD for some reason I still like mod.rs but we can move tonic/other tokio libs over Im not against it. |
Yeah, this is a Rust 2018 feature; i just left a comment about it when we were doing the upgrade because it seemed like a good thing to do.
I agree that However, there's one significant practical advantage for Rust 2018-style modules: Not saying that Tonic has to switch, but we might want to consider it for that reason. |
It's not at all related to the Rust 2021 edition, though --- I just happened to think of it when we were updating Linkerd to Rust 2021, because it's also an edition-related change, even though it's from a prior edition. :) |
Yeah, personally im not convinced either way but if we do move we should do all of tokio projects at once lol |
Just wanted to note that prevents people from updating to v0.6 who don't have a 5 day old compiler for (seemingly) very little gain... I know tonic doesn't provide any stability guarantees (yet), but I mean merging this the day after the stable compiler release is a bit quick isn't it? In the future please give people at least 1 or 2 compiler releases before updating the edition. |
Given that 0.6 was a breaking release and tonic doesn't specify an MSRV, I think updating to the 2021 edition like this was totally fine. Whether tonic should have specify an MSRV is a different discussion though. |
I'm not saying you should or shouldn't specify an MSRV, but having a (implicit) MSRV that is barely a day old is not really user friendly, that's all I wanted to note.
|
@Thomasdezeeuw very valid point, if we have someone who is blocked on this we can yank 0.6 and 0.6.1 and put out a 0.6.2 w/ 2018. I am not opposed I didn't really think that 2021 would be that big of an issue but I am realizing now it probably is. |
Not sure I see how it's an issue? The people impacted will be those that require a feature or bug fix which is in tonic 0.6 but not in 0.5, but who also cannot use the latest stable compiler. How big an overlap is there in that Venn diagram? What constraints are putting people in that very specific position? (Though I do agree an MSRV is a good idea. But even then you are allowed to bump it up on a new release with notice, modulo whatever policy you adopt) |
No description provided.