-
Notifications
You must be signed in to change notification settings - Fork 480
Remove DEFAULT_RUST_EDITION #1256
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
8ad26ca
to
980d54a
Compare
b47fd54
to
a723865
Compare
Sorry about all the force pushes -- it took a bit of iteration with CI to get all the platform-specific and I figure we do not want to set a default edition in the top-level WORKSPACE.bazel because doing so would mask problems such as #1254, so some new |
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 feel like there's something I'm not thinking about regarding the impact of this change but what I've come up with seems like there's good guidance on how to maintain the current behavior. So this looks good to me, give or take a few nits, thanks!
@@ -55,6 +54,5 @@ rust_common = struct( | |||
crate_info = CrateInfo, | |||
dep_info = DepInfo, | |||
stdlib_info = StdLibInfo, | |||
default_edition = DEFAULT_RUST_EDITION, |
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.
Maybe it's worth leaving this for a little bit to reduce the impact to public API? I'm torn though.
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.
What do you see as being the intended use of this API?
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 don't have any strong answers. Just noticing we're deleting a value from rust_common
and thought maybe there should be more comms about this. But it can also be a note in the next release.
|
This is 1 commit on top of #1255. It removes
DEFAULT_RUST_EDITION
as the defaultedition
argument ofrust_repositories
and various other places. Instead, if the downstream WORKSPACE does not pass anedition
torust_repositories
, theedition
becomes mandatory in everyrust_*
target in their workspace, rather than using an arbitrary fallback default defined within rules_rust (previously 2018).This approach was suggested by @dfreese in #1255 (comment) and +1 by @UebelAndre in #1255 (review). I am ambivalent between them and would be happy with either this or #1255 by itself.