Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upMigrate doc tests to use macros 1.1 #576
Comments
killercup
added
the
help wanted
label
Jan 13, 2017
This comment has been minimized.
|
What do you recommend doing to ensure that doctests are working properly? What is the best way to run modified doctests to ensure that they work properly? |
This comment has been minimized.
|
Good question, @dstu! I'm a lazy person, so I don't want to wait for all the tests to run! :) When I added the doc test to #561, I used: $ pwd # in diesel crate dir
…/diesel/diesel
$ env RUST_BACKTRACE=1 DATABASE_URL=postgresql://pascal@localhost/diesel_test DATABASE_URL_FOR_SCHEMA=postgresql://pascal@localhost/diesel_schema cargo +nightly test --no-default-features --features "postgres serde_json unstable" -- JsonbThe important parts are the features, and the If you are happy with your changes and your new/changed tests run, you can run the whole test suite. Or, you know, let Travis to it when you open a PR ;) |
killercup commentedJan 13, 2017
Since macros 1.1 is the way to use diesel from 0.10/rust 1.15 forward, we should migrate to using custom derives in our API documentation, instead of the macros. This will introduce a (dev) dependency on diesel_codegen, but in general it shouldn't be a problem.
With a quick
rg '///(.*?)impl_(\w+)!' -g '!src/macros'I could only find 4 usages of the impl_* macros.