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

How to use rustTestExplorer.rootCargoManifestFilePath? #183

Open
ibraimgm opened this issue Feb 16, 2022 · 8 comments
Open

How to use rustTestExplorer.rootCargoManifestFilePath? #183

ibraimgm opened this issue Feb 16, 2022 · 8 comments

Comments

@ibraimgm
Copy link

Hello! I have a repository with the following structure:

some_project   <--- project root (this is the folder I open)
├── c_project
│   └── main.c
├── rust_project
│   ├── Cargo.toml
│   └── src

Since Cargo.toml is not on the root path, test explorer does not show any testes on the UI. If I open the rust_project folder directly, it works as expected.

Looking at the plugin contributions, I noticed rustTestExplorer.rootCargoManifestFilePath. I tried the following combinations:

  • ./rust_project
  • ./rust_project/Cargo.toml
  • ${workspace}/rust_project
  • ${workspace}/rust_project/Cargo.toml
  • /home/myuser/myprojects/some_project/rust_project
  • /home/myuser/myprojects/some_project/rust_project/Cargo.toml

But none of them worked (tests still weren't showing on the UI).Am I doing something wrong here? Or this option is bugged/not implemented? Not sure if it helps, but the test lens from rust-analyzer do show up and work as expected.

@calebcartwright
Copy link
Member

hi 👋

are you using a multi root work space by any chance? or just opening one directory level higher?

@ibraimgm
Copy link
Author

No multi root shenanigans; just opening one level higher.

@calebcartwright
Copy link
Member

Anything interesting showing in the logs?

@EricHenry
Copy link

I tried something similar. The logs report that no Cargo.toml file is found in the workspace root directory.

@calebcartwright
Copy link
Member

Thank you both, will try to dig into it later this week

@EricHenry
Copy link

I had some free time to look into this. I believe I found a solution. Let me know what you think and if there should be any changes that I should make! #186

@calebcartwright
Copy link
Member

Awesome, thanks so much @EricHenry!

@fairking
Copy link

fairking commented Oct 12, 2022

If somebody could fix the rootCargoManifestFilePath, I can wait for the official Test Explorer API support forever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants