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: failed to find a workspace root for workspace dependency in a non-workspace crate #9533

Closed
1 task done
Jefffrey opened this issue Apr 18, 2024 · 0 comments · Fixed by #10550
Closed
1 task done
Labels
L: git:submodules Git submodules L: go:modules Golang modules L: rust:cargo Rust crates via cargo T: bug 🐞 Something isn't working

Comments

@Jefffrey
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Package ecosystem

cargo

Package manager version

1.77

Language version

1.77

Manifest location and content before the Dependabot update

No response

dependabot.yml content

https://github.com/apache/arrow-datafusion/blob/b2f5e39c4636951ccb7357478f21fcf34a692f51/.github/dependabot.yml

Updated dependency

No response

What you expected to see, versus what you actually saw

We have a repository with a workspace (datafusion):

https://github.com/apache/arrow-datafusion/blob/b2f5e39c4636951ccb7357478f21fcf34a692f51/Cargo.toml#L18-L43

However we have a nested crate which is excluded from the workspace:

https://github.com/apache/arrow-datafusion/blob/b2f5e39c4636951ccb7357478f21fcf34a692f51/datafusion-cli/Cargo.toml

This nested crate (datafusion-cli) has a dependency on datafusion. We are getting this error when trying to setup dependabot for datafusion-cli:

 Dependabot can't resolve your Rust dependency files

Dependabot failed to update your dependencies because there was an error resolving your Rust dependency files.

Dependabot encountered the following error:

Updating crates.io index
error: failed to get `datafusion` as a dependency of package `datafusion-cli v37.0.0 (dependabot_tmp_dir/datafusion-cli)`

Caused by:
  failed to load source for dependency `datafusion`

Caused by:
  Unable to update dependabot_tmp_dir/datafusion/core

Caused by:
  failed to parse manifest at `dependabot_tmp_dir/datafusion/core/Cargo.toml`

Caused by:
  error inheriting `version` from workspace root manifest's `workspace.package.version`

Caused by:
  failed to find a workspace root

Usually to build/check/run datafusion-cli we would cd into the datafusion-cli/ dir and run the cargo commands there, and that would work to build and resolve dependencies just fine.

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

@Jefffrey Jefffrey added the T: bug 🐞 Something isn't working label Apr 18, 2024
@github-actions github-actions bot added L: git:submodules Git submodules L: go:modules Golang modules L: rust:cargo Rust crates via cargo labels Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: git:submodules Git submodules L: go:modules Golang modules L: rust:cargo Rust crates via cargo T: bug 🐞 Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant