-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add doctest
field into metadata
#6953
Add doctest
field into metadata
#6953
Conversation
Some tools can support rust doctests (e.g. highlighting or launching). So it should be possible to find out if doctests are enabled for a target or not. This commit adds `doctest` field to `cargo metadata` output.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Just a quick question: Should it also be false if it is not |
In my case, it doesn't matter because I can check it on the client side. But really, I think it will be right to return false for not doctestable targets. |
@bors: r+ thanks! |
📌 Commit b6a8b0f has been approved by |
…crichton Add `doctest` field into metadata Some tools can support rust doctests (e.g. highlighting or launching). So it should be possible to find out if doctests are enabled for a target or not. This commit adds `doctest` field to `cargo metadata` output. Related to intellij-rust/intellij-rust#3852
☀️ Test successful - checks-travis, status-appveyor |
Document new `doctest` field. Added in #6953.
Update cargo Update cargo 14 commits in c4fcfb725b4be00c72eb9cf30c7d8b095577c280..545f354259be4e9745ea00a524c0e4c51df01aa6 2019-05-15 19:48:47 +0000 to 2019-05-23 17:45:30 +0000 - Bump to 0.38.0 (rust-lang/cargo#6979) - cargo package: detect new empty directories (rust-lang/cargo#6973) - Add message caching. (rust-lang/cargo#6933) - Fix typo (rust-lang/cargo#6974) - Set `Finished` line correctly for debug=0. (rust-lang/cargo#6971) - Clippy fixes (rust-lang/cargo#6970) - Remove rustdoc `can_add_color_process`. (rust-lang/cargo#6968) - Document new `doctest` field. (rust-lang/cargo#6965) - Update some man pages that missed --offline. (rust-lang/cargo#6964) - add public & private prop tests. (rust-lang/cargo#6962) - zsh completion: Pull list of commands from cargo --list (rust-lang/cargo#6956) - Change docs "inequality" for semver requirement. (rust-lang/cargo#6963) - Update im-rc requirement from 12.1.0 to 13.0.0 (rust-lang/cargo#6959) - Add `doctest` field into metadata (rust-lang/cargo#6953)
Update cargo Update cargo 14 commits in c4fcfb725b4be00c72eb9cf30c7d8b095577c280..545f354259be4e9745ea00a524c0e4c51df01aa6 2019-05-15 19:48:47 +0000 to 2019-05-23 17:45:30 +0000 - Bump to 0.38.0 (rust-lang/cargo#6979) - cargo package: detect new empty directories (rust-lang/cargo#6973) - Add message caching. (rust-lang/cargo#6933) - Fix typo (rust-lang/cargo#6974) - Set `Finished` line correctly for debug=0. (rust-lang/cargo#6971) - Clippy fixes (rust-lang/cargo#6970) - Remove rustdoc `can_add_color_process`. (rust-lang/cargo#6968) - Document new `doctest` field. (rust-lang/cargo#6965) - Update some man pages that missed --offline. (rust-lang/cargo#6964) - add public & private prop tests. (rust-lang/cargo#6962) - zsh completion: Pull list of commands from cargo --list (rust-lang/cargo#6956) - Change docs "inequality" for semver requirement. (rust-lang/cargo#6963) - Update im-rc requirement from 12.1.0 to 13.0.0 (rust-lang/cargo#6959) - Add `doctest` field into metadata (rust-lang/cargo#6953)
Update cargo Update cargo 14 commits in c4fcfb725b4be00c72eb9cf30c7d8b095577c280..545f354259be4e9745ea00a524c0e4c51df01aa6 2019-05-15 19:48:47 +0000 to 2019-05-23 17:45:30 +0000 - Bump to 0.38.0 (rust-lang/cargo#6979) - cargo package: detect new empty directories (rust-lang/cargo#6973) - Add message caching. (rust-lang/cargo#6933) - Fix typo (rust-lang/cargo#6974) - Set `Finished` line correctly for debug=0. (rust-lang/cargo#6971) - Clippy fixes (rust-lang/cargo#6970) - Remove rustdoc `can_add_color_process`. (rust-lang/cargo#6968) - Document new `doctest` field. (rust-lang/cargo#6965) - Update some man pages that missed --offline. (rust-lang/cargo#6964) - add public & private prop tests. (rust-lang/cargo#6962) - zsh completion: Pull list of commands from cargo --list (rust-lang/cargo#6956) - Change docs "inequality" for semver requirement. (rust-lang/cargo#6963) - Update im-rc requirement from 12.1.0 to 13.0.0 (rust-lang/cargo#6959) - Add `doctest` field into metadata (rust-lang/cargo#6953)
Update cargo Update cargo 14 commits in c4fcfb725b4be00c72eb9cf30c7d8b095577c280..545f354259be4e9745ea00a524c0e4c51df01aa6 2019-05-15 19:48:47 +0000 to 2019-05-23 17:45:30 +0000 - Bump to 0.38.0 (rust-lang/cargo#6979) - cargo package: detect new empty directories (rust-lang/cargo#6973) - Add message caching. (rust-lang/cargo#6933) - Fix typo (rust-lang/cargo#6974) - Set `Finished` line correctly for debug=0. (rust-lang/cargo#6971) - Clippy fixes (rust-lang/cargo#6970) - Remove rustdoc `can_add_color_process`. (rust-lang/cargo#6968) - Document new `doctest` field. (rust-lang/cargo#6965) - Update some man pages that missed --offline. (rust-lang/cargo#6964) - add public & private prop tests. (rust-lang/cargo#6962) - zsh completion: Pull list of commands from cargo --list (rust-lang/cargo#6956) - Change docs "inequality" for semver requirement. (rust-lang/cargo#6963) - Update im-rc requirement from 12.1.0 to 13.0.0 (rust-lang/cargo#6959) - Add `doctest` field into metadata (rust-lang/cargo#6953)
Some tools can support rust doctests (e.g. highlighting
or launching). So it should be possible to find out if
doctests are enabled for a target or not. This commit
adds
doctest
field tocargo metadata
output.Related to intellij-rust/intellij-rust#3852