-
Notifications
You must be signed in to change notification settings - Fork 113
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
Options/Parser: add '--long-version' that adds debug information #712
Options/Parser: add '--long-version' that adds debug information #712
Conversation
Option for debugging and bugreporting purposes. Current output: ``` Version: 0.9.1 Commit: 2dc2113 date: Sat Sep 12 13:31:59 2020 +0300 branch: 2020-09-12-add-GitRev-to-version ``` Also date and branch is to direct contributors attention to updating (or having in mind) that. M hnix.cabal M src/Nix/Options/Parser.hs
Branch information probably is excessive, it is probably should be reduced by YAGNI principle. But well, if project would diverge into several branches (which is not likely). So the branch report is YAGNI. |
There is a way to extract the version informaiton into into the executable using Template Haskell, that should untie HNix from Cabal machinery in this particular place. But there seems to be no package/module to do that the nice way. I sorta do not want to drag |
This PR seems straight-forward. I would remove |
Well,
So the Template Haskell returns info only for the canonical
But the ideal should not be the enemy of the good. If people use The most important that canonical Cabal works. |
[Remark](#712 (comment)) deserves a comment note in the source code.
Option for debugging and bugreporting purposes.
Current output:
Also date and branch is to direct contributors attention to updating (or having
in mind) that.
M hnix.cabal
M src/Nix/Options/Parser.hs