Comments (8)
And since #[cfg(doctest)]
has been stabilised (in 1.40), you'll be able to do:
#[cfg(doctest)]
doctest!("../README.md");
Don't hesitate to come back to me if you find any issue. :)
from scroll.
It doesn't indeed.
from scroll.
I hit this issue too. Key:
error: extern location for scroll does not exist: /home/m4b/projects/scroll/target/debug/libscroll.rlib
cargo test
runs tests/readme.rs
, which depends on having first built the .rlib
, and in fact one of the examples in the README uses scroll_derive
. My process is now cargo build --features=derive && cargo test
, which… isn't great.
from scroll.
I had to:
- remove the rust annotation to the code fence
- add no_test to the code fence
on the offending README example in order to get tests passing on the derive example; this is pretty undesirable state of affairs, but I don't have time to figure this out right now
from scroll.
So I disabled the readme tests in bb214ae, because I don't know what's wrong; @luser if you get a chance/have some time, and want the readme tests still running, would you mind looking into this?
from scroll.
While looking at the external docs issue I found a link to doc-comment which has a clever workaround for this so I inlined the concept and it works nicely! (Thanks @GuillaumeGomez!)
from scroll.
Cool! Since it looks like @luser fix works for now, we’ll probably wait a few rustc cycles to adopt 1.40 since other upstream deps have much lower rustc requirements? Though I guess the test doesn’t effect the required rustc for building when used as a dep?
from scroll.
Awesome this is closed thank you @luser and will upgrade to doctest when the time comes : D
Thanks everyone !
from scroll.
Related Issues (20)
- remove usize pread/pwrite HOT 1
- scroll 1.0 HOT 12
- Repo in Cargo.toml for scroll_derive refers to old repo
- What does the "g" in "gread" stand for? HOT 3
- Publish new versions to crates.io HOT 4
- usize/isize impls must die HOT 1
- tests fail in README.md on published crates HOT 6
- Docs mention lost Gread and Gwrite traits HOT 3
- cargo test --no-default-features fails HOT 2
- Enums derive HOT 10
- Is it possible to do stateful parsing? HOT 2
- Pread, Pwrite with struct containing [u8; 8] do not work anymore with Rust 1.47.0 HOT 18
- src/lib.rs doctest fails on s390x / IBM System Z (big endian) HOT 7
- Writing into a dynamic container HOT 20
- `Pwrite`-ing to a Tokio BufWriter - is it possible?
- Pwrite deriving fails with "unparseable tokens" with struct containing lifetimes? HOT 6
- the trait bound `usize: FromCtx<_>` is not satisfied when testing with derive HOT 1
- Tracking issue for replacing unsafe code. HOT 1
- Default Ctx for MeasureWith. HOT 1
- issue : error massage
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 scroll.