-
Notifications
You must be signed in to change notification settings - Fork 714
Refactor cabal-install solver config log output #10854
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
base: master
Are you sure you want to change the base?
Conversation
e602461
to
8c1868b
Compare
Any chance you could add examples of what the new output looks like? Say, in the PR description. |
c8f419c
to
5a2528d
Compare
cabal-install-solver/src/Distribution/Solver/Modular/Message.hs
Outdated
Show resolved
Hide resolved
According to this comment this seems like a precursor to #9159 . |
The original change in #9159 was split into a refactoring change and a fix for #4251. Now the refactoring change is in #9159, and the fix for #4251 is in #9541. #9541 contains #9159, because the fix depends on the refactoring. #9560 has also been merged since #9541 was written and helps address #4251. Do you know how this fix compares now? |
5a2528d
to
78733cd
Compare
Current version of this PR aims to minimize the differences in the Still need to provide a information about how this version improves the solver output compared to the current output. |
78733cd
to
b7b0c64
Compare
The changes between the output on This is the only difference I could find in the
New:
I suppose the main benefit of this PR is that in the file |
I have had a look at #9159 (against Update: I am not able find any significant differences between the behavior of the code in this PR and in #9541 . |
b7b0c64
to
6fbd8d7
Compare
Yes, I got confused. This is an updated version of #9541. Ad for #9560, that has been merged but does not seem to be related this PR. I do think that #9159 is related. So the correct comment is, "I am not able find any significant differences between the behavior of the code in this PR and in #9159 ". |
6fbd8d7
to
dce06cb
Compare
Here is the current state of each of the PRs, as I understand it: #9159: It contains two commits (b20ea53 and f10dbcf) that refactor the code in preparation for the improvement to error messages in #9541. Since #9560 was already merged, it seems like the main difference between this PR and master is the refactoring. Are you interested in merging this just for the refactoring? Are you planning to make additional changes to the solver log that depend on it? |
My hope is to get this refactor merged (after the fix suggested by @mpickering ). Then I intend to work on improving error messages as per commit e4775b4 . |
Which doctests failed? Do you mean the ones in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did another full review. I have some followup comments, and I saw that there are two unresolved comments above (documentation for new types, and removal of the EntrySkipping
constructor).
cabal-install/tests/UnitTests/Distribution/Solver/Modular/DSL/TestCaseUtils.hs
Outdated
Show resolved
Hide resolved
cabal-install-solver/src/Distribution/Solver/Modular/Message.hs
Outdated
Show resolved
Hide resolved
cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs
Outdated
Show resolved
Hide resolved
cabal-install-solver/src/Distribution/Solver/Types/SummarizedMessage.hs
Outdated
Show resolved
Hide resolved
cabal-install-solver/src/Distribution/Solver/Modular/Message.hs
Outdated
Show resolved
Hide resolved
cabal-install-solver/src/Distribution/Solver/Modular/Message.hs
Outdated
Show resolved
Hide resolved
62e3c59
to
d97ec3e
Compare
I have tried to keep commits that directly address review comments above separate. I think I have addressed them all, but I am finding it extremely difficult to keep track of what has and has not been addressed. There are no longer any changes at all in the file |
a4926b1
to
6a1157e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@erikd Thanks for keeping the commits separate for review. I've had a lot of trouble finding the unresolved comments in the Github UI for this PR, too. I looked through the comments again, and I think these are the only remaining ones, including one new one:
-
Removing the
EntrySkipping
constructor:From #9159: I think it is a little confusing to have a separate
Log
Entry
constructor for a case that should never happen (EntrySkipping
). Can this case just useErrorMsg
? -
Documentation for the new types in
SummarizedMessage.hs
:From #9159: It would help to have some comments describing how the new types and
Message
relate to each other. -
Reverting the changes to
Progress.hs
-
Reverting the renaming of
createErrorMsg
,rerunSolverForErrorMsg
, andfinalErrorMsg
cabal-install-solver/src/Distribution/Solver/Types/SummarizedMessage.hs
Outdated
Show resolved
Hide resolved
6a1157e
to
0a7a822
Compare
That constructor is used. In
and that constructor is the one of two that has the string "skipping: " as part of its rendering. If I modify the string for that constructor to "skipping single: " but all the unit tests pass, so obviously it is not needed. However, just removing it not so straight forward. Currently in
This cannot just be dropped or compiler says:
Its also not possible to just replace The
Just replacing There are
Have added documentation but as I did not actually write this code I can only guess the original intent. Suggestions for improvement welcome.
Done, but again I can only guess at the original intent. Suggestions for improvement welcome.
Done. The changes were basically re-exporting types from
Done. |
80a0e5b
to
3d4aadd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Removing the `EntrySkipping` constructor:
...
There are
skipping: ....
messages incabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs
but as I pointed out above, none of theEntrySkipping
renderings are in the unit tests.
I realized that this issue is more involved than I initially thought, and there may be other impossible cases in summarizeMessages
, too, so it doesn't make sense to handle the issue in this PR. I'm fine with leaving the EntrySkipping
constructor.
* Documentation for the new types in `SummarizedMessage.hs`:
Have added documentation but as I did not actually write this code I can only guess the original intent. Suggestions for improvement welcome.
I added a few suggestions.
cabal-install-solver/src/Distribution/Solver/Types/SummarizedMessage.hs
Outdated
Show resolved
Hide resolved
cabal-install-solver/src/Distribution/Solver/Types/SummarizedMessage.hs
Outdated
Show resolved
Hide resolved
cabal-install-solver/src/Distribution/Solver/Types/SummarizedMessage.hs
Outdated
Show resolved
Hide resolved
fd3752b
to
ca05bd4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good!
ca05bd4
to
d3c9cf6
Compare
Squashed into a single commit. Checked that the diff between the squashed version of the previous commit was zero length. |
Great! Could you please remove the part of the commit message about changing the solver's output and fixing #4251, now that it only contains the refactoring? |
b841c41
to
5c202dd
Compare
@erikd Thanks! I think this is ready for a merge label. |
5c202dd
to
94e7cce
Compare
The main goal is to add an intermediate log message type to the processing of the solver log. There are zero known changes to the cabal solver's output. Co-Authored-By: Erik de Castro Lopo <[email protected]>
94e7cce
to
6ed02de
Compare
Rebased against master. |
The CI failure is an unhandled error in Python code. |
That's a "shouldn't happen". Hackage has been hiccuping since the planned maintenance window ended. |
Includes:
This is the PR #9541 rebased and fixed to build.
Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR:
significance: significant
in the changelog file.