Closed parthopdas closed 10 months ago
Hey =) Really like the direction this is going, thought I would just chime in with my experience. As is, the Test Discovery isn't working for my project, and seems to also check in an infinite loop, spamming the test output window. There isn't a lot to go on, but I'll add the output here and the (admittedly unorthodox) cargo / project structure. Building and debugging work great.
I am running the nightly chain, but the msvc version, not gnu ( nightly-x86_64-pc-windows-msvc ), installed and updated via scoop.
> rustup show
Default host: x86_64-pc-windows-gnu
rustup home: C:\Users\Joe\scoop\persist\rustup\.rustup
installed toolchains
--------------------
stable-x86_64-pc-windows-gnu
nightly-x86_64-pc-windows-gnu
nightly-x86_64-pc-windows-msvc (default)
active toolchain
----------------
nightly-x86_64-pc-windows-msvc (default)
rustc 1.69.0-nightly (50d3ba5bc 2023-02-04)
ra.vs> Started PID:17920 with args: C:\<project root>\target\debug\deps\daterangecollection-2ccd1e695166f38f.exe --list --format json -Zunstable-options...
ra.vs> ... Finished PID 17920 with exit code 0.
ra.vs> rust-analyzer.vs requires nightly toolchain. Please install the nightly toolchain following instructions in https://rust-lang.github.io/rustup/concepts/channels.html. Details: Fix for https://github.com/rust-lang/rust/issues/49359 is required to support unit testing experience. The RFC process is currently underway. Till then the fix is available only in nightly toolchain.
No test is available in C:\src\joe\Rust\daterangecollection\target\debug\daterangecollection_daterangecollection.rusttests. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
Now while I am sure there is something I have misconfigured, I am unsure why that loops continuously (see screenshot)
I see from the screenshot it is actually a cargo.exe from a different location, but I have verified that the versions coincide and executing that version works fine from the cli too.
C:\>where rustup
C:\Users\Joe\.cargo\bin\rustup.exe
C:\Users\Joe\scoop\apps\rustup\current\.cargo\bin\rustup.exe
C:\Users\Joe\scoop\persist\rustup\.cargo\bin\rustup.exe
The rust project structure is /root/cargo.toml with a dependency on path /root/src/dates which has its own /root/src/dates/cargo.toml starting in /root/src/dates/src/lib.rs.
I have noticed running cargo test from the root doesn't pick up the tests in the sub library, and cargo test needs to be run from /root/src/dates , but that kind of makes sense, and it does work. If I can provide any further information to help you reproduce this or analyze it, let me know.
hello @joebone thank you for trying this out.
the hint is here:
and how to solve it is here: https://www.youtube.com/watch?v=pE1Vr2zVCbg&t=379s
right now the test experience require changes in the rust compiler - all of which is in the nightlies. there is an RFC process that i have started and it will take a while to make their way to stable version.
please try it out and let me know what you think.
test build perf optimization doc / benchmark / integration workspace main+shared with tests workspace root+shared1+shareed2 with tests with target argument command line arguments in properties
test timing information