Comments (5)
Hi @la10736, thanks for the report! Do you have a sample repo you could share?
If not, are you able to execute a specific test with a cargo test -p <<your package name>> --lib <<your test name>>
As long as the cargo test commands treat the target like a lib, then all we need to do to support that is determine what the associated target kind is in the cargo metadata output, and then plug that in to the existing list of target kinds that we associate to lib-like for test discovery and execution
vscode-rust-test-adapter/src/cargo.ts
Line 17 in ff077f2
from vscode-rust-test-adapter.
You can try on my repo la10736/rstest. Anyway,
> cargo init simple_macro --lib
> cd simple_macro
> echo "
[lib]
proc-macro = true
" >> Cargo.toml
Now
michele@mdamico-laptop:~/sviluppo/simple_macro$ cargo test -p simple_macro
Compiling simple_macro v0.1.0 (/home/michele/sviluppo/simple_macro)
Finished dev [unoptimized + debuginfo] target(s) in 0.37s
Running target/debug/deps/simple_macro-2685b6a517d6dd01
running 1 test
test tests::it_works ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Doc-tests simple_macro
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
from vscode-rust-test-adapter.
Thanks! You are correct, we can handle the proc-macro
target kind like any other lib kind. I'll try to get an updated version of this published to the Marketplace later today
from vscode-rust-test-adapter.
@la10736 - v0.9.0 has been published with support for the proc-macro
target kind. Please give it a try whenever you get an opportunity, and feel free to re-open this if the issue persists.
Thanks again!
from vscode-rust-test-adapter.
It works! thank you!
from vscode-rust-test-adapter.
Related Issues (20)
- Action Required: Fix Renovate Configuration
- Dependency Dashboard
- Switch from husky to simple-git-hooks
- Enable VS Code Workspace+
- Add the category testing HOT 1
- How to use rustTestExplorer.rootCargoManifestFilePath? HOT 8
- is multiworkspace supported? HOT 4
- No tests discovered HOT 5
- Developing Status Disclaimer? HOT 1
- Switch to native Testing API? HOT 1
- How to navigate to test code from explorer HOT 2
- Async tests marked with "#[tokio::test]" run successful checkmark not displayed HOT 4
- Still broken HOT 1
- List Doctests HOT 1
- Test in /tests subfolder are not shown HOT 3
- `/bin/sh: cargo: command not found` HOT 2
- When I use it in an big workspace with rust-analyzer, they become very slow
- Test does not work with integration tests HOT 3
- Feature request: Option to specify path to `cargo`
- A settings for args to pass to tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-rust-test-adapter.