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

Rust: Cargo.toml discovery fails if in a workspace and said manifest is not a member but used in members with workspace dependencies #5864

Closed
1 task done
poliorcetics opened this issue Oct 10, 2022 · 1 comment · Fixed by #5865 or #7649
Labels
L: rust:cargo Rust crates via cargo T: bug 🐞 Something isn't working

Comments

@poliorcetics
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Package ecosystem

rust, cargo

Package manager version

cargo 1.64.0+

Language version

rust 1.64.0+

Manifest location and content before the Dependabot update

The situation appeared after my PR #5794, and this use case is a little weird so I didn't think about it.

  1. Have a Cargo workspace, e.g:
root/
- Cargo.toml (C1)
- crate_in_workspace/Cargo.toml (C2)
- crate_outside_workspace/Cargo.toml (C3)
# In (C1)
[workspace.package]
version  = "1.0.0"

[workspace]
members = [ "crate_in_workspace" ]

[workspace.dependencies]
crate_outside_workspace = { version = "1", path = "./crate_outside_workspace" }
# In (C2)
[package]
version.workspace = true

[dependencies]
crate_outside_workspace.workspace = true

dependabot.yml content

No response

Updated dependency

No response

What you expected to see, versus what you actually saw

Dependabot will currently fail on the config presented earlier with the error that it cannot find crate_outside_workspace/Cargo.toml.

This happens because the workspace.dependencies table is not looked at by the file filter and I forgot to add it when adding the support for workspace dependencies in #5794.

Native package manager behavior

No response

Images of the diff or a link to the PR, issue, or logs

No response

Smallest manifest that reproduces the issue

No response

@jeffwidman
Copy link
Member

Thanks for putting up a PR for this too! 😍

ahl added a commit to oxidecomputer/omicron that referenced this issue Jan 10, 2023
Fixes #2125 

See dependabot/dependabot-core#5864

I added the missing workspace members to the `members` array in the top
level `Cargo.toml`. I also put all members into `sort` order since there
were several opinions expressed in the list about the order of ASCII
(and the order of the alphabet).
@jeffwidman jeffwidman changed the title Rust: Cargo.toml discovery fails if in a workspace and said manifest is not a member but used in members with worskspace dependencies Rust: Cargo.toml discovery fails if in a workspace and said manifest is not a member but used in members with workspace dependencies Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: rust:cargo Rust crates via cargo T: bug 🐞 Something isn't working
Projects
Archived in project
2 participants