Skip to content
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 “Add default-language” suggestion #9766

Merged
merged 1 commit into from
Mar 30, 2024

Conversation

ffaf1
Copy link
Collaborator

@ffaf1 ffaf1 commented Mar 1, 2024

Closes #9620

Add a warning ("Hackage would refuse this package") when default-language is missing. Done to prepare the user to GHC language editions.


Include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • Manual QA notes have been included.
  • Tests have been added. (Ask for help if you don’t know how to write them! Ask for an exemption if tests are too complex for too little coverage!)

** QA notes **

  1. cabal init a package, choose cabal-version 3.4
  2. run cabal check
  3. old cabal: it will not complain about missing default-language
  4. new cabal: it wil complain about missing default-language

@ffaf1 ffaf1 added the attention: needs-manual-qa PR is destined for manual QA label Mar 1, 2024
@ffaf1 ffaf1 force-pushed the soft-warn-language branch from 36914e1 to 254c675 Compare March 1, 2024 18:13
Copy link
Collaborator

@geekosaur geekosaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual QA passes here.

@ffaf1 ffaf1 force-pushed the soft-warn-language branch from 254c675 to 15443a0 Compare March 1, 2024 20:24
@ffaf1 ffaf1 force-pushed the soft-warn-language branch from 15443a0 to 523bc08 Compare March 1, 2024 20:30
@adamgundry
Copy link
Member

Thanks for tackling this @ffaf1!

I think we should make Hackage reject packages with no default-language. Otherwise it's very confusing that such packages will end up using Haskell98 (or maybe Haskell2010 in some cases) due to a Cabal default that differs from GHC's default. See ghc-proposals/ghc-proposals#613 (comment) where @gbaz expresses the same opinion.

@ffaf1 ffaf1 force-pushed the soft-warn-language branch from 523bc08 to fc8a336 Compare March 14, 2024 17:32
@ffaf1
Copy link
Collaborator Author

ffaf1 commented Mar 14, 2024

Sure @adamgundry, the warning is now hard ("Hackage would reject this package").

@ffaf1 ffaf1 force-pushed the soft-warn-language branch from fc8a336 to 199d290 Compare March 14, 2024 18:59
@Kleidukos Kleidukos self-requested a review March 28, 2024 18:18
@ffaf1 ffaf1 added merge me Tell Mergify Bot to merge and removed attention: needs-review labels Mar 28, 2024
@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Mar 30, 2024
As a warning (“Hackage would reject this package”), to prepare users
to GHC language editions.
@Mikolaj Mikolaj force-pushed the soft-warn-language branch from 199d290 to f9d2af4 Compare March 30, 2024 18:59
@mergify mergify bot merged commit 519f2f7 into haskell:master Mar 30, 2024
44 checks passed
@ffaf1 ffaf1 deleted the soft-warn-language branch March 30, 2024 19:15
@jasagredo
Copy link
Collaborator

Confirmed working on Windows in today's master

@jasagredo jasagredo added the tested-on: windows QA has been successful on Windows label Apr 11, 2024
@Kleidukos
Copy link
Member

@Mergifyio backport 3.12

Copy link
Contributor

mergify bot commented May 16, 2024

backport 3.12

✅ Backports have been created

mergify bot added a commit that referenced this pull request May 16, 2024
Add “Add default-language” suggestion (backport #9766)
@Bodigrim
Copy link
Collaborator

Just a reminder that adding new constructors such as CVDefaultLanguageComponentSoft and CICVDefaultLanguageComponentSoft is a breaking change and mandates a major version bump:

@geekosaur
Copy link
Collaborator

Rushing 3.12.0.0 out before we were really ready is looking more and more like Bad Plan….

@Bodigrim
Copy link
Collaborator

Well, Cabal-3.12.0.0 had to match GHC 9.10 release.

@Mikolaj
Copy link
Member

Mikolaj commented Jun 29, 2024

Rushing 3.12.0.0 out before we were really ready is looking more and more like Bad Plan….

I don't follow. Cabal 3.12.0.0 did not have this issue and I don't see how we were not ready. @geekosaur: would you like to explain the link in #10160?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attention: needs-manual-qa PR is destined for manual QA merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge tested-on: windows QA has been successful on Windows
Projects
Status: To Test
Development

Successfully merging this pull request may close these issues.

Warn on missing default-language
8 participants