-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Conventions #4259
Conventions #4259
Conversation
Ok, the next bunch of commits does some refactorings and deduplication. The main achievement so far is that we've got rid of Also, some error messages are cleaned up a bit. |
And the next bunch of commits actually makes some algorithmic changes:
|
While `/` do work on windows, the resulting path will have literal `/` in its display.
This is looking great to me, thanks so much @matklad! Mind detailing the deprecation warnings here as well? (just in a comment). I've tagged this relnotes now but just want to make sure we know what to put in the release notes! |
Sure! There are several cases, which I think are "accidental" and are deprecated here
At least, these are all cases I intended to warn about, there maybe some unexpected stuff though! However, almost all the changes to tests were to silence the warnings (eg, they compiled OK, but failed in There was a single edge case where there is a genuine regression (and I really should have written about it before). In the tests, there was Line 990 in 04d8a13
|
Ok that all sounds good to me and this seems like a great refactoring, so let's... @bors: r+ |
📌 Commit 71e6629 has been approved by |
Conventions r? @alexcrichton I'd love to refactor our handing of inferring targets by convention, because it is super difficult to understand, and quite probably contains a couple of unintended/undocumented conventions (like `src/foo.rs` being a binary `foo` if there's no library in the package). As a first step, I've just moved all the logic (600 loc) to a separate file from the `toml.rs` file, which used to be just **huge** (we even use in in IntelliJ Rust for performance testing :) ), and now it is "only" just above 1kloc :)
☀️ Test successful - status-appveyor, status-travis |
This follows Cargo conventions. Cargo recently began warning when the convention is not followed: rust-lang/cargo#4259.
r? @alexcrichton
I'd love to refactor our handing of inferring targets by convention, because it is super difficult to understand, and quite probably contains a couple of unintended/undocumented conventions (like
src/foo.rs
being a binaryfoo
if there's no library in the package).As a first step, I've just moved all the logic (600 loc) to a separate file from the
toml.rs
file, which used to be just huge (we even use in in IntelliJ Rust for performance testing :) ), and now it is "only" just above 1kloc :)