-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
cp: compile without clap (for nushell) #5358
Conversation
Co-authored-by: Sylvestre Ledru <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! I think there's a few bits missing:
clap
is referred to in more parts of uucore:perms.rs
shortcut_value_parser.rs
backup_control.rs
update_control.rs
- Because of those, the dependency isn't actually removed. Try for instance
cargo check --no-default-features
in thesrc/uu/cp
folder. cli-parser
should be a default feature onuucore
, because otherwise none of the utils will compile individually. (Try for examplecargo run --no-default--features --features arch
)
Hi @tertsdiepraam as you can see in the latest commit I tried to fulfill the requirements but still when you run ❯ cargo tree --no-default-features
uu_cp v0.0.21 (/home/arch/code/tommady/coreutils/src/uu/cp)
├── filetime v0.2.22
│ ├── cfg-if v1.0.0
│ └── libc v0.2.148
├── indicatif v0.17.3
│ ├── console v0.15.7
│ │ ├── lazy_static v1.4.0
│ │ ├── libc v0.2.148
│ │ └── unicode-width v0.1.11
│ ├── number_prefix v0.4.0
│ ├── portable-atomic v0.3.15
│ └── unicode-width v0.1.11
├── libc v0.2.148
├── quick-error v2.0.1
├── uucore v0.0.21 (/home/arch/code/tommady/coreutils/src/uucore)
│ ├── clap v4.4.2
│ │ └── clap_builder v4.4.2
│ │ ├── anstream v0.5.0
│ │ │ ├── anstyle v1.0.0
│ │ │ ├── anstyle-parse v0.2.0
│ │ │ │ └── utf8parse v0.2.1
│ │ │ ├── anstyle-query v1.0.0
│ │ │ ├── colorchoice v1.0.0
│ │ │ └── utf8parse v0.2.1
│ │ ├── anstyle v1.0.0
│ │ ├── clap_lex v0.5.0
│ │ ├── strsim v0.10.0
│ │ └── terminal_size v0.2.6
│ │ └── rustix v0.37.23
│ │ ├── bitflags v1.3.2
│ │ ├── io-lifetimes v1.0.11
│ │ │ └── libc v0.2.148
│ │ ├── libc v0.2.148
│ │ └── linux-raw-sys v0.3.8
│ ├── dunce v1.0.4
│ ├── glob v0.3.1
│ ├── libc v0.2.148
│ ├── nix v0.27.1
│ │ ├── bitflags v2.4.0
│ │ ├── cfg-if v1.0.0
│ │ └── libc v0.2.148
│ ├── once_cell v1.18.0
│ ├── os_display v0.1.3
│ │ └── unicode-width v0.1.11
│ ├── uucore_procs v0.0.21 (proc-macro) (/home/arch/code/tommady/coreutils/src/uucore_procs)
│ │ ├── proc-macro2 v1.0.63
│ │ │ └── unicode-ident v1.0.5
│ │ ├── quote v1.0.29
│ │ │ └── proc-macro2 v1.0.63 (*)
│ │ └── uuhelp_parser v0.0.21 (/home/arch/code/tommady/coreutils/src/uuhelp_parser)
│ ├── walkdir v2.4.0
│ │ └── same-file v1.0.6
│ └── wild v2.2.0
├── walkdir v2.4.0 (*)
└── xattr v1.0.1
└── libc v0.2.148 under the cp folder, the clap dep stands still. I tried a lot of ways to remove that but if any one of these features is used then the clap dep cannot be removed...
please guide me when you have time. |
I had to look around for a bit but I think this fixed it! Default features and workspaces are a bit weird together :) diff --git a/Cargo.toml b/Cargo.toml
index e7fc2851b..2beaf7630 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -343,7 +343,7 @@ blake3 = "1.5.0"
sm3 = "0.4.2"
digest = "0.10.7"
-uucore = { version = ">=0.0.19", package = "uucore", path = "src/uucore" }
+uucore = { version = ">=0.0.19", package = "uucore", path = "src/uucore", default-features = false }
uucore_procs = { version = ">=0.0.19", package = "uucore_procs", path = "src/uucore_procs" }
uu_ls = { version = ">=0.0.18", path = "src/uu/ls" }
uu_base32 = { version = ">=0.0.18", path = "src/uu/base32" } |
wonderful it did! thanks! |
Co-authored-by: Sylvestre Ledru <[email protected]>
GNU testsuite comparison:
|
@tommady sorry but it needs to be rebased |
@tommady sorry, i noticed that it never landed, is it still relevant ? if so, can you please rebase it and i will merge it |
fulfill #5203