Giter VIP home page Giter VIP logo

Comments (8)

GuillaumeGomez avatar GuillaumeGomez commented on May 28, 2024 1

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.

GuillaumeGomez avatar GuillaumeGomez commented on May 28, 2024 1

It doesn't indeed.

from scroll.

willglynn avatar willglynn commented on May 28, 2024

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.

m4b avatar m4b commented on May 28, 2024

I had to:

  1. remove the rust annotation to the code fence
  2. 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.

m4b avatar m4b commented on May 28, 2024

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.

luser avatar luser commented on May 28, 2024

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!)

#66

from scroll.

m4b avatar m4b commented on May 28, 2024

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.

m4b avatar m4b commented on May 28, 2024

Awesome this is closed thank you @luser and will upgrade to doctest when the time comes : D

Thanks everyone !

from scroll.

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.