-
Notifications
You must be signed in to change notification settings - Fork 710
Makes flags overridable on the command line. #4940
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
Conversation
Nice, thanks! |
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.
LGTM.
I just added some things to tidy up some things based on comments in the surrounding code - mostly to do with the duplicates check that is no longer necessary in |
@23Skidoo The reason I originally didn't turn the newtype into a |
I could change it to a map to |
So that you'd get a warning about |
I'm not exactly sure if/when you get a warning, but it should at least be compatible with the existing code that checks for duplicate flags. |
-- If the flag is already present in the 'FlagAssigment', the | ||
-- value will be updated and the fact that multiple values have | ||
-- been provided for that flag will be recorded so that a | ||
-- a warning can be generated later on. |
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.
There is an 'a' both before and after the line break.
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.
Good catch!
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.
LGTM, feel free to merge once this is green.
I'm going to try bumping the hash of the custom-setup component for the failing test to see if that helps / if the other tests pass after that. I figured I should ask while that is running: is that a valid thing to do for this kind of change? |
I'm not quite sure what you have in mind here. Anyway, I think the failing tests were mostly due to #4962. |
In the last run, there was a difference in the custom-setup hash in |
I see. It's most likely okay to do this in this case. |
This is now failing in the print / parse round-trip property based tests. I can see two ways to deal with this: I can write something to reset the count of duplicates in the various data structures that contain I'm inclined to go for the latter, because with have |
This is to fix issue haskell#4452.
I've put up custom instances of |
The sole remaining test failure is a timeout. Restarted. |
@dalaing fwiw, there was also the idea to make make
data BoolSet = BoolSet !Bool !Int or some other variant that way we'd be able to have two types, one where the uniqueness invariant is guaranteed and it has a heap-friendly representation (since while the that way we also don't have to introduce |
I think something is actually a bit wrong with this at the moment. We have the That seems to have been not picking up on duplicates since before this change. I've been trying a few things and I'm unable to trigger a duplicate flag error, and I'm having trouble tracking down why. Maybe the If that check is no longer needed (rather than just being temporarily broken), then maybe we don't need the |
I'd prefer to fix the duplicate check if possible. |
Looks like the duplicates check in But we can add checks for duplicates at the locations where |
Merged manually (see 4e4180b). Thanks! |
Looks like doing this is somewhat harder than I expected, since it's normally constructed directly via |
Yes, I think that configuredPackageProblems just double checks the solver's output. |
This is to fix issue #4452, but updating
FlagAssignment
to be aMap
with the appropriateSemigroup
andMonoid
instance that favours later entries.Please include the following checklist in your PR:
[ci skip]
is used to avoid triggering the build bots.Please also shortly describe how you tested your change. Bonus points for added tests!
I ran variations of
cabal act-as-setup -- configure -fdev -f-dev -v
andcabal configure -fdev -f-dev -v
on a dummy project to test this out. I'm happy to have a go at adding some tests on Monday if that helps - those bonus points are tempting me...