Skip to content
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

feat: add json_output #129

Merged
merged 2 commits into from
Aug 30, 2024
Merged

Conversation

Janik-Haag
Copy link
Member

This is useful if you have some other tool which makes use of the documentation data, e.g. a function search.

Copy link
Collaborator

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs at least a test, but other than that and my comments, this looks good to me :)

src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
@hsjobeki
Copy link
Collaborator

hsjobeki commented Aug 26, 2024

Regarding the whole Format, docbook, etc discussion. I think nixdoc should have a json Output as Default.
To loosen the coupling between nixdoc and the nixpkgs manual

@Janik-Haag
Copy link
Member Author

Needs at least a test,

I added a test, and took the opertunity to refactor a bunch of tests, e.g. making the test_main function actually test the main function instead of just some copied code.

Regarding the whole Format, docbook, etc discussion. I think nixdoc should have a json Output as Default.

I think that this should not happen here, but (if at all) in a new major relase since it breaks current behavior.
Do you see this as a blocker for this pr?

Copy link
Collaborator

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the default matters at all really, because I don't expect anybody to use this tool directly, it's all through automation. So definitely not blocking imo, this PR looks good as-is to me, thanks!

@infinisil infinisil merged commit c4ad7f5 into nix-community:master Aug 30, 2024
2 checks passed
@Janik-Haag Janik-Haag deleted the json-output branch August 30, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants