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

Tests in README failing without fancy feature #88

Open
LordMZTE opened this issue Oct 15, 2021 · 1 comment · May be fixed by #89
Open

Tests in README failing without fancy feature #88

LordMZTE opened this issue Oct 15, 2021 · 1 comment · May be fixed by #89

Comments

@LordMZTE
Copy link

When running cargo test without --features fancy, one of the tests in README.md fails:

failures:

---- src/lib.rs - (line 386) stdout ----
error[E0433]: failed to resolve: could not find `MietteHandlerOpts` in `miette`
 --> src/lib.rs:388:22
  |
5 |     Box::new(miette::MietteHandlerOpts::new()
  |                      ^^^^^^^^^^^^^^^^^ could not find `MietteHandlerOpts` in `miette`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0433`.
Couldn't compile the test.

failures:
    src/lib.rs - (line 386)

test result: FAILED. 26 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.86s

error: test failed, to rerun pass '--doc'

The error is a little confusing due to the include_str! used in lib.rs, but it's caused by line 388 in README.md.
Looks like the code is referencing a struct that exists only with the fancy feature. Maybe we should add a cfg attribute to the example function?
We should also consider adding a step to the CI that runs tests without the fancy feature.

I can also open a PR to fix this :D

@zkat
Copy link
Owner

zkat commented Oct 15, 2021

PR Welcome. I don't actually know how to fix this without changing the test (the test should display the same).

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

Successfully merging a pull request may close this issue.

2 participants