-
Notifications
You must be signed in to change notification settings - Fork 41
feat(log): Adjust the organizational form of rk8s to Workspace #256
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
Conversation
Signed-off-by: userhaptop <1307305157@qq.com>
jjl9807
left a comment
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.
需要调整当前代码以消除 537506b 从上游引入的重复依赖和冲突
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.
Pull Request Overview
This PR converts all crate-level dependency declarations to use workspace-level dependency management by centralizing dependency versions in the root Cargo.toml and referencing them with { workspace = true } throughout the project.
Key changes:
- Added a comprehensive
[workspace.dependencies]section in the rootCargo.tomlwith ~160 centralized dependency declarations - Updated 13 crate manifest files to reference workspace dependencies instead of declaring versions inline
- Minor formatting improvements (whitespace consistency in array/feature lists)
Reviewed Changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
project/Cargo.toml |
Added workspace-level dependency definitions (~160 entries) for version centralization |
project/slayerfs/Cargo.toml |
Converted all dependencies to use workspace = true references |
project/rks/Cargo.toml |
Converted dependencies to workspace references; retained old declarations (duplicate issue) |
project/rkl/Cargo.toml |
Converted dependencies to workspace references; retained old declarations (duplicate issue) |
project/rkb/Cargo.toml |
Converted all dependencies to use workspace references |
project/rfuse3/Cargo.toml |
Converted dependencies to workspace references; minor formatting cleanup |
project/libscheduler/Cargo.toml |
Converted dependencies to workspace references; retained old declarations (duplicate issue) |
project/libnetwork/Cargo.toml |
Converted all dependencies to use workspace references |
project/libipam/Cargo.toml |
Converted all dependencies to use workspace references |
project/libfuse-fs/Cargo.toml |
Converted all dependencies to use workspace references |
project/libcontainer/Cargo.toml |
Converted dependencies to workspace references; removed version comment markers |
project/libcni/Cargo.toml |
Converted all dependencies to use workspace references |
project/libcgroups/Cargo.toml |
Converted dependencies to workspace references; removed version comment marker |
project/libbridge/Cargo.toml |
Converted all dependencies to use workspace references |
project/distribution/Cargo.toml |
Converted all dependencies to use workspace references |
project/common/Cargo.toml |
Converted dependencies to workspace references; retained old declarations (duplicate issue) |
project/Cargo.lock |
Updated lockfile to reflect dependency resolution changes |
Comments suppressed due to low confidence (3)
project/rks/Cargo.toml:80
- Duplicate dependency declarations detected. The file contains both workspace-level dependencies (lines 10-50, 53) and the original inline version/path dependencies (lines 54-102). All the old dependency declarations starting from line 54 should be removed, as they are already defined using workspace references above.
common = { workspace = true }
libcni = { workspace = true }
libscheduler = { workspace = true }
libnetwork = { workspace = true }
tokio = { workspace = true, features = ["full"] }
serde = { workspace = true, features = ["derive"] }
clap = { workspace = true, features = ["derive"] }
quinn = { workspace = true }
rustls = { workspace = true }
serde_yaml = { workspace = true }
bincode = { workspace = true }
futures = { workspace = true }
anyhow = { workspace = true }
rcgen = { workspace = true }
etcd-client = { workspace = true }
ipnetwork = { workspace = true }
serde_json = { workspace = true }
chrono = { workspace = true, features = ["serde"] }
log = { workspace = true }
lazy_static = { workspace = true }
regex = { workspace = true }
context = { workspace = true }
async-trait = { workspace = true }
thiserror = { workspace = true }
native-tls = { workspace = true }
tonic = { workspace = true }
rand = { workspace = true }
netlink-packet-route = { workspace = true }
rtnetlink = { workspace = true }
nix = { workspace = true, features = ["net"] }
dotenvy = { workspace = true }
tempfile = { workspace = true }
tokio-util = { workspace = true }
env_logger = { workspace = true }
once_cell = { workspace = true }
futures-util = { workspace = true }
time = { workspace = true }
hickory-server = { workspace = true }
hickory-proto = { workspace = true }
hickory-resolver = { workspace = true }
iptables = { workspace = true }
[dev-dependencies]
serial_test = { workspace = true }
common = { path = "../common" }
libcni = { path = "../libcni" }
libscheduler = { path = "../libscheduler" }
libnetwork = { path = "../libnetwork", version = "0.1.0" }
tokio = { version = "1.44", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
clap = { version = "4.5.32", features = ["derive"] }
quinn = { version = "0.11.8" }
rustls = "0.23"
serde_yaml = "0.9"
bincode = "1.3.3"
futures = "0.3.31"
anyhow = "1.0.98"
rcgen = "0.12.1"
etcd-client = { version = "0.16.1", features = ["tls"] }
ipnetwork = "0.17"
serde_json = "1.0.107"
chrono = {version = "0.4.41", features = ["serde"]}
log = "0.4.26"
lazy_static = "1.5.0"
regex = "1.11.1"
context = "3.0.0"
async-trait = "0.1.88"
thiserror = "2.0.12"
native-tls = "0.2.14"
tonic = "0.13.1"
rand = "0.9.0"
project/libscheduler/Cargo.toml:30
- Duplicate dependency declarations detected. The file contains both workspace-level dependencies (lines 10-19) and the original inline version/path dependencies (lines 20-30). All the old dependency declarations starting from line 20 should be removed.
common = { workspace = true }
anyhow = { workspace = true }
bitflags = { workspace = true }
etcd-client = { workspace = true }
log = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_yaml = { workspace = true }
serial_test = { workspace = true }
tokio = { workspace = true }
uuid = { workspace = true }
common = { path = "../common" }
libvault = { path = "../libvault" }
anyhow = "1.0.98"
bitflags = "2.9.2"
etcd-client = "0.16.1"
log = "0.4.27"
serde = { version = "1.0.219", features = ["derive"] }
serde_yaml = "0.9.34"
serial_test = "3.2.0"
tokio = "1.46.1"
uuid = "1.17.0"
project/common/Cargo.toml:24
- Duplicate dependency declarations detected. The file contains both workspace-level dependencies (lines 14-18) and the original inline version/path dependencies (lines 19-24 onwards). All the old dependency declarations starting from line 19 should be removed.
serde = { workspace = true, features = ["derive"] }
libcni = { workspace = true }
serde_json = { workspace = true }
chrono = { workspace = true, features = ["serde"] }
ipnetwork = { workspace = true }
serde = { version = "1", features = ["derive"] }
libcni = { path = "../libcni" }
serde_json = "1.0"
chrono = { version = "0.4.42", features = ["serde"] }
quinn = "0.11.9"
ipnetwork = "0.17"
| common = { workspace = true } | ||
| libnetwork = { workspace = true } | ||
| rkb = { workspace = true } | ||
| libipam = { workspace = true } | ||
| libcgroups = { workspace = true } | ||
| libcontainer = { workspace = true } | ||
| clap = { workspace = true, features = ["derive"] } | ||
| tracing = { workspace = true, features = ["attributes"] } | ||
| tracing-subscriber = { workspace = true, features = ["json","env-filter"] } | ||
| tokio = { workspace = true, features = ["rt-multi-thread","macros","full"] } | ||
| serde = { workspace = true, features = ["derive"] } | ||
| uuid = { workspace = true, features = ["v4"] } | ||
| nix = { workspace = true, features = ["fs","mount"] } | ||
| libcni = { workspace = true } | ||
| libfuse-fs = { workspace = true } | ||
| anyhow = { workspace = true } | ||
| protobuf = { workspace = true } | ||
| liboci-cli = { workspace = true } | ||
| tracing-journald = { workspace = true } | ||
| serde_json = { workspace = true } | ||
| tonic = { workspace = true } | ||
| prost = { workspace = true } | ||
| serde_yaml = { workspace = true } | ||
| prost-types = { workspace = true } | ||
| http-body = { workspace = true } | ||
| hyper = { workspace = true } | ||
| serial_test = { workspace = true } | ||
| oci-spec = { workspace = true } | ||
| tar = { workspace = true } | ||
| flate2 = { workspace = true } | ||
| sha256 = { workspace = true } | ||
| futures = { workspace = true } | ||
| daemonize = { workspace = true } | ||
| axum = { workspace = true } | ||
| chrono = { workspace = true } | ||
| tabwriter = { workspace = true } | ||
| bincode = { workspace = true } | ||
| quinn = { workspace = true } | ||
| rustls = { workspace = true } | ||
| gethostname = { workspace = true } | ||
| sysinfo = { workspace = true } | ||
| ipnetwork = { workspace = true } | ||
| log = { workspace = true } | ||
| lazy_static = { workspace = true } | ||
| regex = { workspace = true } | ||
| dotenvy = { workspace = true } | ||
| netlink-packet-route = { workspace = true } | ||
| json = { workspace = true } | ||
| thiserror = { workspace = true } | ||
| hex = { workspace = true } | ||
| rand = { workspace = true } | ||
| cni-plugin = { workspace = true } | ||
| common = { path = "../common" } | ||
| libnetwork = { path = "../libnetwork", version = "0.1.0" } | ||
| rkb = { path = "../rkb", version = "0.1.0" } |
Copilot
AI
Nov 7, 2025
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.
Duplicate dependency declarations detected. The file contains both workspace-level dependencies (lines 18-69) and the original inline version/path dependencies (lines 70 onwards). All the old dependency declarations starting from line 70 should be removed.
| "libfuse-fs", | ||
| "rfuse3", | ||
| "libipam", | ||
| "libcontainer", |
Copilot
AI
Nov 7, 2025
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.
The 'libcontainer' crate is listed twice in the workspace members array (lines 7 and 11). Remove one of the duplicate entries.
| "libcontainer", |
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.
Pull Request Overview
Copilot reviewed 16 out of 17 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (2)
project/Cargo.toml:16
- Duplicate workspace members detected: 'libcontainer' (lines 7 and 11), 'libfuse-fs' (lines 8 and 13), 'rfuse3' (lines 9 and 15), and 'libipam' (lines 10 and 16). Remove the duplicates to avoid workspace configuration errors.
"libcontainer",
"libfuse-fs",
"rfuse3",
"libipam",
"libcontainer",
"libnetwork",
"libfuse-fs",
"libvault",
"rfuse3",
"libipam",
project/common/Cargo.toml:22
- Duplicate dependency declarations: workspace-level dependencies are declared at lines 14-18, but old version-pinned declarations remain at lines 19-22. Remove the old declarations to prevent version conflicts.
serde = { workspace = true, features = ["derive"] }
libcni = { workspace = true }
serde_json = { workspace = true }
chrono = { workspace = true, features = ["serde"] }
ipnetwork = { workspace = true }
serde = { version = "1", features = ["derive"] }
libcni = { path = "../libcni" }
serde_json = "1.0"
chrono = { version = "0.4.42", features = ["serde"] }
| common = { path = "../common" } | ||
| libcni = { path = "../libcni" } | ||
| libscheduler = { path = "../libscheduler" } |
Copilot
AI
Nov 7, 2025
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.
Duplicate dependency declarations: workspace-level dependencies are already declared at lines 10-13, but old path-based declarations remain starting at line 54. These duplicates will cause conflicts and should be removed.
| common = { workspace = true } | ||
| anyhow = { workspace = true } | ||
| bitflags = { workspace = true } | ||
| etcd-client = { workspace = true } | ||
| log = { workspace = true } | ||
| serde = { workspace = true, features = ["derive"] } | ||
| serde_yaml = { workspace = true } | ||
| serial_test = { workspace = true } | ||
| tokio = { workspace = true } | ||
| uuid = { workspace = true } | ||
| common = { path = "../common" } |
Copilot
AI
Nov 7, 2025
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.
Duplicate dependency declarations: workspace-level dependencies are declared at lines 10-19, but old path-based and version-pinned declarations remain starting at line 20. Remove the old declarations to complete the migration.
| common = { workspace = true } | ||
| libnetwork = { workspace = true } | ||
| rkb = { workspace = true } |
Copilot
AI
Nov 7, 2025
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.
Duplicate dependency declarations: workspace-level dependencies are already declared starting at line 18, but old path-based declarations with version pins remain at line 70 onwards. These duplicates will cause build conflicts and must be removed.
No description provided.