feat: Add support for workspace.dependencies in cargo 1.64.0+#5794
feat: Add support for workspace.dependencies in cargo 1.64.0+#5794jeffwidman merged 2 commits intodependabot:mainfrom
workspace.dependencies in cargo 1.64.0+#5794Conversation
|
Since Dependabot already handled dependencies like |
|
Hi @poliorcetics, thanks for this contribution! I'm new to the Rust ecosystem, so I did some light reading on [workspace.dependencies] and it looks like the key is actually called Dependabot will already include any dependencies under the In order to get this merged in we will need to test that a project with Something similar to https://github.com/dependabot/dependabot-core/blob/78afa00dbd274ed937d8ff70118d2d4335d39526/cargo/spec/dependabot/cargo/file_parser_spec.rb#L123-L151 The manifest referenced in that file is at https://github.com/dependabot/dependabot-core/blob/78afa00dbd274ed937d8ff70118d2d4335d39526/cargo/spec/fixtures/manifests/repeated_dependency |
This is not a single TOML key, This is a key and a subkey. The following samples are equivalent (Rust playground code for example) [workspace.dependencies]
dep-name = "version"[workspace]
dependencies = { dep-name = "version" }workspace.dependencies = { dep-name = "version" }So to parse Thanks for the guidance on testing, I'll try to write one |
f1b723f to
70e26f9
Compare
5d8daef to
b4eca22
Compare
b4eca22 to
3a2b127
Compare
Nishnha
left a comment
There was a problem hiding this comment.
This PR updates the version of Cargo we use in our Dockerfile since it introduces support for a new feature.
I thought about moving the check for workspace dependencies into our existing DEPENDENCY_TYPES.each loop in the file_parser, but it's more maintainable as it is and Cargo workspaces currently only support regular dependencies (as opposed to dev-dependencies and build-dependencies), so this is fine.
e3d9cec to
be1c977
Compare
|
Thanks for the help and fixing my mistakes @Nishnha, it was greatly appreciated 😄 |
be1c977 to
f4f6ba2
Compare
|
What's left to do ? |
jeffwidman
left a comment
There was a problem hiding this comment.
I don't know a ton about Rust, but from what I understand this looks straightforward.
We follow a deploy-then-monitor-prod-then-merge strategy, so one of us will try to do that when we get a few spare cycles in the next few days.
f4f6ba2 to
1a8b571
Compare
1a8b571 to
0c3bfbe
Compare
I did not write tests because I don't know enough Ruby to do it, but I
will gladly accept directions on it.
Closes #5315
See the section on Cargo in https://github.com/rust-lang/rust/releases/tag/1.64.0 for more details about the workspace feature.