Skip to content

rustdoc-json: replace jsondocck with jsondocckng #94140

Open
@aDotInTheVoid

Description

@aDotInTheVoid

We want to use https://github.com/aDotInTheVoid/jsondocckng which allows writing the tests in a seperate rust files, instread of the current jsondocck and check_missing_items.py

Reasons to do this

  • Easier for new contributors: They don't need to learn how to use JsonPath and @set... commands
  • Easier for exising contributors: Common idioms ("$.index[*][?(@.name=='...')]) can be converted to rust code to avoid duplication. Paths referenced repeatedly can be replaced with a let
  • We can avoid the problems with quoting of the shlex/serde_json frankensteined value system that leads to things like '"\"vectorcall\""'

Drawbacks

  • We dont test the raw json, but instead the Rust Repr
  • Unclear how to integrate into rustbuild in current from
  • Existing tests need to be rewritten

Todo

  • Improve features of jsondocckng
    • Allow multifile crates
    • Allow passing args to rustdoc
    • Allow multiple json outputs
    • When failure occours, diff with nightly and prity print
  • Integrate with rustbuild
  • Port existing tests
  • Document

@rustbot modify labels: +A-contributor-roadblock +A-testsuite +T-rustdoc +A-rustdoc-json +A-rustbuild

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustA-rustdoc-jsonArea: Rustdoc JSON backendA-testsuiteArea: The testsuite used to check the correctness of rustcT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions