jq directives for jsondocck#158269
Conversation
|
The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging.
Some changes occurred in src/tools/compiletest cc @jieyouxu These commits modify the If this was unintentional then you should revert the changes before this PR is merged. These commits modify Please ensure that if you've changed the output:
|
|
Failed to set assignee to
|
There was a problem hiding this comment.
Thanks for working on this! This is a really good start.
This should also update the docs in src/doc/rustc-dev-guide/src/rustdoc-internals/rustdoc-json-test-suite.md
Also, I know we don't have them at the moment, but it would be nice to have unit-tests for this. (Grep for jsondoclint for details about how to wire them into the overall build/ci system).
Finally, I can't review/approve this (rust-lang/team#2523), someone still on the rustdoc team will have to.
|
r? @lolbinarycat (Discussed this at all-hands, feel free to re-assign). CC @fmease (Also discussed vague ideas about rustdoc testing) |
|
|
|
Mirrored the jsonpath directives for jq except for Conversions from Conversions from Unfortunately this means that we lose error messages from |
There was a problem hiding this comment.
One big design concern (the two variable namespaces), and a bunch of potential readability and diagnostic improvements.
Would be nice if the new directives could be added to rustc-dev-guide under rustdoc-json-test-suite, but that can also be done as a followup.
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
This comment has been minimized.
This comment has been minimized.
|
looking good! just merge the variable namespaces, then squash the commits down to something more reasonable, and it should be good to merge. |
Co-authored-by: lolbinarycat <dogedoge61+github@gmail.com>
|
@rustbot ready |
|
Thanks! @bors r+ |
Rollup of 15 pull requests Successful merges: - #159106 (Update LLVM) - #157690 (codegen_ssa: pack small const aggregates into immediate stores) - #159005 (Use `as_lang_item` instead of repeatedly matching) - #156735 (Move NativeLib::filename to the rmeta-link archive member) - #157153 (allow `Allocator`s to be used as `#[global_allocator]`s) - #158269 (jq directives for jsondocck) - #158767 (merge DefKind::InlineConst into AnonConst) - #159099 (Stabilize String::from_utf8_lossy_owned) - #158930 (Reorganize `tests/ui/issues` [20/N]) - #158965 (Add codegen test for Result is_ok unwrap) - #158979 (Reorganize `tests/ui/issues` [21/N]) - #159050 (assert only opaques with sub unified hidden infer are non-rigid) - #159062 (Remove unused WEAK_ONLY_LANG_ITEMS static) - #159070 (Add `io::ErrorKind::InputOutputError`) - #159092 (make volatile operations const)
Rollup of 15 pull requests Successful merges: - #159106 (Update LLVM) - #157690 (codegen_ssa: pack small const aggregates into immediate stores) - #159005 (Use `as_lang_item` instead of repeatedly matching) - #156735 (Move NativeLib::filename to the rmeta-link archive member) - #157153 (allow `Allocator`s to be used as `#[global_allocator]`s) - #158269 (jq directives for jsondocck) - #158767 (merge DefKind::InlineConst into AnonConst) - #159099 (Stabilize String::from_utf8_lossy_owned) - #158930 (Reorganize `tests/ui/issues` [20/N]) - #158965 (Add codegen test for Result is_ok unwrap) - #158979 (Reorganize `tests/ui/issues` [21/N]) - #159050 (assert only opaques with sub unified hidden infer are non-rigid) - #159062 (Remove unused WEAK_ONLY_LANG_ITEMS static) - #159070 (Add `io::ErrorKind::InputOutputError`) - #159092 (make volatile operations const)
Rollup merge of #158269 - kohsine:add-jq, r=lolbinarycat jq directives for jsondocck Closes #142479. Adds `jq` directives for `jsondocck`. I decided to add jq instead of replacing jsonpath entirely so that migration could happen incrementally. In theory, it should be possible to replace every jsonpath test case with the new `jq` directives. Moving forward, this might put more burden on reviewers as test case writers would have the option to use jq or jsonpath or even both. ~~Note that you cannot use `jq_set` with jsonpath directives or `set` with jq directives~~. Diff should be reviewed without whitespace. r? @aDotInTheVoid
|
hey, I was working on writing the docs for this when I noticed some more issues:
|
Test writers will have to do something like
Sorry, I think I just copy and pasted the |
Rollup of 15 pull requests Successful merges: - rust-lang/rust#159106 (Update LLVM) - rust-lang/rust#157690 (codegen_ssa: pack small const aggregates into immediate stores) - rust-lang/rust#159005 (Use `as_lang_item` instead of repeatedly matching) - rust-lang/rust#156735 (Move NativeLib::filename to the rmeta-link archive member) - rust-lang/rust#157153 (allow `Allocator`s to be used as `#[global_allocator]`s) - rust-lang/rust#158269 (jq directives for jsondocck) - rust-lang/rust#158767 (merge DefKind::InlineConst into AnonConst) - rust-lang/rust#159099 (Stabilize String::from_utf8_lossy_owned) - rust-lang/rust#158930 (Reorganize `tests/ui/issues` [20/N]) - rust-lang/rust#158965 (Add codegen test for Result is_ok unwrap) - rust-lang/rust#158979 (Reorganize `tests/ui/issues` [21/N]) - rust-lang/rust#159050 (assert only opaques with sub unified hidden infer are non-rigid) - rust-lang/rust#159062 (Remove unused WEAK_ONLY_LANG_ITEMS static) - rust-lang/rust#159070 (Add `io::ErrorKind::InputOutputError`) - rust-lang/rust#159092 (make volatile operations const)
View all comments
Closes #142479.
Adds
jqdirectives forjsondocck.I decided to add jq instead of replacing jsonpath entirely so that migration could happen incrementally. In theory, it should be possible to replace every jsonpath test case with the new
jqdirectives. Moving forward, this might put more burden on reviewers as test case writers would have the option to use jq or jsonpath or even both.Note that you cannot use. Diff should be reviewed without whitespace.jq_setwith jsonpath directives orsetwith jq directivesr? @aDotInTheVoid