-
Notifications
You must be signed in to change notification settings - Fork 724
Allow 2.4-spec files to be parsed. #5401
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
Allow 2.4-spec files to be parsed. #5401
Conversation
|
Hmm. There's one more wrinkle: |
7abc22a to
88459b0
Compare
|
Do we have tests ( e.g. like or if they are rejected by |
|
Generally, we need a separate changelog for cabal spec. @hvr probably have thought about that already. |
|
@phadej Well, I basically wanted to add a chapter to the cabal user's guide to act as changelog -- but never got to it; we could just start one documenting changes to 2.4, and then work our way backwards when we're bor... motivated enough :-) |
|
👍 for additional chapter. I'd really like to have it. Having another source (i.e. non defined by the implementation) would be great, Than we can say whether implementation is buggy and can be simply fixed. EDIT: having two sources is good anyway, if they agree: good. If they don't, we can at least discuss which one is the correct or better one. |
|
AFAICT there have been no changes to the parser itself between 2.2 and 2.4. And AFAIK the only thing gated on 2.4 is my glob stuff, which is a
So I'll need to add a spec changelog chapter to the user's guide? That's doable. |
|
@quasicomputational 👍 for tests. If you could start the chapter (as a part of separate PR) that would be super great! |
As suggested in haskell#5401. [skip ci]
|
OK, I've documented the changes in 2.4 in a new changelog in #5406. Are there any concerns about the code changes in this PR, or other things I need to do? |
23Skidoo
left a comment
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 modulo minor comments.
| ] | ||
| cabalSpecFeatures CabalSpecV2_4 = Set.fromList | ||
| [ Elif | ||
| , CommonStanzas |
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.
Would it make sense to add Globstar here?
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.
Hmm. We could. I didn't think to because the parser is wholly agnostic to the pattern syntax. AFAICT, this 'feature' concept is only used to toggle bits of D.PD.Parsec on and off, depending on the version.
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.
Could you please implement this then if it's not too much trouble?
| -- if we get too new version, fail right away | ||
| case ver of | ||
| Just v | v > mkVersion [2,2] -> parseFailure zeroPos | ||
| Just v | v > mkVersion [2,4] -> parseFailure zeroPos |
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.
Hmm, why did this work before? We don't have .cabal files with cabal-version: 2.4 in the test suite?
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.
Apparently not! I only found I needed to do this when I tried to add one in the course of #5403.
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.
Nice, that means that with #5403 merged we will have one.
Lexically, they're identical to 2.2, but the semantics of globs have changed slightly.
88459b0 to
8160446
Compare
|
OK. This has been up for a week, @23Skidoo has looked at it and I've put in the |
|
Great, thanks! BTW, was it you who did this: ?
|
|
Huh. I have no idea what that is or how I might have done that. |
|
@Mistuke Apparently it's you who is responsible for pushing these tags: Can you please stop doing that? |
|
@23Skidoo well it certainly wasn't intentional, I think I got rid of the flag that was causing this. If not let me know. |
Lexically, they're identical to 2.2, but the semantics of globs have
changed slightly.
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!
cc @phadej. I grepped for
CabalSpecV2_2and put in an analogousCabalSpecV2_4wherever I found it. Is there anything else that needs doing?