Set the project environment in the Lifecycle Service
Metadata
Current evaluation
Project-aware environment expansion from #101 is now in place, and current integration coverage verifies CRAFT_PROJECT_NAME and CRAFT_PROJECT_VERSION are exported during builds; the omission is resolved.
Suggested action: close resolved
Reason: Commit 4c3162b6 (craft-application#101), “feat: do variable expansion when loading project,” added the project-aware environment path. Current code passes the project name into craft_parts.ProjectInfo, and test_global_environment verifies CRAFT_PROJECT_NAME and CRAFT_PROJECT_VERSION during a build.
Evaluated by: mr-cal-bot
Impact:
42
Quick Win:
29
Complexity:
24
Confidence:
94
Actionability:
91
Issue body
### What needs to get done
Set the project's environment in the Lifecycle Service. There are two potential solutions described [here](https://github.com/canonical/craft-application/pull/318#discussion_r1576953260).
### Why it needs to get done
`CRAFT_PROJECT_NAME` and `CRAFT_PROJECT_VERSION` are not available as environment variables in the build environment.
See #318 for context
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
42
Quick Win:
29
Complexity:
24
Confidence:
94
Actionability:
91
|
close resolved | Project-aware environment expansion from #101 is now in place, and current integration coverage verifies CRAFT_PROJECT_NAME and CRAFT_PROJECT_VERSION are exported during builds; the omission is resolved. | |
| qwen/qwen3.6-35b-a3b |
Impact:
60
Quick Win:
38
Complexity:
20
Confidence:
80
Actionability:
80
|
keep open | CRAFT_PROJECT_NAME is missing from the build environment; only CRAFT_PROJECT_VERSION is set in ProjectService.update_project_environment(). Issue remains open. | |
| qwen/qwen3.8-27b |
Impact:
50
Quick Win:
30
Staleness:
55
Complexity:
40
Confidence:
70
Support Request:
10
|
keep open | Request to set CRAFT_PROJECT_NAME/VERSION env vars in the Lifecycle Service build environment. Code now has ProjectService.update_project_environment() hook, but only CRAFT_PROJECT_VERSION is set by default; CRAFT_PROJECT_NAME still missing. A July 2024 comment reports SNAPCRAFT_PROJECT_NAME=None in PULL phase. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
85
Complexity:
40
Confidence:
70
Support Request:
20
|
needs triage | Unlabelled issue requesting setting project environment variables in the Lifecycle Service due to them being unavailable or incorrectly set to None during build/pull phases. No maintainer assessment or labels present. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
85
Complexity:
30
Confidence:
75
Support Request:
10
|
needs triage | Task to set CRAFT_PROJECT_NAME and CRAFT_PROJECT_VERSION environment variables in the Lifecycle Service. Open for over two years with no labels, assignee, or maintainer assessment. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
craft-application#101
(confidence 94%)
Commit 4c3162b6 introduced project-aware variable expansion; current integration coverage confirms both variables are exported.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #336 fix global environment expansion | rockcraft | merged | PR #336 (commit 42627c1a) by cjdcordeiro merged, fixing missing global variable expansion so CRAFT_PROJECT_VERSION and other CRAFT_ vars are set before parts lifecycle; project loading now returns YAML for unmarshal. |