Skip to content
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

chore: move common dependencies to workspace Cargo.toml #1388

Merged
merged 3 commits into from
Aug 3, 2024
Merged

chore: move common dependencies to workspace Cargo.toml #1388

merged 3 commits into from
Aug 3, 2024

Conversation

karimElmougi
Copy link
Contributor

It's easier to keep versions in sync across the entire workspace this way.

@karimElmougi karimElmougi changed the title chore: Move common dependencies to workspace chore: Move common dependencies to workspace Cargo.toml Aug 1, 2024
@sxyazi
Copy link
Owner

sxyazi commented Aug 1, 2024

Thanks for the PR!

Every crate of Yazi gets published to crates.io, will this have any impact on it?

@karimElmougi
Copy link
Contributor Author

karimElmougi commented Aug 1, 2024

I don't believe it should cause any issues. quickwit makes use of workspace dependencies, and their crates get published as well.

@sxyazi
Copy link
Owner

sxyazi commented Aug 2, 2024

I don't believe it should cause any issues. quickwit makes use of workspace dependencies, and their crates get published as well.

Nice, TIL about that.

color_quant = "1.1.0"
crossterm = "0.27.0"
futures = "0.3.30"
crossterm = { workspace = true }
Copy link
Owner

Choose a reason for hiding this comment

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

We can't use { workspace = true } here because the "use-dev-tty" feature can only be enabled on macOS systems.

Copy link
Contributor Author

@karimElmougi karimElmougi Aug 2, 2024

Choose a reason for hiding this comment

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

Ah, I see. I hadn't realized. I pushed a fix. { workspace = true, features = [ "use-dev-tty" ] } lets the version be defined once in the root Cargo.toml, but with additive features. Details here: https://doc.rust-lang.org/cargo/reference/workspaces.html#the-dependencies-table

@sxyazi sxyazi force-pushed the main branch 2 times, most recently from 33d04f9 to 3fdbbfe Compare August 2, 2024 09:43
@sxyazi sxyazi changed the title chore: Move common dependencies to workspace Cargo.toml chore: move common dependencies to workspace Cargo.toml Aug 3, 2024
Copy link
Owner

@sxyazi sxyazi left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@sxyazi sxyazi merged commit d2ebadb into sxyazi:main Aug 3, 2024
6 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants