Skip to content

JsonDocCk: Automaticly infer file name #100588

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

Closed
aDotInTheVoid opened this issue Aug 15, 2022 · 1 comment · Fixed by #100678
Closed

JsonDocCk: Automaticly infer file name #100588

aDotInTheVoid opened this issue Aug 15, 2022 · 1 comment · Fixed by #100678
Labels
A-rustdoc-json Area: Rustdoc JSON backend T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@aDotInTheVoid
Copy link
Member

aDotInTheVoid commented Aug 15, 2022

Right now in jsondocck all commands have the form // @<commandname> <file> <command args>

This form was inherited from htmldocck.py. However unlike HTML, the JSON output only produces 1 file. Therefor currently - can be used to imply the file for the previous command. Only the first command must specify the file.

It would be nice to automatically infer the name of the relevant file, so - is immediately available.

I don't think it makes sense to remove commands having paths, as eventual we probably want to write tests for the interaction between two crates JSON output (see #99513). It would also cause alot of churn.

Doing this also risks making the semantics of - more unclear. Is it the previously used file or the default file? These would be equivalent for every statement in the current test suite, but something to keep in mind for the future.

First discussed by @aDotInTheVoid in #100582 (comment)

@rustbot modify labels: +A-rustdoc-json +T-rustdoc

@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 15, 2022
@GuillaumeGomez
Copy link
Member

I'll do it tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants