-
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
Use the latest cabal spec in the interactive package init #8978
Use the latest cabal spec in the interactive package init #8978
Conversation
Just a nitpick, |
506d377
to
13b11f0
Compare
13b11f0
to
8ffe059
Compare
I'm confused: is it latest or 3.4? Or are they the same somehow? Non-interactive already does the right thing, i think, so just reuse maybe? |
latest and 3.4 are the same from what I see |
It'd still be better to default to the current version of cabal-install imo. Also, it's weird that interactive and non interactive don't do the same. |
One reason why I think it's better to explicitly set |
@gbaz suggests that we lag one version behind the latest. @fgaz notices that as soon as Cabal spec version is an This ideally balances my desire to forget about maintenance of this constant forever and some caution about |
Also, let's make sure that -i and -n default to the same thing. |
The broader issue I note is that we haven't updated the In general it seems that when we bump the spec, we forget to also fix the |
@Kleidukos: what's the best course of action with this one? Open new tickets for all the related proposals and merge this one as is or re-evaluate and perhaps fit more into a single PR (in which case, please mark this a draft and remove the needs-review label)? |
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.
@Kleidukos any news here? I'd be happier if defaultCabalVersion
wasn't hardcoded as it's now and was simply pred maxBound
(or pred $ pred maxBound
). But the current version is an obvious improvement, I think.
@@ -306,7 +306,7 @@ cabalVersionPrompt flags = getCabalVersion flags $ do | |||
parseCabalVersion "2.4" = CabalSpecV2_4 | |||
parseCabalVersion "3.0" = CabalSpecV3_0 | |||
parseCabalVersion "3.4" = CabalSpecV3_4 | |||
parseCabalVersion _ = defaultCabalVersion -- 2.4 | |||
parseCabalVersion _ = defaultCabalVersion -- 3.4 |
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 comment looks like it's doomed to fall behind. Why don't we kill it, and anyone should be able to look up the definition of defautCabalVersion
themselves?
@mergify rebase |
☑️ Nothing to do
|
@mergify refresh |
✅ Pull request refreshed |
On a cabal meeting, we discussed that a more flexible policy may be needed to ensure smooth coordination with HLS, see #10457 |
See #8977
This PR updates the version of the Cabal spec that is suggested by default to users when initialising a project interactively. We now use the latest version (3.4).
QA Notes
Initialising a project with
cabal init
should prompt the user to use the 3.4 spec by default instead of the 3.0.Please include the following checklist in your PR:
Bonus points for added automated tests!