Skip to content

refactor: Use cargo autoinherit to factorize the dependencies#3477

Open
lu-zero wants to merge 2 commits intoyouki-dev:mainfrom
lu-zero:refactor-dependencies
Open

refactor: Use cargo autoinherit to factorize the dependencies#3477
lu-zero wants to merge 2 commits intoyouki-dev:mainfrom
lu-zero:refactor-dependencies

Conversation

@lu-zero
Copy link
Copy Markdown

@lu-zero lu-zero commented Mar 30, 2026

cargo tree is unchanged.

Description

Refactor the dependencies so they versions are in sync across the workspace.

Type of Change

  • Refactoring (no functional changes)

Testing

I ran cargo tree before and after.

@saku3 saku3 added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Mar 31, 2026
Copy link
Copy Markdown
Member

@saku3 saku3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

In addition to checking cargo tree, could you also verify that the version-up script works correctly?

https://github.com/youki-dev/youki/blob/main/justfile#L203

tracing = { workspace = true, features = ["attributes"] }
tracing-subscriber = { workspace = true, features = ["json", "env-filter"] }
regex = { workspace = true }
clap= { workspace = true, features = ["std", "suggestions", "derive", "cargo", "help", "usage", "error-context"] }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
clap= { workspace = true, features = ["std", "suggestions", "derive", "cargo", "help", "usage", "error-context"] }
clap = { workspace = true, features = ["std", "suggestions", "derive", "cargo", "help", "usage", "error-context"] }

[dependencies]
anyhow = "1.0.102"
chrono = { version = "0.4", default-features = false, features = ["clock", "serde"] }
clap= { workspace = true, features = ["std", "suggestions", "derive", "cargo", "help", "usage", "error-context"] }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
clap= { workspace = true, features = ["std", "suggestions", "derive", "cargo", "help", "usage", "error-context"] }
clap = { workspace = true, features = ["std", "suggestions", "derive", "cargo", "help", "usage", "error-context"] }

Cargo.toml Outdated
flate2 = "1.1"
libbpf-sys = "1.6.4"
libc = "0.2.180"
liboci-cli = { version = "0.6.0", path = "crates/liboci-cli" }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/youki-dev/youki/blob/main/justfile#L203

# MARK: Version is needed for tagpr to run the version-up script above.

Suggested change
liboci-cli = { version = "0.6.0", path = "crates/liboci-cli" }
liboci-cli = { version = "0.6.0", path = "crates/liboci-cli" } # MARK: Version

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lu-zero

Sorry for the multiple comments, but could you address this as well?

Without this change, just version-up will no longer work correctly.

This is required for tagpr to update the version automatically.

tracing = { version = "0.1.44", features = ["attributes"] }
tracing-subscriber = { version = "0.3.23", features = ["json", "env-filter"] }
tracing-journald = "0.3.2"
liboci-cli = { workspace = true } # MARK: Version
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# MARK: Version is not needed.

@lu-zero lu-zero force-pushed the refactor-dependencies branch from c64b721 to b4656cd Compare March 31, 2026 20:58
@lu-zero
Copy link
Copy Markdown
Author

lu-zero commented Mar 31, 2026

rebased, changed folded and sorted the version to be last to fit the script.

@lu-zero lu-zero mentioned this pull request Apr 1, 2026
9 tasks
@lu-zero lu-zero force-pushed the refactor-dependencies branch from b4656cd to 2ec903f Compare April 6, 2026 05:50
@utam0k utam0k requested a review from saku3 April 7, 2026 12:37
Copy link
Copy Markdown
Member

@saku3 saku3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the update.

Could you also check whether the DCO sign-off is in place?

https://github.com/youki-dev/youki/pull/3477/checks?check_run_id=70048530980

@@ -1,7 +0,0 @@
[workspace]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not be removed.

Without it, neither cargo tree nor the build will work.
It looks like something may have gone wrong during the rebase.

nix = { workspace = true, features = ["signal", "user", "fs"] }
procfs = { workspace = true }
pathrs = { workspace = true }
oci-spec = { version = "~0.9.0", features = ["runtime"] }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to unify oci-spec as well.

I'd like to settle this here as well. I think ~0.9.0 is fine.

@lu-zero lu-zero force-pushed the refactor-dependencies branch from 2ec903f to 53db457 Compare April 8, 2026 06:14
@saku3
Copy link
Copy Markdown
Member

saku3 commented Apr 11, 2026

Please also address the comment about # MARK: Version.

@lu-zero lu-zero force-pushed the refactor-dependencies branch 5 times, most recently from dd9fefc to 0a59a02 Compare April 12, 2026 06:56
@saku3
Copy link
Copy Markdown
Member

saku3 commented Apr 13, 2026

The CI should pass once the latest upstream changes are merged in.

Sorry for the extra work, but could you please merge the latest upstream changes?

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
@lu-zero lu-zero force-pushed the refactor-dependencies branch from 0a59a02 to 8db7376 Compare April 13, 2026 12:37
@lu-zero
Copy link
Copy Markdown
Author

lu-zero commented Apr 13, 2026

Every time I have to redo the patch from scratch, luckily it is 90% automated.

@saku3
Copy link
Copy Markdown
Member

saku3 commented Apr 13, 2026

I’m sorry, I committed this by mistake.

Would it be possible to remove the following commit?

lu-zero@7ffbee6

@lu-zero lu-zero force-pushed the refactor-dependencies branch from 7ffbee6 to 8db7376 Compare April 13, 2026 15:33
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
@lu-zero lu-zero force-pushed the refactor-dependencies branch from 8db7376 to 63110ac Compare April 13, 2026 15:34
@lu-zero
Copy link
Copy Markdown
Author

lu-zero commented Apr 13, 2026

Folded in, I hope that's what you have in mind :)

Copy link
Copy Markdown
Member

@saku3 saku3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for your repeated help.

@saku3 saku3 requested review from a team April 13, 2026 16:05
@saku3
Copy link
Copy Markdown
Member

saku3 commented Apr 13, 2026

@youki-dev/youki
@youki-dev/youki-reviewers

I think this is a good change that consolidates the dependencies.

I’d appreciate it if you could take a look and check whether I’ve missed anything.

Since changes to Cargo.toml tend to cause rebases more easily, I’d also appreciate it if this could be reviewed with priority.

Copy link
Copy Markdown
Contributor

@nayuta723 nayuta723 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left a few comments, so please take a look when you have a time.

crossbeam = "0.8.4"
env_logger = "0.11"
errno = "0.3.14"
fastrand = "2.3.0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fastrand = "2.3.0"
fastrand = "^2.3.0"

thiserror = { workspace = true }
tracing = { workspace = true, features = ["attributes"] }
tracing-subscriber = { workspace = true, features = ["json", "env-filter"] }
regex = { workspace = true }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
regex = { workspace = true }
regex = { workspace = true, features = ["std"] }

oci-spec = { workspace = true, features = ["proptests", "runtime"] }
quickcheck = { workspace = true }
mockall = { workspace = true, features = [] }
clap = { workspace = true }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
clap = { workspace = true }
clap = { workspace = true, features = ["std", "color", "help", "usage", "error-context", "suggestions"] }

ref: https://github.com/clap-rs/clap/blob/v4.5.13/Cargo.toml#L140-L148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants