fix: evaluate variables in project file
Metadata
Current evaluation
Merged fix for project variables not evaluating in project files, caused by the craft-application 5 rebase. Includes a core22 spread test and changelog update. Resolves #5491.
Suggested action: —
No scores available.
Issue body
- [x] Have you followed the [guidelines for contributing](https://github.com/canonical/snapcraft/blob/main/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 `make test`?
---
Fixes a bug where project variables weren't being evaluated in project files.
This was a mistake from the craft-application 5 rebase and refactor. It's addressed upstream in https://github.com/canonical/craft-application/pull/762.
### TODO
- [x] add a core22 spread test
- [x] update changelog
Fixes #5491
(SNAPCRAFT-1131)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged fix for project variables not evaluating in project files, caused by the craft-application 5 rebase. Includes a core22 spread test and changelog update. Resolves #5491. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged squash fix resolving #5491 where project variables failed to evaluate due to a craft-application 5 rebase. Aligns with upstream craft-application changes and includes updated spread tests and changelog. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to resolve a regression where project variables failed evaluation in project files. Squashed merge addresses the craft-application 5 refactor via upstream PR #762 and closes #5491. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4601 feat: use craft-application project variables | snapcraft | merged | Merged after three approvals and passing CI. Implements version and grade as craft-application project variables updatable via craftctl. Rebased and test failures resolved prior to merge. | |
| #2646 fix(Project): fix shorthand multi-base notation | charmcraft | merged | Merged after updating craft-platforms to resolve shorthand multi-base notation issues in craft-application 6. Adds a test case and closes #2620 and CHARMCRAFT-691. Approved by three reviewers. | |
| #872 feat: support nested project variables | craft-application | merged | Merged following three approvals and successful CI checks. The update enables nested project variables, altering 22 files (+526/-62 lines). It relies on craft-parts PR #1220 and addresses SNAPCRAFT-1054. | |
| #5349 refactor: rebase onto craft-application 5 | snapcraft | merged | Merged after two approvals. Rebases the codebase onto craft-application 5, updating 45 files and potentially resolving issue #5083. Aligns with related upstream craft-application fixes. | |
| #1386 fix: final spread test fixes for craft-application | charmcraft | merged | Merged after approval by two reviewers. Resolves final spread test issues for craft-application across seven files, removing 127 lines and adding 104. Changes integrated into the main branch. | |
| #726 fix(spread): include project in craft-spread model | craft-application | merged | Merged a fix to include the project field in the craft-spread model. Approved by two reviewers, passed most CI checks despite one failing test, and merged by maintainer lengau. Modified two files. | |
| #4757 fix: set project variables for core24 | snapcraft | merged | Merged a fix setting CRAFT_PROJECT_NAME and CRAFT_PROJECT_VERSION variables for core24 snaps. Approved by two reviewers, passed CI, and resolved issues #4704 and #4702. |