← Back to issue list

cli: Add --version command

View original Github issue

Metadata

Project
snapcraft
Number
#1366
Type
pull request
State
merged
Author
sparkiegeek
Labels
Created
Updated
Closed

Current evaluation

Merged. Adds a --version CLI flag. Reviewers suggested extracting version logic to prevent circular imports. The author explained import constraints and structured the code to calculate __version__ first, resolving concerns and enabling the merge.

Suggested action:

No scores available.

Issue body

LP: [#1692752](https://bugs.launchpad.net/snapcraft/+bug/1692752) Adds a --version flag to the CLI.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Adds a --version CLI flag. Reviewers suggested extracting version logic to prevent circular imports. The author explained import constraints and structured the code to calculate __version__ first, resolving concerns and enabling the merge.
qwen3.6-35b-a3b-mtp-q6 Merged, adding a --version CLI flag. Circular import concerns were resolved by calculating __version__ before module imports, ensuring a single source of truth while satisfying click decorator evaluation.
qwen3.6-35b-a3b-mtp-q6 Merged. Adds --version CLI flag. Circular import concerns were resolved by calculating __version__ before module initialization in snapcraft/__init__.py, avoiding extraction to a separate version module.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1746 cli: add version command snapcraft merged Merged after reviewer approval and passing CI. Adds a CLI version command to snapcraft, resolving feedback on click message parameters, type checking, and whitespace before final merge.
73%