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

version checking uses wrong 'version' command #21

Open
nachog00 opened this issue Feb 5, 2025 · 3 comments
Open

version checking uses wrong 'version' command #21

nachog00 opened this issue Feb 5, 2025 · 3 comments

Comments

@nachog00
Copy link
Contributor

nachog00 commented Feb 5, 2025

The current version checking implementation for binaries assumes all binaries support the --version api.
Some of them actually work with a version command/first arg.

@ala-mode
Copy link
Contributor

ala-mode commented Feb 5, 2025

What's in place now is a workaround for this issue (looking at stderr as well as stdout), which is with two of the binaries we're featuring.

lightwalletd will likely not change to support --version.
zaino already does in its newest dev version after a follow up to this issue. However, the binaries we are currently dealing are not up to date with this.

I would assign this low priority, though when we update the binaries to new versions, we should then use zaino's --version output.

@nachog00
Copy link
Contributor Author

nachog00 commented Feb 5, 2025

What's in place now is a workaround for this issue (looking at stderr as well as stdout), which is with two of the binaries we're featuring.

lightwalletd will likely not change to support --version. zaino already does in its newest dev version after a follow up to this issue. However, the binaries we are currently dealing are not up to date with this.

I would assign this low priority, though when we update the binaries to new versions, we should then use zaino's --version output.

If i understand correctly, this counts on the actual version string to come up on either stdout OR stderr, right?

I don't know how strong that assumption is...

An alternative would be to explicitly define each binary's version command then use that. If it changes for any of them in future versions, we can update it to. It could be part of the refactor #27

@ala-mode
Copy link
Contributor

If i understand correctly, this counts on the actual version string to come up on either stdout OR stderr, right?

I don't know how strong that assumption is...

I think that assumption is pretty good! You can see it work. I agree it's not elegant though.

An alternative would be to explicitly define each binary's version command then use that. If it changes for any of them in future versions, we can update it to. It could be part of the refactor #27

Yes, then instead of handling two output types (stdout and stderr, for which there is a working system in place) we're handling two input flags (--version and version, for which there is no working system in place).

Improvement?

I think this is low priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants