Mark CabalSpecV3_20 as latest - #12275
Conversation
2a4c100 to
4b124ed
Compare
There was a problem hiding this comment.
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
cabalSpecLatesttoCabalSpecV3_20. - Add an explicit SPDX license list mapping for
CabalSpecV3_20→LicenseListVersion_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.
| deriving (Eq, Ord, Show, Enum, Bounded) | ||
|
|
||
| cabalSpecVersionToSPDXListVersion :: CabalSpecVersion -> LicenseListVersion | ||
| cabalSpecVersionToSPDXListVersion CabalSpecV3_20 = LicenseListVersion_3_28 |
There was a problem hiding this comment.
Doesn't that make sense? Maybe we'd like to have a nightly version?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
4b124ed to
9692410
Compare
|
@zlonast I agree with the need for a test but master is inconsistent now. |
Summary
CabalSpecV3_20as the latest supported specification on masterCabalSpecV3_20to SPDX license list 3.28Background
Master recognizes both
CabalSpecV3_18andCabalSpecV3_20, butcabalSpecLatestremainedCabalSpecV3_16. cabal-install therefore classifiedSimplepackages that declarecabal-version: 3.18as future-format packagesand selected the broken external setup path described in #12271.
The explicit SPDX mapping is required with this change. Without it,
cabalSpecVersionToSPDXListVersion CabalSpecV3_20falls through to SPDX licenselist 3.0.
Fixes #12271.
Testing
cabal build Cabal-syntax(cabalSpecLatest, cabalSpecVersionToSPDXListVersion cabalSpecLatest)in the Cabal-syntax REPL and obtained
(CabalSpecV3_20, LicenseListVersion_3_28)