← Back to issue list

feat: support nested project variables

View original Github issue

Metadata

Project
craft-parts
Number
#1220
Type
pull request
State
merged
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Merged in canonical/craft-parts#1220 via commit fc4a3315, adding ProjectVarInfo-based nested project variables and dot-notation craftctl set commands.

Resolution: closed resolved

Reason: PR #1220 was merged after approval and passing CI. Commit fc4a3315 implements support for nested variables such as var.subvar, with the change documented in the 2.21.0 changelog.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you added an entry to the changelog (`docs/reference/changelog.rst`)? ----- Uses the new `ProjectVarInfo` class to manage project variables. This enables setting nested project variables. For example, `craftctl set var.subvar=foo` sets the nested project variable `var.subvar` to `foo`. Used downstream in https://github.com/canonical/craft-application/pull/872 (SNAPCRAFT-1052)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in canonical/craft-parts#1220 via commit fc4a3315, adding ProjectVarInfo-based nested project variables and dot-notation craftctl set commands.
stealth/space-bunny-alpha — closed resolved PR craft-parts#1220 merged (commit fc4a3315), adding ProjectVarInfo-based nested project variables so `craftctl set var.subvar=foo` works. Closes SNAPCRAFT-1052; used downstream by craft-application#872.
stealth/space-bunny-alpha — closed resolved Merged craft-parts#1220 in fc4a3315, adding ProjectVarInfo-based nested project-variable support, including commands like craftctl set var.subvar=foo (SNAPCRAFT-1052).
qwen/qwen3.6-35b-a3b — — Merged. Adds nested project variable support via a new ProjectVarInfo class, enabling commands like craftctl set var.subvar=foo. Approved by three reviewers, passed all CI checks, and updated 19 files.
qwen3.6-35b-a3b-mtp-q6 — — Merged to add nested project variable support using the ProjectVarInfo class. Enables setting nested variables via craftctl, such as craftctl set var.subvar=foo. Resolves SNAPCRAFT-1052 and is utilized downstream in craft-application.

Update history

No update history recorded yet.

Related work

Related issues

Issue Project State Summary Similarity
#872 feat: support nested project variables craft-application merged Merged PR #872 via commit 1554c9e2, adding nested project-variable support; all CI checks passed.
76%
#190 craftctl: set variables from parts adopting metadata craft-parts merged Merged #190 in commit d463feef, restricting craftctl project-variable assignment to the adopting part; applications without project variables no longer need to specify one.
75%
#5727 docs: document custom project vars (SNAPCRAFT-1053) snapcraft merged Merged in canonical/snapcraft#5727 as cba259a0d, documenting custom project variables for SNAPCRAFT-1053 after the work moved from canonical/craft-parts#1216.
74%
#3677 parts: add craftctl support snapcraft merged Merged #3677 added craftctl support, project-variable assignment, and adopt-info configuration in commit 293ac060b.
72%
#4601 feat: use craft-application project variables snapcraft merged Merged as b6832072, defining version and grade as craft-application project variables that craftctl can update.
72%