You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Optionally add the revison number to Paths_$pkgid.version #1506
It'd be nice if cabal build could automatically add the revision number for the appropriate SCM to the versionTags field of Paths_$pkgid.version. I envision the following usage scenario:
$ cabal configure --revision-number # or --build-id, or whatever
$ cabal run -- --version
1.0-0a4f3c6g
$ cabal configure
$ cabal run -- --version
1.0
For extracting the revision number from a working copy there is the vcs-revision package on Hackage (only SVN, Git and Mercurial support ATM).
Please please lets not start using the versionTags for anything! We're trying to eliminate the tags from the Version type completely.
But totally fine with providing this info in that module (or indeed starting a second module with version and other non-path info).
Related to this revision concept is the hackage revision concept in the new hackage-2. I think we should consider these together so we don't end up with a mess. Hackage 2 will allow editing the .cabal file without updating the tarball, an to track those changes it currently uses a x-hackage-revisionfield (which we may change an incorporate into a proper field if/when we decide the design is right). On the other hand, the hackage revision is not supposed to change the package contents, so perhaps it is not right to include it into the generated module. But including the list of dependencies and versions on the other hand would be perfectly reasonable, or indeed other details about the configuration. And while I'm thinking about it, I think everything in that module should be marked NOINLINE to stop changes in config triggering too many recompiles.
The problem with not using versionTags is that it will make it impossible to get the revision number given just a InstalledPackageInfo. The use case I have in mind is file name generation for cached setup executables.
Activity
dcoutts commentedon Sep 19, 2013
Please please lets not start using the
versionTagsfor anything! We're trying to eliminate the tags from theVersiontype completely.But totally fine with providing this info in that module (or indeed starting a second module with version and other non-path info).
Related to this revision concept is the hackage revision concept in the new hackage-2. I think we should consider these together so we don't end up with a mess. Hackage 2 will allow editing the .cabal file without updating the tarball, an to track those changes it currently uses a
x-hackage-revisionfield (which we may change an incorporate into a proper field if/when we decide the design is right). On the other hand, the hackage revision is not supposed to change the package contents, so perhaps it is not right to include it into the generated module. But including the list of dependencies and versions on the other hand would be perfectly reasonable, or indeed other details about the configuration. And while I'm thinking about it, I think everything in that module should be markedNOINLINEto stop changes in config triggering too many recompiles.23Skidoo commentedon Nov 5, 2013
The problem with not using
versionTagsis that it will make it impossible to get the revision number given just aInstalledPackageInfo. The use case I have in mind is file name generation for cached setup executables.23Skidoo commentedon Apr 11, 2019
Related: #3909.