-
Notifications
You must be signed in to change notification settings - Fork 691
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
Warn about missing default-language
#9621
Conversation
b4fd611
to
e3a29e4
Compare
@@ -485,7 +485,6 @@ checkBuildInfoFeatures bi sv = do | |||
-- CheckSpecVer sv. | |||
checkP | |||
( sv >= CabalSpecV1_10 | |||
&& sv < CabalSpecV3_4 | |||
&& isNothing (defaultLanguage bi) | |||
) | |||
(PackageBuildWarning CVDefaultLanguageComponent) |
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.
@gbaz does hackage reject uploads that have PackageBuildWarning
s?
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.
It does
(and we should remember to change this bit to isHackageDistError
as soon as Cabal 3.12 is released)
@@ -485,7 +485,6 @@ checkBuildInfoFeatures bi sv = do | |||
-- CheckSpecVer sv. | |||
checkP | |||
( sv >= CabalSpecV1_10 | |||
&& sv < CabalSpecV3_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.
I'm not sure about this. All the other times this behavior was changed it was restricted to a new spec version, but now we are changing an existing spec. Should we warn only when cabal-version is at least 3.11 instead?
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.
I am checking #6926 and I am just seeing a ^^^ availableSince CabalSpecV1_10 Nothing
w/r/t spec (specifically: there is nothing regarding CabalSpecV3_4).
More in general, I don’t think we are messing with the spec this time (compare with PackageInfo fiasco), we are just dealing with check
behaviour, but I might be wrong. (eidt: and we are more restrictive in what we accept)
cabal check
raison d'être is (also) to mirror future Hackage behaviour; if Hackage decides not to accept packages withouth default-language
for all cabal spec versions, cabal check
should follow that.
issues: #9620 | ||
description: { | ||
|
||
- `cabal check` will warn about missing `default-language` and not assume `Haskell 2010`. |
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.
I am not sure this comment is accurate, if you see Distribution.Simple.GHC.Internal
, not specifying a default-language
defaults to Haskell98
.
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.
#6926 says otherwise. maybe buildinfo gets populated anyway? we should test with -v3`
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 is specifically about check
though.
Would removing “ and not assume Haskell 2010
” be ok for you?
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.
The Cabal changelog also claims it uses the compiler's default language: https://cabal.readthedocs.io/en/stable/file-format-changelog.html#cabal-version-3-4.
e3a29e4
to
04069fa
Compare
To accomodate GHC language editions (GHC2021, GHC2024, etc.).
04069fa
to
c38a662
Compare
Someone (I believe @alt-romes) pointed out in dev-call that current behaviour (out of sync with docs, alas) defaults to I am closing this and bringing the discussion in the original issue #9620 |
I've opened #9668 to document that behaviour. |
Closes #9620
To accomodate GHC language editions (GHC2021, GHC2024, etc.).
Include the following checklist in your PR:
QA notes
.cabal
file withcabal-version: 3.4
and nodefault-language
field.cabal check
will not complain about missing default language.cabal check
will emit ano-default-language
warning.