Open pgujjula opened 7 months ago
There are two things here:
hpack
accept.hpack
render it.Regarding (1), should hpack
accept something like:
tested-with:
GHC:
- 8.6.3
- 8.4.4
- ...
Regarding (2), we could still always render this as tested-with: GHC == 8.6.3, GHC == 8.4.4, ...
for maximum compatibility. Or is there a reason not to?
Finally, for your original request, when tested-with
is given as a string, then I'm not eager to look at it and pass it through transparently. In that case it would be the responsibility of the user to adjust the cabal-version
as needed.
Regarding (1), that seems reasonable to me to accept. Regarding (2), that also seems like a reasonable way to render it. It also makes sense to just pass through tested-with
transparently when it's passed as a string.
Also, as I think about it more, I think the current option of writing
tested-with:
- GHC == 8.6.3
- GHC == 8.4.4
- ...
seems like an acceptable workaround (though a little less aesthetically pleasing).
Regarding (1), that seems reasonable to me to accept.
PRs welcome.
Cabal >= 3.0 allows set notation in the
tested-with
field, such asWhen we use set notation in the
tested-with
field in package.yaml, the field is copied to the .cabal file, but the cabal-version is not set to >= 3.0 as needed. This results in the following error when we try tocabal build
using the generated cabal file: