Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
cabal no longer supports package version tags #890
(Imported from Trac #900, reported by guest on 2011-11-20)
The following cabal file below triggers an assertion fail on the second install:
$ cabal --version cabal-install version 0.13.3 using version 1.13.3 of the Cabal library $ cabal install Resolving dependencies... Configuring foobar-0.2.0... Building foobar-0.2.0... Preprocessing library foobar-0.2.0... [1 of 1] Compiling FooBar ( FooBar.hs, dist/build/FooBar.o ) [1 of 1] Compiling FooBar ( FooBar.hs, dist/build/FooBar.p_o ) Registering foobar-0.2.0... Installing library in /home/hvr/.cabal/lib/foobar-0.2.0/ghc-7.2.2 Registering foobar-0.2.0... $ cabal install Resolving dependencies... Configuring foobar-0.2.0... cabal: Distribution/Simple/PackageIndex.hs:123:8-13: Assertion failedOnly when I unregister the installed package via ghc-pkg unregister foobar I can configure the package again...
The cabal file causing this behaviour:
name: foobar version: 0.2.0-git20111120 synopsis: none license: BSD3 license-file: LICENSE author: foo maintainer: foo@bar build-type: Simple cabal-version: >=1.10 library default-language: Haskell2010 exposed-modules: FooBar build-depends: baseThe FooBar module is just a dummy empty module. This used to work previously, e.g. with
$ cabal-0.11.2 --version cabal-install version 0.11.2 using version 1.12.0 of the Cabal library
I just ran into this. Very confusing, since I'd never heard of Cabal tags. I added a version to the version number documentation: http://www.haskell.org/haskellwiki/Package_versioning_policy#Warning.21.
If the solution is to not support tags on the front end, then the fix is simple: just edit
and remove support for parsing tags (source).
I feel like doing a bit of archeology today.
The issue described seems to have been fixed, cabal/cabal-install 2.2 give a warning about version tags and do not crash:
The version tag appears to be completely ignored. I suppose that is good enough or do we need to abort when encountering version tags?
Have you bumped `cabal-version` to 2.2 or 2.4 in cabal file? SPDX identifiers syppoeted only then. Before licenses are parsed roughly as package names,`GPL-3-or-later` is GPL version 3 with tags `[“or”, “later”]`. Note: valid SPDX identifier is `GPL-3.0-or-later`: 3.0, not 3.…
Sent from my iPhone
On 2 Dec 2019, at 10.12, endgame ***@***.***> wrote: Related: I get "version with tags" warnings if I have something that looks like a tag in the license: version (like GPL-3-or-later), even if I don't have tags in the version number. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.