Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#55748 - [stack] use git info for --version
Attached to Project:
Community Packages
Opened by Michael Sloan (mgsloan) - Monday, 25 September 2017, 21:50 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 04 April 2023, 23:42 GMT
Opened by Michael Sloan (mgsloan) - Monday, 25 September 2017, 21:50 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 04 April 2023, 23:42 GMT
|
DetailsHi! I'm one of the maintainers / authors of the stack build tool. Not currently an arch user, so this is not a user bug report. From https://stackoverflow.com/questions/46288963/custom-snapshots-with-stack-1-5-1/46289394 , I became aware that arch is releasing stack builds lack git version. I took a look at the build script here https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/stack , and it mostly seems reasonable. It sets the "disable-git-info" to false. Something to note is that the `-f-FLAG` arguments are unnecessary - they already default to false!
Is it not being built in a checked out git repo? It'd be nice to have this information so that it's clear what version of stack people are using. Also considering making it easier to notice that arch's version is not the released version. Currently stack's master branch uses the same version as the last stable release. See this issue I've just opened - https://github.com/commercialhaskell/stack/issues/3455 |
This task depends upon
Closed by Toolybird (Toolybird)
Tuesday, 04 April 2023, 23:42 GMT
Reason for closing: Fixed
Additional comments about closing: See comments
Tuesday, 04 April 2023, 23:42 GMT
Reason for closing: Fixed
Additional comments about closing: See comments
Also see the link at the top of every page on the bugtracker, reproduced for your convenience: http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines
Note the section on Severity.
Also note the section on writing a Summary (and note that we have a "stack" package, not a "haskell-stack" package).
You are right - the package is not built in a checkout out git repo, but a github archive (for checksums / reproducible builds). I usually update the package version to indicate that it's not the same version. Please let me know if there is an easy way to enable git info, thanks!
The easiest way to include the git info would be to build it from within the git repository. There is compiletime code that queries the git repo info. Otherwise, you could consider manually patching https://github.com/commercialhaskell/stack/blob/master/src/main/BuildInfo.hs#L74 using info from "git rev-list -n 1 HEAD" for the sha of head and "git rev-list --all --count" for commit count.
$ stack --version
Version 2.7.5, Git revision ba147e6f59b2da75b1beb98b1888cce97f7032b1 (dirty) (8407 commits) x86_64
Compiled with:
<...>