From 639ab1372c22119173a4c049d7cafde2072f355e Mon Sep 17 00:00:00 2001 From: Fomalhaut Weisszwerg Date: Mon, 27 Nov 2023 21:24:57 +0900 Subject: [PATCH] set Cargo feature resolver to v2 (#8917) * fix: version of Cargo feature resolver. This commit solve the ambiguity to determin the version of resolver. To get more detail, see the following two documents: - https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions - https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html * unified: Rust edition in all workspaces. Now, the Rust 2021 is available in all workspaces. * fined up: Cargo.toml by using workspace inheritance. To get more detail of the `workspace.package` table, see a following document: - https://doc.rust-lang.org/cargo/reference/workspaces.html#the-package-table --- Cargo.toml | 6 ++++++ helix-core/Cargo.toml | 5 +++-- helix-dap/Cargo.toml | 5 +++-- helix-event/Cargo.toml | 5 +++-- helix-loader/Cargo.toml | 5 +++-- helix-lsp/Cargo.toml | 5 +++-- helix-parsec/Cargo.toml | 5 +++-- helix-term/Cargo.toml | 6 +++--- helix-tui/Cargo.toml | 5 +++-- helix-vcs/Cargo.toml | 5 +++-- helix-view/Cargo.toml | 5 +++-- 11 files changed, 36 insertions(+), 21 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8ffe0fa7ac84..f2cd9b766b32 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,5 @@ [workspace] +resolver = "2" members = [ "helix-core", "helix-view", @@ -37,3 +38,8 @@ package.helix-term.opt-level = 2 [workspace.dependencies] tree-sitter = { version = "0.20", git = "https://github.com/tree-sitter/tree-sitter", rev = "ab09ae20d640711174b8da8a654f6b3dec93da1a" } nucleo = "0.2.0" + +[workspace.package] +edition = "2021" +license = "MPL-2.0" +rust-version = "1.70" diff --git a/helix-core/Cargo.toml b/helix-core/Cargo.toml index 8035333dd742..0fa550462964 100644 --- a/helix-core/Cargo.toml +++ b/helix-core/Cargo.toml @@ -2,8 +2,9 @@ name = "helix-core" version = "0.6.0" authors = ["Blaž Hrastnik "] -edition = "2021" -license = "MPL-2.0" +edition.workspace = true +license.workspace = true +rust-version.workspace = true description = "Helix editor core editing primitives" categories = ["editor"] repository = "https://github.com/helix-editor/helix" diff --git a/helix-dap/Cargo.toml b/helix-dap/Cargo.toml index 1aa69ecab7e1..b4dd5177e9ba 100644 --- a/helix-dap/Cargo.toml +++ b/helix-dap/Cargo.toml @@ -2,8 +2,9 @@ name = "helix-dap" version = "0.6.0" authors = ["Blaž Hrastnik "] -edition = "2018" -license = "MPL-2.0" +edition.workspace = true +license.workspace = true +rust-version.workspace = true description = "DAP client implementation for Helix project" categories = ["editor"] repository = "https://github.com/helix-editor/helix" diff --git a/helix-event/Cargo.toml b/helix-event/Cargo.toml index 5cd955588960..2dd4b512da4c 100644 --- a/helix-event/Cargo.toml +++ b/helix-event/Cargo.toml @@ -2,8 +2,9 @@ name = "helix-event" version = "0.6.0" authors = ["Blaž Hrastnik "] -edition = "2021" -license = "MPL-2.0" +edition.workspace = true +license.workspace = true +rust-version.workspace = true categories = ["editor"] repository = "https://github.com/helix-editor/helix" homepage = "https://helix-editor.com" diff --git a/helix-loader/Cargo.toml b/helix-loader/Cargo.toml index e24c3d7cfece..b32318d0436e 100644 --- a/helix-loader/Cargo.toml +++ b/helix-loader/Cargo.toml @@ -3,8 +3,9 @@ name = "helix-loader" version = "0.6.0" description = "A post-modern text editor." authors = ["Blaž Hrastnik "] -edition = "2021" -license = "MPL-2.0" +edition.workspace = true +license.workspace = true +rust-version.workspace = true categories = ["editor"] repository = "https://github.com/helix-editor/helix" homepage = "https://helix-editor.com" diff --git a/helix-lsp/Cargo.toml b/helix-lsp/Cargo.toml index 6511df408532..98ff5d0b9758 100644 --- a/helix-lsp/Cargo.toml +++ b/helix-lsp/Cargo.toml @@ -2,8 +2,9 @@ name = "helix-lsp" version = "0.6.0" authors = ["Blaž Hrastnik "] -edition = "2021" -license = "MPL-2.0" +edition.workspace = true +license.workspace = true +rust-version.workspace = true description = "LSP client implementation for Helix project" categories = ["editor"] repository = "https://github.com/helix-editor/helix" diff --git a/helix-parsec/Cargo.toml b/helix-parsec/Cargo.toml index 505a4247e3ef..d2b6105e628c 100644 --- a/helix-parsec/Cargo.toml +++ b/helix-parsec/Cargo.toml @@ -2,8 +2,9 @@ name = "helix-parsec" version = "0.6.0" authors = ["Blaž Hrastnik "] -edition = "2021" -license = "MPL-2.0" +edition.workspace = true +license.workspace = true +rust-version.workspace = true description = "Parser combinators for Helix" categories = ["editor"] repository = "https://github.com/helix-editor/helix" diff --git a/helix-term/Cargo.toml b/helix-term/Cargo.toml index 0c207ffdb1b0..a11b4ae5dbd0 100644 --- a/helix-term/Cargo.toml +++ b/helix-term/Cargo.toml @@ -3,14 +3,14 @@ name = "helix-term" version = "0.6.0" description = "A post-modern text editor." authors = ["Blaž Hrastnik "] -edition = "2021" -license = "MPL-2.0" +edition.workspace = true +license.workspace = true categories = ["editor", "command-line-utilities"] repository = "https://github.com/helix-editor/helix" homepage = "https://helix-editor.com" include = ["src/**/*", "README.md"] default-run = "hx" -rust-version = "1.70" +rust-version.workspace = true [features] default = ["git"] diff --git a/helix-tui/Cargo.toml b/helix-tui/Cargo.toml index 245a6eea805e..602fa3e5ff76 100644 --- a/helix-tui/Cargo.toml +++ b/helix-tui/Cargo.toml @@ -5,8 +5,9 @@ authors = ["Blaž Hrastnik "] description = """ A library to build rich terminal user interfaces or dashboards """ -edition = "2021" -license = "MPL-2.0" +edition.workspace = true +license.workspace = true +rust-version.workspace = true categories = ["editor"] repository = "https://github.com/helix-editor/helix" homepage = "https://helix-editor.com" diff --git a/helix-vcs/Cargo.toml b/helix-vcs/Cargo.toml index edb6291c9460..1152cf9abc03 100644 --- a/helix-vcs/Cargo.toml +++ b/helix-vcs/Cargo.toml @@ -2,8 +2,9 @@ name = "helix-vcs" version = "0.6.0" authors = ["Blaž Hrastnik "] -edition = "2021" -license = "MPL-2.0" +edition.workspace = true +license.workspace = true +rust-version.workspace = true categories = ["editor"] repository = "https://github.com/helix-editor/helix" homepage = "https://helix-editor.com" diff --git a/helix-view/Cargo.toml b/helix-view/Cargo.toml index 9fe24bca6182..266abf5f50db 100644 --- a/helix-view/Cargo.toml +++ b/helix-view/Cargo.toml @@ -2,8 +2,9 @@ name = "helix-view" version = "0.6.0" authors = ["Blaž Hrastnik "] -edition = "2021" -license = "MPL-2.0" +edition.workspace = true +license.workspace = true +rust-version.workspace = true description = "UI abstractions for use in backends" categories = ["editor"] repository = "https://github.com/helix-editor/helix"