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

Don't show the "Unknown/unsupported 'ghc' version detected" warning at default verbosity #9734

Open
Mikolaj opened this issue Feb 22, 2024 · 2 comments
Labels
re: version About the version of the Cabal library and cabal-install re: warnings Concerning warnings printed by cabal release type: discussion type: RFC Requests for Comment

Comments

@Mikolaj
Copy link
Member

Mikolaj commented Feb 22, 2024

Here's the warning

-- Cabal currently supports ghc >= 7.0.1 && < 9.10
-- ... and the following odd development version
unless (ghcVersion < mkVersion [9, 10]) $
warn verbosity $
"Unknown/unsupported 'ghc' version detected "
++ "(Cabal "
++ prettyShow cabalVersion
++ " supports 'ghc' version < 9.10): "
++ programPath ghcProg
++ " is version "
++ prettyShow ghcVersion

The rationale is that our release sync method with GHC releases has changed and now Cabal is supposed to release a new version before GHC releases theirs and so we can't easily test that the new GHC works fine with the new cabal release. What we and the fine GHC folk can do is analyse the API and make the best effort and then be on a lookup for problems. That makes this warning much weaker than it was before (or rather, the lack of the warning gives much weaker guarantees than if GHC was in CI before the warning is enabled for a given GHC version). So I'd propose to show it only at verbosity one notch higher than the default. We also had a case where we needed to do a lightning fixup release only to silence the warning, because it's so spammy and that's not a good use of cabal maintainer time and sanity.

Thoughts? Related: #9729

@Mikolaj Mikolaj added release type: RFC Requests for Comment re: version About the version of the Cabal library and cabal-install re: warnings Concerning warnings printed by cabal labels Feb 22, 2024
@Mikolaj
Copy link
Member Author

Mikolaj commented Feb 22, 2024

The PR that introduced the warning is https://github.com/haskell/cabal/pull/5194/files and it links to the issue with a good discussion why such a warning is needed, which is the only reason I don't argue for removing it altogether.

@Mikolaj
Copy link
Member Author

Mikolaj commented Feb 22, 2024

But maybe we should remove the warning, after all, to decouple GHC and Cabal more? A welcome side-effect would be one less code change in the ever-growing Cabal release checklist. But ideally this would be a deep decoupling, removing the need for the warning rather than the warning alone. Has anything changed, except the release process, that makes the warning less important? Any API compatibility guarantees/checks elsewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
re: version About the version of the Cabal library and cabal-install re: warnings Concerning warnings printed by cabal release type: discussion type: RFC Requests for Comment
Projects
None yet
Development

No branches or pull requests

1 participant