Skip to content
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

[FR] Add "--version" to apps #593

Closed
mark-stopka opened this issue Feb 23, 2020 · 0 comments
Closed

[FR] Add "--version" to apps #593

mark-stopka opened this issue Feb 23, 2020 · 0 comments
Assignees

Comments

@mark-stopka
Copy link
Contributor

Currently there is no way to determine the version of the applications, using --help option does not print version, nor does it describe --version option that I've also tried just for a sake of it. In addition to --version which would print application name, release, option --full-version should also be introduced which would also print information regarding build environment like the Haskell compiler used for build and git release and target build architecture information. If --full-version won't be introduced git information should be added to --version.

Example:

$ cardano-cli --version
cardano-cli 1.6.0
$ cardano-cli --full-version
cardano-cli (HEAD-a01b359, release, linux [x86_64]) - [The Glorious Glasgow Haskell Compilation System, version 8.8.1]

Justification:
Once cardano-node will be used by a larger audience (pool operators) it will be important for them to be able to provide exact version and build information for developers to increase chances of reproducing bugs, identifying regressions and swiftly identifying fixed issues reported by someone running older version of the node.

In addition, it seems the version information is already present in the compiled binaries, there is simply just no user-friendly way of displaying the version information.

(cardano-node)[cardano-node@26c100d710cd /srv/cardano/cardano-node]$ strings /usr/local/bin/cardano-cli | grep 8.6.5 | tail -n 1
GHC 8.6.5
(cardano-node)[cardano-node@26c100d710cd /srv/cardano/cardano-node]$ strings /usr/local/bin/cardano-cli | grep 1.6.0 | head -n 1
cardano-node-1.6.0-5GRJ1rzDvUZI6QE4xYqPDg
(cardano-node)[cardano-node@26c100d710cd /srv/cardano/cardano-node]$

NOTE:
Perhaps aliases should be defined and used for the compiler version as The Glorious Glasgow Haskell Compilation System is rather long, so ghc with version appended could be used instead.

@mark-stopka mark-stopka changed the title [CIP] Add "--version" to apps [FR] Add "--version" to apps Feb 26, 2020
@Jimbo4350 Jimbo4350 added this to the S8 2020-03-12 milestone Mar 4, 2020
@Jimbo4350 Jimbo4350 self-assigned this Mar 4, 2020
iohk-bors bot added a commit that referenced this issue Mar 6, 2020
630: Add `version` command to `cardano-cli` r=Jimbo4350 a=Jimbo4350

Issue
-----------

- #593 

- This PR **does not result** in breaking changes to upstream dependencies.

Checklist
---------
- [x] This PR contains all the work required to resolve the linked issue.

- [ ] The work contained has sufficient documentation to describe what it does and how to do it.

- [ ] The work has sufficient tests and/or testing.

- [x] I have committed clear and descriptive commits. Be considerate as somebody else will have to read these.

- [x] I have added the appropriate labels to this PR.


Co-authored-by: Jordan Millar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants