-
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
-- FIXME: This is not a very robust way to split the package name and version. | ||
-- I should rather retrieve the package name and version from the QPN ... |
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 is going to break on boot package names like base-4.14.0.0/installed-4.14.0.0
.
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.
Yep, need to fix that.
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.
@Bodigrim Can you give an example of it breaking on boot package names? The cabal-install:unit-tests
tests have instances of names like that and the tests pass fine.
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.
Please implement the rendered using structured types. Taking shortcuts is how bugs manifest.
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.
@mpickering Which types should I be using? I do not know this codebase well.
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.
The QPN
type, which is showed immediately before this function is called seems suitable?
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 @mpickering ! Changes made.
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 . |
dce06cb
to
9733b2a
Compare
@grayjay I had not planned to do any further refactoring after this, but would be happy to be pointed to work that needs to be done. |
488a55a
to
eb5af64
Compare
I think the replacement of a If you disagree, please say so an I will close this PR. |
Includes: * Apply some of @grayjay and @mpickering comments * Fix haskell#4251 Co-Authored-By: Erik de Castro Lopo <[email protected]>
These fixes are require due to improvements in solver error reporting.
eb5af64
to
4644150
Compare
I think that it's fine to merge just the refactoring, especially just replacing |
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.