From 1633eccdca6c3ad82bf67072a79eaad51080a45c Mon Sep 17 00:00:00 2001 From: Waleed Khan Date: Tue, 22 Aug 2023 09:41:42 -0700 Subject: [PATCH] Use `{ workspace = true }` to appease VS Code's `Cargo.toml` parser The VS Code "Better TOML" plugin (which I think most of our VS Code developers use?) doesn't support the `x.y = z` syntax at the top level, even though it's valid TOML. This is also useful if we ever want to add additional properties in different sub-crates (although unlikely for the near future). --- cli/Cargo.toml | 92 +++++++++++++++++++-------------------- lib/Cargo.toml | 92 +++++++++++++++++++-------------------- lib/gen-protos/Cargo.toml | 8 ++-- lib/testutils/Cargo.toml | 28 ++++++------ 4 files changed, 110 insertions(+), 110 deletions(-) diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 84a87819b..d3bc2d10f 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -3,14 +3,14 @@ name = "jj-cli" description = "Jujutsu - an experimental version control system" default-run = "jj" -version.workspace = true -edition.workspace = true -rust-version.workspace = true -license.workspace = true -homepage.workspace = true -repository.workspace = true -documentation.workspace = true -keywords.workspace = true +version = { workspace = true } +edition = { workspace = true } +rust-version = { workspace = true } +license = { workspace = true } +homepage = { workspace = true } +repository = { workspace = true } +documentation = { workspace = true } +keywords = { workspace = true } [[bin]] name = "jj" @@ -25,51 +25,51 @@ name = "fake-diff-editor" path = "testing/fake-diff-editor.rs" [build-dependencies] -cargo_metadata.workspace = true +cargo_metadata = { workspace = true } [dependencies] -chrono.workspace = true -clap.workspace = true -clap_complete.workspace = true -clap_mangen.workspace = true -config.workspace = true +chrono = { workspace = true } +clap = { workspace = true } +clap_complete = { workspace = true } +clap_mangen = { workspace = true } +config = { workspace = true } criterion = { workspace = true, optional = true } -crossterm.workspace = true -dirs.workspace = true -esl01-renderdag.workspace = true -git2.workspace = true -glob.workspace = true -hex.workspace = true -indexmap.workspace = true -itertools.workspace = true -jj-lib.workspace = true -maplit.workspace = true -once_cell.workspace = true -pest.workspace = true -pest_derive.workspace = true -regex.workspace = true -rpassword.workspace = true -serde.workspace = true -slab.workspace = true -tempfile.workspace = true -textwrap.workspace = true -thiserror.workspace = true -timeago.workspace = true -toml_edit.workspace = true -tracing.workspace = true -tracing-chrome.workspace = true -tracing-subscriber.workspace = true +crossterm = { workspace = true } +dirs = { workspace = true } +esl01-renderdag = { workspace = true } +git2 = { workspace = true } +glob = { workspace = true } +hex = { workspace = true } +indexmap = { workspace = true } +itertools = { workspace = true } +jj-lib = { workspace = true } +maplit = { workspace = true } +once_cell = { workspace = true } +pest = { workspace = true } +pest_derive = { workspace = true } +regex = { workspace = true } +rpassword = { workspace = true } +serde = { workspace = true } +slab = { workspace = true } +tempfile = { workspace = true } +textwrap = { workspace = true } +thiserror = { workspace = true } +timeago = { workspace = true } +toml_edit = { workspace = true } +tracing = { workspace = true } +tracing-chrome = { workspace = true } +tracing-subscriber = { workspace = true } [target.'cfg(unix)'.dependencies] -libc.workspace = true +libc = { workspace = true } [dev-dependencies] -anyhow.workspace = true -assert_cmd.workspace = true -assert_matches.workspace = true -insta.workspace = true -test-case.workspace = true -testutils.workspace = true +anyhow = { workspace = true } +assert_cmd = { workspace = true } +assert_matches = { workspace = true } +insta = { workspace = true } +test-case = { workspace = true } +testutils = { workspace = true } [features] default = [] diff --git a/lib/Cargo.toml b/lib/Cargo.toml index a28217ced..331c80b7b 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -2,66 +2,66 @@ name = "jj-lib" description = "Library for Jujutsu - an experimental version control system" -version.workspace = true -edition.workspace = true -rust-version.workspace = true -license.workspace = true -homepage.workspace = true -repository.workspace = true -documentation.workspace = true -readme.workspace = true +version = { workspace = true } +edition = { workspace = true } +rust-version = { workspace = true } +license = { workspace = true } +homepage = { workspace = true } +repository = { workspace = true } +documentation = { workspace = true } +readme = { workspace = true } [[bench]] name = "diff_bench" harness = false [build-dependencies] -version_check.workspace = true +version_check = { workspace = true } [dependencies] -backoff.workspace = true -blake2.workspace = true -byteorder.workspace = true -bytes.workspace = true -chrono.workspace = true -config.workspace = true -digest.workspace = true -either.workspace = true -git2.workspace = true -hex.workspace = true -itertools.workspace = true -maplit.workspace = true -once_cell.workspace = true -pest.workspace = true -pest_derive.workspace = true -prost.workspace = true -rand.workspace = true -rand_chacha.workspace = true -rayon.workspace = true -regex.workspace = true -serde.workspace = true -serde_json.workspace = true -smallvec.workspace = true -strsim.workspace = true -tempfile.workspace = true -thiserror.workspace = true +backoff = { workspace = true } +blake2 = { workspace = true } +byteorder = { workspace = true } +bytes = { workspace = true } +chrono = { workspace = true } +config = { workspace = true } +digest = { workspace = true } +either = { workspace = true } +git2 = { workspace = true } +hex = { workspace = true } +itertools = { workspace = true } +maplit = { workspace = true } +once_cell = { workspace = true } +pest = { workspace = true } +pest_derive = { workspace = true } +prost = { workspace = true } +rand = { workspace = true } +rand_chacha = { workspace = true } +rayon = { workspace = true } +regex = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +smallvec = { workspace = true } +strsim = { workspace = true } +tempfile = { workspace = true } +thiserror = { workspace = true } tokio = { workspace = true, optional = true } -tracing.workspace = true +tracing = { workspace = true } watchman_client = { workspace = true, optional = true } -whoami.workspace = true -zstd.workspace = true +whoami = { workspace = true } +zstd = { workspace = true } [target.'cfg(unix)'.dependencies] -rustix.workspace = true +rustix = { workspace = true } [dev-dependencies] -assert_matches.workspace = true -criterion.workspace = true -esl01-renderdag.workspace = true -insta.workspace = true -num_cpus.workspace = true -test-case.workspace = true -testutils.workspace = true +assert_matches = { workspace = true } +criterion = { workspace = true } +esl01-renderdag = { workspace = true } +insta = { workspace = true } +num_cpus = { workspace = true } +test-case = { workspace = true } +testutils = { workspace = true } [features] default = [] diff --git a/lib/gen-protos/Cargo.toml b/lib/gen-protos/Cargo.toml index 96af06b1c..13f3043e6 100644 --- a/lib/gen-protos/Cargo.toml +++ b/lib/gen-protos/Cargo.toml @@ -3,9 +3,9 @@ name = "gen-protos" description = "Generate Protocol Buffers definitions for the jj-lib crate" publish = false -version.workspace = true -edition.workspace = true -license.workspace = true +version = { workspace = true } +edition = { workspace = true } +license = { workspace = true } [dependencies] -prost-build.workspace = true +prost-build = { workspace = true } diff --git a/lib/testutils/Cargo.toml b/lib/testutils/Cargo.toml index 7861793b0..f5f98680f 100644 --- a/lib/testutils/Cargo.toml +++ b/lib/testutils/Cargo.toml @@ -3,21 +3,21 @@ name = "testutils" description = "Integration test utils for the jj-lib crate" publish = false -version.workspace = true -edition.workspace = true -rust-version.workspace = true -license.workspace = true -homepage.workspace = true -repository.workspace = true -documentation.workspace = true -readme.workspace = true +version = { workspace = true } +edition = { workspace = true } +rust-version = { workspace = true } +license = { workspace = true } +homepage = { workspace = true } +repository = { workspace = true } +documentation = { workspace = true } +readme = { workspace = true } # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -config.workspace = true -git2.workspace = true -itertools.workspace = true -jj-lib.workspace = true -rand.workspace = true -tempfile.workspace = true +config = { workspace = true } +git2 = { workspace = true } +itertools = { workspace = true } +jj-lib = { workspace = true } +rand = { workspace = true } +tempfile = { workspace = true }