-
Notifications
You must be signed in to change notification settings - Fork 710
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 . |
Try rebasing on top of current master (if not already). |
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 responded to some of your latest comments and changes, but I haven't done another full review yet.
retryMap :: (t -> step) -> RetryLog t fail done -> RetryLog step fail done | ||
retryMap f l = fromProgress $ (\p -> foldProgress (\x xs -> Step (f x) xs) Fail Done p) $ toProgress l |
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'm not sure that it's possible to convert the RetryLogs
s efficiently, but I think that it would be easier to remove the calls to retryMap
, as I described in my previous comment.
cabal-install-solver/src/Distribution/Solver/Modular/Message.hs
Outdated
Show resolved
Hide resolved
It says:
|
Let me try to restart the failing jobs then. It's the same test in all configuration, so this test may be up for the flaky marker if it fails like that ... |
I have left the new fixes for PR comments discrete for easier review. When this is approved for merge I will squash them down as appropriate. |
7f2599e
to
b77ca13
Compare
One of the "Validate" failures is with The "Bootstrap" failure is a failure in Python code and my PR does not touch any Python code. I have already tried rebasing against |
I'll try to patch up the failing test (it's the same one again) today. |
I restarted the bootstrap job, but it failed again in the same way: with |
Includes: * Apply some of @grayjay and @mpickering comments * Fix haskell#4251 Co-Authored-By: Erik de Castro Lopo <[email protected]>
b77ca13
to
af042db
Compare
I rebased the branch here on the latest master, which contains a fix for the failing test. Please, reset your local branch when you get there. |
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.
This PR needs a changelog entry.
Also, the PR description is missing a self-contained description of the change — please add one. I'd expect an example of solver output after this change.
Example solver output is in: #10854 (comment) Solver output has not changed since that. |
These fixes are require due to improvements in solver error reporting.
Extensive effort was put in to simplify the solver. In the end only a pretty minor simplification was possible.
af042db
to
e0b480a
Compare
Thank you. I think it should be referenced from or inserted in the PR description. Currently, it's hard to find. So, the new output is longer than the old one. It's the opposite of what most people I talk to want. @Mikolaj @ffaf1 @geekosaur, thoughts? |
The output in that example is actually a rare one. In most cases the differences are really minor as show by the differences requried to make the validate tests pass: 1b701f5 |
I'm confused now. I had thought that we agreed that this PR was just a refactoring change to add an intermediate log message type ( Was the change in #10854 (comment) automatically caught by tests, or did you need to manually compare the solver output? |
I think longer is fine as long as it's more comprehensible. That's the real problem most people have with the current solver output, it's a lot of gobbledygook that requires someone who has some idea of what's going on inside the solver to interpret. |
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.