Giter Site home page Giter Site logo

Comments (5)

calebcartwright avatar calebcartwright commented on August 20, 2024

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

const libTargetTypes = [ 'staticlib', 'dylib', 'cdylib', 'rlib' ];

from vscode-rust-test-adapter.

la10736 avatar la10736 commented on August 20, 2024

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.

calebcartwright avatar calebcartwright commented on August 20, 2024

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.

calebcartwright avatar calebcartwright commented on August 20, 2024

@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.

la10736 avatar la10736 commented on August 20, 2024

It works! thank you!

from vscode-rust-test-adapter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.