Open sjakobi opened 5 years ago
Ah, apparently the licence identifier syntax depends on the Cabal version: https://github.com/haskell/cabal/issues/5109.
Which Cabal version do you have? I'm surprised cabal
didn't reject it based on cabal-version
.
I think I tried both with cabal-2.4 and a recentish master.
Ah, apparently the licence identifier syntax depends on the Cabal version: haskell/cabal#5109.
So these combinations are ok:
cabal-version: 2.0
license: BSD3
cabal-version: 2.2
license: BSD-3-Clause
This one isn't:
cabal-version: 2.2
licence: BSD3
This one does parse, but the license isn't recognized:
cabal-version: 2.0
licence: BSD-3-Clause
Yeah, this is a genuine wart; #100 was prompted by the same issue.
It comes down to that we can create a GenericPackageDescription
that Cabal actually considers to be somehow invalid; we can maybe do better by offering Package_v2_2
and Package_v2_0
as separate branches of a sum, the former only accepting SPDX and the latter not. I'm not sure it's worth the complexity.
Is compatibility with Cabal < 2.2
an important concern for this project? Maybe it would be easier to just remove the legacy licence types.
Given
dhall-to-cabal-1.3.4.0
produces a cabal file, about whichcabal
complains: