From 1c654f23af368152737e0b6542506995372281af Mon Sep 17 00:00:00 2001 From: Daniel Rainer Date: Tue, 19 Aug 2025 22:35:15 +0200 Subject: [PATCH] Put local dependencies in `crates` directory With an increasing number of local dependencies, the repo root is getting somewhat bloated. This commit moves the two current local dependencies into the newly created `crates` directory, with the intention of using it for all future local dependencies as well. Some dependencies which are introduced by currently in-progress pull requests will need modifications in order for relative paths to work correctly. --- Cargo.toml | 6 +++--- build.rs | 4 ++-- .../gettext-extraction}/Cargo.toml | 0 .../gettext-extraction}/src/lib.rs | 0 {printf => crates/printf}/Cargo.toml | 0 {printf => crates/printf}/LICENSE | 0 {printf => crates/printf}/README.md | 0 {printf => crates/printf}/clippy.toml | 0 {printf => crates/printf}/src/arg.rs | 0 {printf => crates/printf}/src/fmt_fp/decimal.rs | 0 {printf => crates/printf}/src/fmt_fp/mod.rs | 0 {printf => crates/printf}/src/fmt_fp/tests.rs | 0 {printf => crates/printf}/src/lib.rs | 0 {printf => crates/printf}/src/locale.rs | 0 {printf => crates/printf}/src/printf_impl.rs | 0 {printf => crates/printf}/src/tests.rs | 0 16 files changed, 5 insertions(+), 5 deletions(-) rename {gettext-extraction => crates/gettext-extraction}/Cargo.toml (100%) rename {gettext-extraction => crates/gettext-extraction}/src/lib.rs (100%) rename {printf => crates/printf}/Cargo.toml (100%) rename {printf => crates/printf}/LICENSE (100%) rename {printf => crates/printf}/README.md (100%) rename {printf => crates/printf}/clippy.toml (100%) rename {printf => crates/printf}/src/arg.rs (100%) rename {printf => crates/printf}/src/fmt_fp/decimal.rs (100%) rename {printf => crates/printf}/src/fmt_fp/mod.rs (100%) rename {printf => crates/printf}/src/fmt_fp/tests.rs (100%) rename {printf => crates/printf}/src/lib.rs (100%) rename {printf => crates/printf}/src/locale.rs (100%) rename {printf => crates/printf}/src/printf_impl.rs (100%) rename {printf => crates/printf}/src/tests.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 575f21cc7..ba7f4b1d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] resolver = "2" -members = ["printf", "gettext-extraction"] +members = ["crates/*"] [workspace.package] # To build revisions that use Corrosion (those before 2024-01), use CMake 3.19, Rustc 1.78 and Rustup 1.27. @@ -48,8 +48,8 @@ nix = { version = "0.30.1", default-features = false, features = [ ] } num-traits = "0.2.19" once_cell = "1.19.0" -fish-printf = { path = "./printf", features = ["widestring"] } -fish-gettext-extraction = { path = "./gettext-extraction", optional = true } +fish-printf = { path = "crates/printf", features = ["widestring"] } +fish-gettext-extraction = { path = "crates/gettext-extraction", optional = true } # Don't use the "getrandom" feature as it requires "getentropy" which was not # available on macOS < 10.12. We can enable "getrandom" when we raise the diff --git a/build.rs b/build.rs index 036a43450..a31076f61 100644 --- a/build.rs +++ b/build.rs @@ -67,8 +67,8 @@ fn main() { "build.rs", "Cargo.lock", "Cargo.toml", - "gettext-extraction", - "printf", + "crates/gettext-extraction", + "crates/printf", "src", ]); diff --git a/gettext-extraction/Cargo.toml b/crates/gettext-extraction/Cargo.toml similarity index 100% rename from gettext-extraction/Cargo.toml rename to crates/gettext-extraction/Cargo.toml diff --git a/gettext-extraction/src/lib.rs b/crates/gettext-extraction/src/lib.rs similarity index 100% rename from gettext-extraction/src/lib.rs rename to crates/gettext-extraction/src/lib.rs diff --git a/printf/Cargo.toml b/crates/printf/Cargo.toml similarity index 100% rename from printf/Cargo.toml rename to crates/printf/Cargo.toml diff --git a/printf/LICENSE b/crates/printf/LICENSE similarity index 100% rename from printf/LICENSE rename to crates/printf/LICENSE diff --git a/printf/README.md b/crates/printf/README.md similarity index 100% rename from printf/README.md rename to crates/printf/README.md diff --git a/printf/clippy.toml b/crates/printf/clippy.toml similarity index 100% rename from printf/clippy.toml rename to crates/printf/clippy.toml diff --git a/printf/src/arg.rs b/crates/printf/src/arg.rs similarity index 100% rename from printf/src/arg.rs rename to crates/printf/src/arg.rs diff --git a/printf/src/fmt_fp/decimal.rs b/crates/printf/src/fmt_fp/decimal.rs similarity index 100% rename from printf/src/fmt_fp/decimal.rs rename to crates/printf/src/fmt_fp/decimal.rs diff --git a/printf/src/fmt_fp/mod.rs b/crates/printf/src/fmt_fp/mod.rs similarity index 100% rename from printf/src/fmt_fp/mod.rs rename to crates/printf/src/fmt_fp/mod.rs diff --git a/printf/src/fmt_fp/tests.rs b/crates/printf/src/fmt_fp/tests.rs similarity index 100% rename from printf/src/fmt_fp/tests.rs rename to crates/printf/src/fmt_fp/tests.rs diff --git a/printf/src/lib.rs b/crates/printf/src/lib.rs similarity index 100% rename from printf/src/lib.rs rename to crates/printf/src/lib.rs diff --git a/printf/src/locale.rs b/crates/printf/src/locale.rs similarity index 100% rename from printf/src/locale.rs rename to crates/printf/src/locale.rs diff --git a/printf/src/printf_impl.rs b/crates/printf/src/printf_impl.rs similarity index 100% rename from printf/src/printf_impl.rs rename to crates/printf/src/printf_impl.rs diff --git a/printf/src/tests.rs b/crates/printf/src/tests.rs similarity index 100% rename from printf/src/tests.rs rename to crates/printf/src/tests.rs