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

The extension does nothing if the crate is not in workspace root #471

Closed
necauqua opened this issue Apr 1, 2024 · 2 comments · Fixed by #474
Closed

The extension does nothing if the crate is not in workspace root #471

necauqua opened this issue Apr 1, 2024 · 2 comments · Fixed by #474
Labels
bug Something isn't working

Comments

@necauqua
Copy link
Contributor

necauqua commented Apr 1, 2024

What happened?

If you have a monorepo or something similar (e.g. a tauri app) and you have your Rust code in a non-workspace-root folder - the vscode extension fails to detect that we have a cargo project that uses insta and does not find pending snaps etc.

Reproduction steps

mkdir -p monorepo/rust-crate
cd monorepo/rust-crate
cargo init
cargo add --dev insta
cd ..
code .

Insta Version

1.38.0

rustc Version

1.76.0

What did you expect?

I think the extension should detect folders with Cargo.toml (also consider workspaces ig) and use those as the rootUri instead of the workspace root.

Maybe communicate with rust-analyzer extension (if it's possible/simple, don't know much about vscode extensions) which definitely does detect cargo projects in the workspace and probably does so most robustly.

@necauqua necauqua added the bug Something isn't working label Apr 1, 2024
@mitsuhiko
Copy link
Owner

Yeah I also ran into that. Sadly I'm not super familiar with vscode extensions. I would love to get some assistance with fixing that.

@necauqua
Copy link
Contributor Author

necauqua commented Apr 3, 2024

Ugh sure I wrote something 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants