HigherOrderCO / HVM

A massively parallel, optimal functional runtime in Rust
https://higherorderco.com
Apache License 2.0
10.44k stars 397 forks source link

HVM cli arg version #341

Closed miolini closed 4 months ago

miolini commented 4 months ago

Hi!

This pull request introduces a new command-line argument -V to the HVM Rust project. The purpose of this argument is to print the current version of the application using the value specified in the Cargo package.

Changes: Added a new CLI argument -V. Implemented functionality to fetch and display the version from the Cargo package.

Details: Modified src/main.rs to include the -V argument. Utilized the env! macro to retrieve the version from Cargo.toml. Updated the help message to include the new -V option.

Usage: Running hvm -V will now print the current version of the application.

Motivation: Adding the -V argument enhances the user experience by providing an easy way to check the application version directly from the command line. This aligns with common CLI conventions and improves usability.

Notes: No breaking changes introduced.

Please review the changes and provide feedback.

Thank you!

NoamDev commented 4 months ago

Disclaimer: Not a team member. Great Idea! This would be great to clarify bug reports as well. I think --version would be better, this can be done by using long_version() instead. This what is used by gcc, clang, nvcc, node. python actually supports both, which is always a possibility. However, might be better to reserve -v for verbose mode which might be added one day. having both -V and -v might be confusing.

developedby commented 4 months ago

Disclaimer: Not a team member. Great Idea! This would be great to clarify bug reports as well. I think --version would be better, this can be done by using long_version() instead. This what is used by gcc, clang, nvcc, node. python actually supports both, which is always a possibility. However, might be better to reserve -v for verbose mode which might be added one day. having both -V and -v might be confusing.

The version argument adds both short and long options.

miolini commented 4 months ago

Thank you!