-
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
fix: Don't duplicate comments when editing TOML #13402
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`toml_edit` <0.22 has a bug that will cause ```toml [lints] rust.unsafe_op_in_unsafe_fn = "deny" rust.explicit_outlives_requirements = "warn" clippy.cast_lossless = "warn" clippy.doc_markdown = "warn" clippy.exhaustive_enums = "warn" ``` to be written out as [lints] rust.unsafe_op_in_unsafe_fn = "deny" rust.explicit_outlives_requirements = "warn" clippy.cast_lossless = "warn" clippy.doc_markdown = "warn" clippy.exhaustive_enums = "warn" ``` when it is parsed and then saved. See toml-rs/toml#675 This affects any format-preserving edits we do, including: - `cargo add` - `cargo remove` - `cargo init` / `cargo new` editing the workspace
r? @weihanglo (rustbot has picked a reviewer for you, use r? to override) |
rustbot
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Feb 5, 2024
weihanglo
approved these changes
Feb 7, 2024
Thanks! @bors r+ |
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
Feb 7, 2024
☀️ Test successful - checks-actions |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 10, 2024
Update cargo 8 commits in ccc84ccec4b7340eb916aefda1cb3e2fe17d8e7b..fc1d58fd0531a57a6b942a14cdcdbcb82ece16f3 2024-02-07 15:37:49 +0000 to 2024-02-09 15:54:29 +0000 - docs(changelog): Clarify lints in virtual workspace error (rust-lang/cargo#13425) - fix(compiler): Clarify Finished message (rust-lang/cargo#13422) - fix(test-support): remove special case for `$message_type` (rust-lang/cargo#13424) - chore(deps): update msrv (1 version) to v1.76.0 (rust-lang/cargo#13420) - chore(bump-check): include rustfix and cargo-util-schemas (rust-lang/cargo#13421) - chore: update to `jobserver` 0.1.28 (rust-lang/cargo#13419) - feat: Add hint for adding members to workspace (rust-lang/cargo#13411) - fix: Don't duplicate comments when editing TOML (rust-lang/cargo#13402) r? weihanglo
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 10, 2024
Update cargo 8 commits in ccc84ccec4b7340eb916aefda1cb3e2fe17d8e7b..fc1d58fd0531a57a6b942a14cdcdbcb82ece16f3 2024-02-07 15:37:49 +0000 to 2024-02-09 15:54:29 +0000 - docs(changelog): Clarify lints in virtual workspace error (rust-lang/cargo#13425) - fix(compiler): Clarify Finished message (rust-lang/cargo#13422) - fix(test-support): remove special case for `$message_type` (rust-lang/cargo#13424) - chore(deps): update msrv (1 version) to v1.76.0 (rust-lang/cargo#13420) - chore(bump-check): include rustfix and cargo-util-schemas (rust-lang/cargo#13421) - chore: update to `jobserver` 0.1.28 (rust-lang/cargo#13419) - feat: Add hint for adding members to workspace (rust-lang/cargo#13411) - fix: Don't duplicate comments when editing TOML (rust-lang/cargo#13402) r? weihanglo
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 10, 2024
Update cargo 8 commits in ccc84ccec4b7340eb916aefda1cb3e2fe17d8e7b..fc1d58fd0531a57a6b942a14cdcdbcb82ece16f3 2024-02-07 15:37:49 +0000 to 2024-02-09 15:54:29 +0000 - docs(changelog): Clarify lints in virtual workspace error (rust-lang/cargo#13425) - fix(compiler): Clarify Finished message (rust-lang/cargo#13422) - fix(test-support): remove special case for `$message_type` (rust-lang/cargo#13424) - chore(deps): update msrv (1 version) to v1.76.0 (rust-lang/cargo#13420) - chore(bump-check): include rustfix and cargo-util-schemas (rust-lang/cargo#13421) - chore: update to `jobserver` 0.1.28 (rust-lang/cargo#13419) - feat: Add hint for adding members to workspace (rust-lang/cargo#13411) - fix: Don't duplicate comments when editing TOML (rust-lang/cargo#13402) r? weihanglo
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 13, 2024
Update cargo 8 commits in ccc84ccec4b7340eb916aefda1cb3e2fe17d8e7b..fc1d58fd0531a57a6b942a14cdcdbcb82ece16f3 2024-02-07 15:37:49 +0000 to 2024-02-09 15:54:29 +0000 - docs(changelog): Clarify lints in virtual workspace error (rust-lang/cargo#13425) - fix(compiler): Clarify Finished message (rust-lang/cargo#13422) - fix(test-support): remove special case for `$message_type` (rust-lang/cargo#13424) - chore(deps): update msrv (1 version) to v1.76.0 (rust-lang/cargo#13420) - chore(bump-check): include rustfix and cargo-util-schemas (rust-lang/cargo#13421) - chore: update to `jobserver` 0.1.28 (rust-lang/cargo#13419) - feat: Add hint for adding members to workspace (rust-lang/cargo#13411) - fix: Don't duplicate comments when editing TOML (rust-lang/cargo#13402) r? weihanglo
RalfJung
pushed a commit
to RalfJung/miri
that referenced
this pull request
Feb 14, 2024
Update cargo 8 commits in ccc84ccec4b7340eb916aefda1cb3e2fe17d8e7b..fc1d58fd0531a57a6b942a14cdcdbcb82ece16f3 2024-02-07 15:37:49 +0000 to 2024-02-09 15:54:29 +0000 - docs(changelog): Clarify lints in virtual workspace error (rust-lang/cargo#13425) - fix(compiler): Clarify Finished message (rust-lang/cargo#13422) - fix(test-support): remove special case for `$message_type` (rust-lang/cargo#13424) - chore(deps): update msrv (1 version) to v1.76.0 (rust-lang/cargo#13420) - chore(bump-check): include rustfix and cargo-util-schemas (rust-lang/cargo#13421) - chore: update to `jobserver` 0.1.28 (rust-lang/cargo#13419) - feat: Add hint for adding members to workspace (rust-lang/cargo#13411) - fix: Don't duplicate comments when editing TOML (rust-lang/cargo#13402) r? weihanglo
lnicola
pushed a commit
to lnicola/rust-analyzer
that referenced
this pull request
Apr 7, 2024
Update cargo 8 commits in ccc84ccec4b7340eb916aefda1cb3e2fe17d8e7b..fc1d58fd0531a57a6b942a14cdcdbcb82ece16f3 2024-02-07 15:37:49 +0000 to 2024-02-09 15:54:29 +0000 - docs(changelog): Clarify lints in virtual workspace error (rust-lang/cargo#13425) - fix(compiler): Clarify Finished message (rust-lang/cargo#13422) - fix(test-support): remove special case for `$message_type` (rust-lang/cargo#13424) - chore(deps): update msrv (1 version) to v1.76.0 (rust-lang/cargo#13420) - chore(bump-check): include rustfix and cargo-util-schemas (rust-lang/cargo#13421) - chore: update to `jobserver` 0.1.28 (rust-lang/cargo#13419) - feat: Add hint for adding members to workspace (rust-lang/cargo#13411) - fix: Don't duplicate comments when editing TOML (rust-lang/cargo#13402) r? weihanglo
RalfJung
pushed a commit
to RalfJung/rust-analyzer
that referenced
this pull request
Apr 27, 2024
Update cargo 8 commits in ccc84ccec4b7340eb916aefda1cb3e2fe17d8e7b..fc1d58fd0531a57a6b942a14cdcdbcb82ece16f3 2024-02-07 15:37:49 +0000 to 2024-02-09 15:54:29 +0000 - docs(changelog): Clarify lints in virtual workspace error (rust-lang/cargo#13425) - fix(compiler): Clarify Finished message (rust-lang/cargo#13422) - fix(test-support): remove special case for `$message_type` (rust-lang/cargo#13424) - chore(deps): update msrv (1 version) to v1.76.0 (rust-lang/cargo#13420) - chore(bump-check): include rustfix and cargo-util-schemas (rust-lang/cargo#13421) - chore: update to `jobserver` 0.1.28 (rust-lang/cargo#13419) - feat: Add hint for adding members to workspace (rust-lang/cargo#13411) - fix: Don't duplicate comments when editing TOML (rust-lang/cargo#13402) r? weihanglo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-configuration
Area: cargo config files and env vars
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR try to resolve?
toml_edit
<0.22 has a bug that will causeto be written out as
when it is parsed and then saved.
See toml-rs/toml#673
This affects any format-preserving edits we do, including:
cargo add
cargo remove
cargo init
/cargo new
editing the workspaceHow should we test and review this PR?
I didn't add any tests as this is covered by
toml_edit
s tests (we already don't cover a fraction of the edit preserving tests it has)Additional information