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

Fix old lockfile encoding wrt newlines #7262

Merged
merged 1 commit into from
Aug 20, 2019

Conversation

alexcrichton
Copy link
Member

This commit fixes "old lockfile" encodings back to what they were prior
to #7070 with respect to newlines. The changes in #7070 accidentally
introduced a change where old lockfiles might have some extraneous
newlines removed unintentionally.

In #7070 it was attempted to clean up how newlines are emitted to ensure
a trailing blank newline never shows up at the end of the file, but this
acccidentally regressed cases where today we actually do have blank
newlines at the end of lock files. This commit instead restores all the
previous newline handling, and then scopes the "remove trailing
newlines" fix to specifically just the new encoding.

Closes #7254

This commit fixes "old lockfile" encodings back to what they were prior
to rust-lang#7070 with respect to newlines. The changes in rust-lang#7070 accidentally
introduced a change where old lockfiles might have some extraneous
newlines removed unintentionally.

In rust-lang#7070 it was attempted to clean up how newlines are emitted to ensure
a trailing blank newline never shows up at the end of the file, but this
acccidentally regressed cases where today we actually do have blank
newlines at the end of lock files. This commit instead restores all the
previous newline handling, and then scopes the "remove trailing
newlines" fix to specifically just the new encoding.

Closes rust-lang#7254
@rust-highfive
Copy link

r? @Eh2406

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 19, 2019
@alexcrichton
Copy link
Member Author

r? @ehuss

After this lands I'll prep a backport to beta as well

@rust-highfive rust-highfive assigned ehuss and unassigned Eh2406 Aug 19, 2019
@ehuss
Copy link
Contributor

ehuss commented Aug 20, 2019

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 20, 2019

📌 Commit b850342 has been approved by ehuss

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 20, 2019
@bors
Copy link
Collaborator

bors commented Aug 20, 2019

⌛ Testing commit b850342 with merge be431f4...

bors added a commit that referenced this pull request Aug 20, 2019
Fix old lockfile encoding wrt newlines

This commit fixes "old lockfile" encodings back to what they were prior
to #7070 with respect to newlines. The changes in #7070 accidentally
introduced a change where old lockfiles might have some extraneous
newlines removed unintentionally.

In #7070 it was attempted to clean up how newlines are emitted to ensure
a trailing blank newline never shows up at the end of the file, but this
acccidentally regressed cases where today we actually do have blank
newlines at the end of lock files. This commit instead restores all the
previous newline handling, and then scopes the "remove trailing
newlines" fix to specifically just the new encoding.

Closes #7254
@bors
Copy link
Collaborator

bors commented Aug 20, 2019

☀️ Test successful - checks-azure
Approved by: ehuss
Pushing be431f4 to master...

@bors bors merged commit b850342 into rust-lang:master Aug 20, 2019
@est31
Copy link
Member

est31 commented Aug 20, 2019

Thanks @alexcrichton for the fix!

@ehuss
Copy link
Contributor

ehuss commented Aug 27, 2019

This is a little confusing, for some reason this wasn't closed when it merged. It seems to have merged, so I'll close it manually.

bors added a commit to rust-lang/rust that referenced this pull request Aug 27, 2019
Update cargo

Update cargo

10 commits in 3f700ec43ce72305eb5315cfc710681f3469d4b4..22f7dd0495cd72ce2082d318d5a9b4dccb9c5b8c
2019-08-19 22:43:12 +0000 to 2019-08-27 16:10:51 +0000
- Update and improve zsh completion (rust-lang/cargo#7296)
- Document that `package` can be used in `[patch]` (rust-lang/cargo#7263)
- Fix `error:`/`warning:` coloring inconsistency with rustc (rust-lang/cargo#7294)
- Tests: Import rustc_plugin from its new location (rust-lang/cargo#7287)
- Update README azure badge. (rust-lang/cargo#7293)
- Update home dependencies to v0.5 (rust-lang/cargo#7277)
- Fix typo (rust-lang/cargo#7279)
- Update libgit2 dependencies (rust-lang/cargo#7275)
- Fix old lockfile encoding wrt newlines (rust-lang/cargo#7262)
- Fix dSYM uplifting when symlink is broken (rust-lang/cargo#7268)
@alexcrichton alexcrichton deleted the fix-line-endings branch September 16, 2019 18:24
@ehuss ehuss added this to the 1.39.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cargo.lock trailing newline removal in 1.38.0
6 participants