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

[WIP] Add a --solver-log-format internal-json option that make cabal-install solver config log output machine-readable #9465

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

yvan-sraka
Copy link
Collaborator

@yvan-sraka yvan-sraka commented Nov 23, 2023

This PR modifies the cabal-install CLI behavior by adding a new alternative JSON output that allows the cabal-install solver logs to be mechanized, e.g., similar to the tree view provided by nix-output-monitor for Nix (nix-build --log-format internal-json). It's a follow-up of #9159.

Checklist:

Bonus points for added automated tests!

@mpickering
Copy link
Collaborator

Have you already developed the tool to consume this output? I don't see there is any hurry to merge this patch before you've also tried to implement the consumer of this tool -- that way you can more easily iterate on the json message format whilst developing the tool to visualise the output (in case more or different information is needed)

@mpickering
Copy link
Collaborator

Currently missing documentation update and changelog.

@mpickering
Copy link
Collaborator

So far the patch doesn't implement any of the JSON logic. It seems that the refactoring to use SolverTrace rather than String would be worthwhile in any case, so we could separate that out and land that first.

@yvan-sraka yvan-sraka marked this pull request as draft November 28, 2023 08:23
@andreabedini
Copy link
Collaborator

A related (overlapping?) PR is #9159

@yvan-sraka
Copy link
Collaborator Author

Thanks, @mpickering, for your feedbacks, as mentioned by @andreabedini, this PR is rebased on top of #9159 that should be reviewed first (and is the so called SolverTrace refactoring), so I will answer your comments and apply your suggestions to that PR instead! Also, you're right, there is not any hurry to merge this patch, I marked this PR as draft, and I could rework it in parallel of experimenting with a consumer tool of the not-yet-implemented alternative output.

@yvan-sraka yvan-sraka self-assigned this Dec 18, 2023
@yvan-sraka yvan-sraka force-pushed the solver-log-format-internal-json branch from 2346b24 to 429f7de Compare December 19, 2023 09:31
@yvan-sraka yvan-sraka force-pushed the solver-log-format-internal-json branch from 429f7de to f8a74e5 Compare December 19, 2023 12:03
This allows the cabal-install solver logs to be mechanized, e.g., similar to
the tree view provided by nix-output-monitor for Nix.
@yvan-sraka yvan-sraka force-pushed the solver-log-format-internal-json branch from 68a4d80 to ce56029 Compare December 22, 2023 14:42
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