-
-
Notifications
You must be signed in to change notification settings - Fork 884
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
Specify dependencies and metadata for entire workspace #2565
Conversation
83f3b78
to
50b72c6
Compare
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.
Are you using any tool to analyze these, cargo deps
maybe?
captcha = "0.0.9" | ||
anyhow = "1.0.66" | ||
diesel_ltree = "0.3.0" | ||
typed-builder = "0.10.0" |
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.
Can't a lot of these dependencies use workspace = true
also? Almost all of them are included in utils.
edit: okay I spose this seems good, since you're preferring to specify them higher up, then use them lower.
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.
I excluded deps which are only used in one of our crates. Seems like it would be more annoying than helpful to specify them in two places in that case.
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.
And only tools im using are cargo check/cargo tree.
webpage = { version = "1.4.0", default-features = false, features = ["serde"], optional = true } | ||
regex = "1.6.0" | ||
encoding = { version = "0.2.33", optional = true } |
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.
It might be more organized to make everything in all of these workspace crates use workspace = true
, and move all the deps to the top level. Not sure.
use crate::newtypes::{CommentId, DbUrl, LanguageId, LtreeDef, PersonId, PostId}; | ||
#[cfg(feature = "full")] | ||
use crate::newtypes::LtreeDef; | ||
use crate::newtypes::{CommentId, DbUrl, LanguageId, PersonId, PostId}; |
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.
Guessing this is gonna fail CI check.
Found something interesting, cargo deny, testing it out now:
|
- name: lemmy_api_common doesnt depend on diesel | ||
image: rust:1.64-buster | ||
commands: | ||
- "! cargo tree -p lemmy_api_common --no-default-features -i diesel" |
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 exclamation point isn't necessary right?
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.
Its necessary because we want to ensure that the command returns an error via exit code. This means the diesel dependency was not found, which is the goal in this case. Crates which pull in lemmy_api_common to access api structs (eg lemmybb) shouldnt have to compile diesel.
f1cdffe
to
c7aa070
Compare
Some of the database tests are failing randomly, happened in other PRs as well:
|
We are now using Rust 1.64 in CI, so we can use this feature.