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

Update dsc --version to include build info #394

Open
michaeltlombardi opened this issue Apr 10, 2024 · 0 comments
Open

Update dsc --version to include build info #394

michaeltlombardi opened this issue Apr 10, 2024 · 0 comments
Labels
Issue-Enhancement The issue is a feature or idea Need-Review

Comments

@michaeltlombardi
Copy link
Collaborator

Summary of the new feature / enhancement

Currently, the dsc --version command is only able to emit the cargo package version of the CLI, without any other useful information. However, especially prior to the 3.0.0 release (neither alpha nor preview), people may often be building from source, and it would in general be useful to have the extended information available from clap and the build, like the branch, commit hash, rust version, etc.

For example, it could emit something like:

dsc --version

dsc 3.0.0-preview.7
branch:main
commit_hash:ef36815
build_time:2024-04-10 09:28:05 -05:00
build_env:rustc 1.76.0 (07dca489a 2024-02-04),stable-x86_64-pc-windows-msvc

We could then have users paste this output in their bug reports.

Alternatively, it would be useful to be able to record this information (and possibly other info?) with a separate command, like dsc info - both so the output could use the normal command data formatting and users could upload YAML for the reporting, and we could keep the short version information that people likely want to see without the distracting/confusing (to them) build information. We could extend an info command to include other information as needed, like the meta configuration state.

Proposed technical implementation details (optional)

I found a blog post using shadow-rs that demonstrates adding build information to a CLI built with clap in rust. I think following those steps and either extending the version command or creating a new command would be useful for bug reporting and ensuring that we're discussing the same code.

@michaeltlombardi michaeltlombardi added Issue-Enhancement The issue is a feature or idea Need-Review labels Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement The issue is a feature or idea Need-Review
Projects
None yet
Development

No branches or pull requests

1 participant