parts: expand CRAFT_PROJECT_VERSION and CRAFT_PROJECT_GRADE
Metadata
Current evaluation
Closed unmerged: Snapcraft retained SNAPCRAFT_PROJECT_VERSION and SNAPCRAFT_PROJECT_GRADE for compatibility; core22 parts should use craftctl get version and craftctl get grade.
Resolution: closed not a bug
Reason: In PR #3753, cmatsuoka said version and grade should remain application-defined rather than become CRAFT_PROJECT_* variables, and the author closed the PR unmerged. Current documentation still prefers craftctl get version and craftctl get grade.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [X] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `make lint`?
- [X] Have you successfully run `pytest tests/unit`?
-----
`SNAPCRAFT_PROJECT_VERSION` and `SNAPCRAFT_PROJECT_GRADE` are the only 2 variables that weren't available with the `CRAFT_` prefix.
They aren't being passed to `craft-parts`, so I'm resolving them in `snapcraft`. I would like to know what @cmatsuoka thinks.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed not a bug | Closed unmerged: Snapcraft retained SNAPCRAFT_PROJECT_VERSION and SNAPCRAFT_PROJECT_GRADE for compatibility; core22 parts should use craftctl get version and craftctl get grade. | |
| stealth/space-bunny-alpha | — | closed superseded | Closed unmerged: reviewers chose craftctl get version/grade over CRAFT_PROJECT_VERSION/CRAFT_PROJECT_GRADE expansion; legacy SNAPCRAFT_* values remain compatible. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed by author after reviewer recommended using craftctl get version and craftctl get grade instead. The proposed variable expansion was abandoned, with SNAPCRAFT_* variables retained for compatibility. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without merging. The author abandoned the PR after a reviewer recommended using craftctl get version and craftctl get grade instead. The SNAPCRAFT variables remain for compatibility, but direct expansion in parts was rejected. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4702 [craft-application/core24] $SNAPCRAFT_PROJECT_VERSION and other fields not replaced | snapcraft | closed | Core24 project-variable replacement was fixed by merged PR #4757 (commit 27957515c). Remaining CRAFT_PROJECT_NAME and CRAFT_PROJECT_VERSION handling was tracked in craft-application#320. | |
| #4183 requirements: update craft-parts to 1.21.0 | snapcraft | merged | Merged PR #4183 updated Snapcraft's craft-parts requirement to 1.21.0 in commit 8f6a8b353, aligning it with new base and overlay package callbacks. |