-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Improve support for doctests #2
Comments
STATUS: I think it's better than before, but there are still a few problems.
|
It would be great to have this working better. This tool is super handy. Currently, running with
|
@cloudhead Is there an example that can reproduce the error you encountered? |
Yeah, though after reproducing this I realize some of these errors come from the The repo is here: I ran: The issue with coverage output for files included twice appears with only
These are actually the same file, but I'm guessing the second one is from the doctest run, while the first is from the unit test run, I'm not sure. Note that there is no |
Thanks. I'll take a look. |
#40 fixed all of the errors and many of the warnings that happen in cloudhead/nakamoto. Before #40:
After #40:
The remaining warnings are probably the column offset errors mentioned in rust-lang/rust#79417 (comment), and it's not clear whether we can fix them on our side at this time. |
Awesome, thanks a bunch! |
There are some issues with documentation tests, see taiki-e/cargo-llvm-cov#2 and rust-lang/rust#79417
There are some issues with documentation tests, see taiki-e/cargo-llvm-cov#2 and rust-lang/rust#79417
There are some issues with documentation tests, see taiki-e/cargo-llvm-cov#2 and rust-lang/rust#79417
I am not sure whether I have missed any of the prerequisites, but I have tried to use the Can anybody advise if am missing some dependency or step? Thank you! |
I installed cargo-llvm-cov using
but did not observe any changes in the output. I guess I need to wait for #122 and therefore rust-lang/rust#92648 to land? |
I don't know if this is related to this issue here but adding the below lines to a test will give me let candy_color = [
String::from("#ea3223"),
String::from("#377d22"),
String::from("#fffd54"),
String::from("#ea3df7"),
String::from("#74fbfd"),
String::from("#ee776d"),
String::from("#8cf57b"),
String::from("#fffb7f"),
String::from("#6974f6"),
String::from("#ee82f8"),
String::from("#8dfafd"),
];
assert!(candy_color.contains(&color2hex(&Colors::Candy, &options))); These lines are within a And I'm running the test without |
@dominikwilkowski I believe that's also a rustc bug. (maybe related to code generated by |
fwiw, now that |
@jonhoo Thanks. I updated the link. |
:warn: Marked as [unstable](taiki-e/cargo-llvm-cov#2) also blindly removes `ci` directory which looks obsolete refs quickwit-oss#1761
:warn: Marked as [unstable](taiki-e/cargo-llvm-cov#2) also blindly removes `ci` directory which looks obsolete refs quickwit-oss#1761
⚠️ Marked as [unstable](taiki-e/cargo-llvm-cov#2) refs quickwit-oss#1761
⚠️ Marked as [unstable](taiki-e/cargo-llvm-cov#2) refs quickwit-oss#1761
* fix(CI) enable coverage on doctest :warning: Marked as [unstable](taiki-e/cargo-llvm-cov#2) refs #1761 * remove obsolete CI directory
@dominikwilkowski If an issue you have encountered has not yet been fixed, would you mind submitting an issue about it at https://github.com/rust-lang/rust? |
@taiki-e what's a good way to re-produce this bug without llvm-cov? Once I know how to re-produce this I'll happily submit a ticket to rust |
I think we can get the commands that cargo-llvm-cov internally calls and adjust them. For example, the output of the following command should be able to be run as-is: cargo llvm-cov --html -vv 2>&1 | grep CARGO_INCREMENTAL | sed -E -e 's/^ *Running `//g; s/`$//g; s|-sparse -f .*-o|-sparse target/llvm-cov-target/*.profraw -o|; s|.*/bin/llvm-|"$(rustc --print target-libdir)"/../bin/llvm-|g' -e "s|$(pwd)/||g" |
Here's the output from mobilecoinfoundation/from-random
|
STATUS:
This is currently available via
--doctests
flag as an unstable feature.cargo llvm-cov --doctests
Refs:
-Zinstrument-coverage
rust-lang/rust#79417The text was updated successfully, but these errors were encountered: