-
Notifications
You must be signed in to change notification settings - Fork 700
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
SetupWrapper: Filtering for Setup arguments #5261
Conversation
675fcb8
to
faabbeb
Compare
faabbeb
to
b9c3edf
Compare
b9c3edf
to
970cd49
Compare
args_2_3_0 = [] | ||
|
||
filterHaddockFlags :: HaddockFlags -> Version -> HaddockFlags | ||
filterHaddockFlags flags cabalLibVersion |
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.
@harpocrates I think #5236 needs proper version gating for --haddock-quickjump
on older Cabal's too! (@hvr, right?)
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.
Doesn't this PR solve the problem for quickjump too (via filterHaddockFlags
)? Assuming the quickjump PR makes it into 2.3 too, --quickjump
should also only be let through on Cabal >=2.3.0, right?
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.
Correct
Looks okay to me. Maybe we should think about making enabled components more explicit in the setup wrapper's type signature - using |
Is there anything blocking this from being merged? |
@alexbiehl this works for me. I used |
Rebased against |
Code looks good, I'll merge this once CI is green. |
Merged, thanks! Sorry for the long wait. |
Addresses #5260.
Since f3cacff we pass the components to generate documentation for to
Setup
withnew-haddock
. OlderCabal
s do not like this as reported by Herbert in #5260. This patch installs an argument filter mechanism just like the one for flag filtering. We now never pass extra arguments toSetup haddock
for olderCabal
s.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!