Skip to content

Mark CabalSpecV3_20 as latest - #12275

Open
andreabedini wants to merge 1 commit into
haskell:masterfrom
andreabedini:andrea/wip/fix/cabal-spec-latest-3-20
Open

Mark CabalSpecV3_20 as latest#12275
andreabedini wants to merge 1 commit into
haskell:masterfrom
andreabedini:andrea/wip/fix/cabal-spec-latest-3-20

Conversation

@andreabedini

Copy link
Copy Markdown
Collaborator

Summary

  • mark CabalSpecV3_20 as the latest supported specification on master
  • map CabalSpecV3_20 to SPDX license list 3.28
  • document the user-visible setup-policy fix

Background

Master recognizes both CabalSpecV3_18 and CabalSpecV3_20, but
cabalSpecLatest remained CabalSpecV3_16. cabal-install therefore classified
Simple packages that declare cabal-version: 3.18 as future-format packages
and selected the broken external setup path described in #12271.

The explicit SPDX mapping is required with this change. Without it,
cabalSpecVersionToSPDXListVersion CabalSpecV3_20 falls through to SPDX license
list 3.0.

Fixes #12271.

Testing

  • cabal build Cabal-syntax
  • CabalSpecVersion unit tests: 2 passed
  • evaluated (cabalSpecLatest, cabalSpecVersionToSPDXListVersion cabalSpecLatest)
    in the Cabal-syntax REPL and obtained
    (CabalSpecV3_20, LicenseListVersion_3_28)

Copilot AI lite review requested due to automatic review settings August 24, 2026 08:18
@andreabedini
andreabedini force-pushed the andrea/wip/fix/cabal-spec-latest-3-20 branch from 2a4c100 to 4b124ed Compare August 24, 2026 08:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates Cabal’s notion of the “latest supported spec” on master to CabalSpecV3_20, ensuring cabal-install no longer treats cabal-version: 3.18 build-type: Simple packages as “future-format” (avoiding the broken external setup path described in #12271). It also aligns the default SPDX license list selection with this new latest spec.

Changes:

  • Set cabalSpecLatest to CabalSpecV3_20.
  • Add an explicit SPDX license list mapping for CabalSpecV3_20LicenseListVersion_3_28.
  • Document the user-visible impact and related behavior changes in the changelog.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
changelog.d/cabal-spec-latest-3-20.md Documents the cabalSpecLatest bump and its user-facing effects (setup policy and SPDX defaulting).
Cabal-syntax/src/Distribution/SPDX/LicenseListVersion.hs Adds explicit CabalSpecV3_20 mapping to keep default SPDX license list behavior correct after the latest-spec bump.
Cabal-syntax/src/Distribution/CabalSpecVersion.hs Updates cabalSpecLatest to CabalSpecV3_20 so master correctly reflects the newest supported spec.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@andreabedini andreabedini added the merge me Tell Mergify Bot to merge label Aug 26, 2026
deriving (Eq, Ord, Show, Enum, Bounded)

cabalSpecVersionToSPDXListVersion :: CabalSpecVersion -> LicenseListVersion
cabalSpecVersionToSPDXListVersion CabalSpecV3_20 = LicenseListVersion_3_28

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Doesn't that make sense? Maybe we'd like to have a nightly version?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

After talking with LLM, it was suggested that it would be good to add a check to CI #12284


cabalSpecLatest :: CabalSpecVersion
cabalSpecLatest = CabalSpecV3_16
cabalSpecLatest = CabalSpecV3_20

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I like the idea where we add tests and then don't monitor whether we're doing it right or not. #12287

CabalSpecV3_18 and CabalSpecV3_20 are both known to the development tree,
but cabalSpecLatest remained CabalSpecV3_16. cabal-install consequently
treated Simple packages that declare cabal-version 3.18 as future-format
packages and selected a broken external setup path.

Move the supported-version boundary to CabalSpecV3_20. Also map that spec
version to SPDX license list 3.28 so default SPDX parsing does not fall
through to license list 3.0.

Fixes haskell#12271
@andreabedini
andreabedini force-pushed the andrea/wip/fix/cabal-spec-latest-3-20 branch from 4b124ed to 9692410 Compare August 27, 2026 09:46
@andreabedini

Copy link
Copy Markdown
Collaborator Author

@zlonast I agree with the need for a test but master is inconsistent now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge me Tell Mergify Bot to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cabalSpecLatest remains 3.16 in cabal-install 3.18.1.0, causing cabal-version: 3.18 Simple packages to fail

3 participants