-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Marking Cargo.lock as generated #6180
Comments
I agree! I do regret at this point at least not having a comment at the top saying it's automatically generated. FWIW historically changing the lock file encoding is somewhat difficult because we don't want to roll it out immediately causing stable/nightly cargos to thrash on what the lock file should look like. In that sense the implementation here would take awhile to stabilize, but would look like:
I think we can definitely figure out how to craft a comment that covers popular systems like GitHub, Phabricator, GitLab, etc, to automatically flag the file as generated. @dwijnand would you perhaps be interested in kicking off the implementation here? |
So I had a look and I think this will have to wait for the switch from the |
Oh FWIW I don't think we need to block on that per se, we already have custom serialization for the lock file (as we want it formatted a particular way) and we could relatively easily cache the first lines that appear with |
Hmm, ok let me see if I can figure that one. |
…richton Preserve lockfile top comment Refs #6180
@bors: remind me in 12/18 weeks to finish this. |
…hton Marking Cargo.lock as generated 12 weeks have passed, let's mark lock files as generated! Fixes #6180
There's some new limited const fn support in stable, and this is the recommended way to initialize atomics now. If this for some reason doesn't compile in all platforms / versions we support I'll just sprinkle some #[allow(deprecated)] instead. Also, cargo changes the output of Cargo.lock, see rust-lang/cargo#6180. So also update those comments. Differential Revision: https://phabricator.services.mozilla.com/D18495 --HG-- extra : moz-landing-system : lando
There's some new limited const fn support in stable, and this is the recommended way to initialize atomics now. If this for some reason doesn't compile in all platforms / versions we support I'll just sprinkle some #[allow(deprecated)] instead. Also, cargo changes the output of Cargo.lock, see rust-lang/cargo#6180. So also update those comments. Differential Revision: https://phabricator.services.mozilla.com/D18495 [wrupdater] From https://hg.mozilla.org/mozilla-central/rev/5f006a3c652c3a5def8800b9b0e65c4213b86785
There's some new limited const fn support in stable, and this is the recommended way to initialize atomics now. If this for some reason doesn't compile in all platforms / versions we support I'll just sprinkle some #[allow(deprecated)] instead. Also, cargo changes the output of Cargo.lock, see rust-lang/cargo#6180. So also update those comments. Differential Revision: https://phabricator.services.mozilla.com/D18495
There's some new limited const fn support in stable, and this is the recommended way to initialize atomics now. If this for some reason doesn't compile in all platforms / versions we support I'll just sprinkle some #[allow(deprecated)] instead. Also, cargo changes the output of Cargo.lock, see rust-lang/cargo#6180. So also update those comments. Differential Revision: https://phabricator.services.mozilla.com/D18495 UltraBlame original commit: 5f006a3c652c3a5def8800b9b0e65c4213b86785
There's some new limited const fn support in stable, and this is the recommended way to initialize atomics now. If this for some reason doesn't compile in all platforms / versions we support I'll just sprinkle some #[allow(deprecated)] instead. Also, cargo changes the output of Cargo.lock, see rust-lang/cargo#6180. So also update those comments. Differential Revision: https://phabricator.services.mozilla.com/D18495 UltraBlame original commit: 5f006a3c652c3a5def8800b9b0e65c4213b86785
There's some new limited const fn support in stable, and this is the recommended way to initialize atomics now. If this for some reason doesn't compile in all platforms / versions we support I'll just sprinkle some #[allow(deprecated)] instead. Also, cargo changes the output of Cargo.lock, see rust-lang/cargo#6180. So also update those comments. Differential Revision: https://phabricator.services.mozilla.com/D18495 UltraBlame original commit: 5f006a3c652c3a5def8800b9b0e65c4213b86785
It appears that some code review tools (e.g. Phabricator) will automatically hide code changes made to files marked with the special `@generated` keyword. Multiple package managers ([including Cargo]) have added this keyword to their generated lockfiles to better accommodate users of these tools and reduce unnecessary diff noise during code reviews. [including Cargo]: rust-lang/cargo#6180 This commit changes the comment at the top of all `Cargo.nix` files to the following text: ``` This file is @generated by cargo2nix X.Y.Z. It is not intended to be manually edited. ```
It appears that some code review tools (e.g. Phabricator) will automatically hide code changes made to files marked with the special `@generated` keyword. Multiple package managers ([including Cargo]) have added this keyword to their generated lockfiles to better accommodate users of these tools and reduce unnecessary diff noise during code reviews. [including Cargo]: rust-lang/cargo#6180 This commit changes the comment at the top of all `Cargo.nix` files to the following text: ``` This file is @generated by cargo2nix X.Y.Z. It is not intended to be manually edited. ```
It appears that some code review tools (e.g. Phabricator) will automatically hide code changes made to files marked with the special `@generated` keyword. Multiple package managers ([including Cargo]) have added this keyword to their generated lockfiles to better accommodate users of these tools and reduce unnecessary diff noise during code reviews. [including Cargo]: rust-lang/cargo#6180 This commit changes the comment at the top of all `Cargo.nix` files to the following text: ``` This file is @generated by cargo2nix X.Y.Z. It is not intended to be manually edited. ```
Our code review tool (phabricator) will automatically hide changes to files that are marked as generated (via detecting the text
@generated
in the file)It would be convenient if Cargo.lock had
// @generated
in the file, or some customizable comment to this effect.I think we can configure phabricator to avoid this issue, but it seems also reasonable to have Cargo's defaults play nicely with phabricator's defaults.
The text was updated successfully, but these errors were encountered: