-
Notifications
You must be signed in to change notification settings - Fork 697
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
Add Suffix newtype and use in PPSuffixHandler #9484
Conversation
What is the point of a newtype wrapper if we export the constructor? If the breaking change is type PPSuffixHandler =
- (String, BuildInfo -> LocalBuildInfo -> ComponentLocalBuildInfo -> PreProcessor)
+ (Suffix, BuildInfo -> LocalBuildInfo -> ComponentLocalBuildInfo -> PreProcessor) I would expect Actually, maybe the breaking change can be avoided entirely, the field
gets passed to Cabal. If I am not mistaken, all we would need to do to keep compatibility is converting that |
The intent was more of documentation than anything else:
However, I don't particular mind making it a type synonym if that's what we need to do to avoid breaking people's custom Setup scripts. NB: I have a few additional changes involving |
I would of course like to use a different type than |
From the docs on Custom setup scripts, these are compiled aren't they (I don't use them)? The change to a |
Ok, I am ok with a newtype. The breaking change is minimal after all. |
Yes, |
73140af
to
4f00930
Compare
4a83d25
to
c4ee262
Compare
89dbaad
to
33c97ff
Compare
This commit adds a Suffix newtype to describe suffixes as handled by suffix handlers & preprocessors, and changes the PPSuffixHandler type definition to use it. It also moves some type definitions from Distribution.Simple.PreProcess to the new module Distribution.Simple.PreProcess.Types. As this commit changes the definition of PPSuffixHandler, it will break custom Setup scripts which use the 'hookedPreProcessors' functionality.
33c97ff
to
837e186
Compare
@Kleidukos: I know you are super-busy. Shall I dismiss your blocking review, optimistically assuming all concerns have been addressed? |
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 addressed @Kleidukos' review. |
@sheaf any reason why you closed the PR? |
This PR was already merged when merging #9543. |
This commit adds a
Suffix
newtype to describe suffixes as handled by suffix handlers & preprocessors, and changes thePPSuffixHandler
type synonym to use it.It also moves some type definitions from
Distribution.Simple.PreProcess
to the new moduleDistribution.Simple.PreProcess.Types
.As this commit changes the definition of
PPSuffixHandler
, it will break custom Setup scripts which use thehookedPreProcessors
functionality. As such, this PR should at least make mention of the breakage in a changelog; but as there isn't all that much payoff to the change it might be best to hold off entirely until we can get rid of Custom setups.