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

Nextest doesn't work in workspace where Cargo.toml of workspace is not hierarchically higher than crates #1684

Open
Elrendio opened this issue Sep 4, 2024 · 7 comments
Labels
help wanted Extra attention is needed

Comments

@Elrendio
Copy link

Elrendio commented Sep 4, 2024

Output

image

File structures

Repo
  .cargo/workspace/Cargo.toml
  Crate/
     src/
     Cargo.toml

MinimalRepro repository

What I think the issue is

I believe that nextest assumes that the workspace Cargo.toml will always be in a parent folder of the crates the workspace contains.

@sunshowers
Copy link
Member

Thank you! I've never seen this before to be honest. Do you have a reference in the Cargo documentation for it?

@Elrendio
Copy link
Author

Elrendio commented Sep 5, 2024

Hi @sunshowers , I'm sorry but I didn't understand what reference do you want me to provide?

@sunshowers
Copy link
Member

sunshowers commented Sep 5, 2024

Thanks. I had another look at your repro, and to be honest I didn't know that you could use .. in workspace members! It definitely seems rare, I've never seen a Rust project in the wild do this.

This would have to be addressed in the underlying guppy library (also maintained by myself), https://github.com/guppy-rs/guppy. I don't plan to fix this myself but a patch would be welcome.

@sunshowers sunshowers added the help wanted Extra attention is needed label Sep 19, 2024
@sunshowers
Copy link
Member

I don't plan to work on this, but a patch would be welcome.

@PegasusPlusUS
Copy link

I checked the error message, if do not restrict manifest path must within workspace path, nextest can run tests at MinimalRepo. If you are sure this restriction can be bypass optionally, I can try provide patch to Guppy and Nextest.

@PegasusPlusUS
Copy link

Patch is ready now, for guppy repository, please review
0001-Help-fix-manifest-might-exist-out-of-workspace-root-.patch

@PegasusPlusUS
Copy link

In guppy PR #331 now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants