New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal no longer supports package version tags #890

Open
bos opened this Issue May 24, 2012 · 4 comments

Comments

Projects
None yet
6 participants
@bos
Contributor

bos commented May 24, 2012

(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 failed
Only 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: base
The 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
@bos

This comment has been minimized.

Show comment
Hide comment
@bos

bos May 24, 2012

Contributor

(Imported comment by @dcoutts on 2011-11-20)

Package version tags are no longer supported. We should make this explicit and fail up front with a better error message.

Contributor

bos commented May 24, 2012

(Imported comment by @dcoutts on 2011-11-20)

Package version tags are no longer supported. We should make this explicit and fail up front with a better error message.

@ntc2

This comment has been minimized.

Show comment
Hide comment
@ntc2

ntc2 Jan 25, 2014

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

Data.Version.parseVersion

and remove support for parsing tags (source).

ntc2 commented Jan 25, 2014

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

Data.Version.parseVersion

and remove support for parsing tags (source).

ntc2 added a commit to ntc2/haskell-call-trace that referenced this issue Jan 25, 2014

@ttuegel ttuegel added the meta: easy label Apr 23, 2015

@ttuegel ttuegel added this to the Cabal-1.24 milestone Apr 23, 2015

potomak added a commit to SumAll/aws that referenced this issue Oct 2, 2015

Fix version number
Cabal doesn't support version tags anymore.

See also:

* https://wiki.haskell.org/Package_versioning_policy
* haskell/cabal#890

@potomak potomak referenced this issue Oct 2, 2015

Merged

Fix version number #2

@23Skidoo 23Skidoo modified the milestones: Cabal 1.24, Cabal 1.26 Feb 21, 2016

@ezyang ezyang modified the milestone: Cabal 2.0 Sep 6, 2016

@ezyang

This comment has been minimized.

Show comment
Hide comment
@ezyang

ezyang Sep 6, 2016

Contributor

We still don't warn if there is a tag in the version number.

Contributor

ezyang commented Sep 6, 2016

We still don't warn if there is a tag in the version number.

@ezyang ezyang added this to the Triaged milestone Sep 6, 2016

@kolmodin

This comment has been minimized.

Show comment
Hide comment
@kolmodin
Member

kolmodin commented Sep 6, 2016

At least hackage should reject packages using version tags.
https://github.com/haskell/hackage-server/blob/master/Distribution/Server/Packages/Unpack.hs

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