Properly support `build-snaps` with differing versions for independent parts.
Metadata
Current evaluation
Reproducible build-snaps conflict: parts requesting Go 1.18 and 1.21 both build with 1.18.10. The issue has no maintainer triage or activity.
Suggested action: needs triage
Reason: The issue has no labels, maintainer comments, or other sign of triage. Its runnable configuration and command output clearly demonstrate the incorrect Go version, while craft-parts currently aggregates all part build-snaps into one set and installs them together; safely refreshing between parts would require careful handling of concurrent builds.
Evaluated by: mr-cal-bot
Impact:
58
Quick Win:
12
Complexity:
76
Confidence:
91
Actionability:
86
Issue body
### What needs to get done
Make `rockcraft` automatically detect when parts need different versions of the same `build-snaps` and either `snap refresh` said snaps between the parts, or at the very least give the user a clear warning it's not going to work as expected.
### Why it needs to get done
Having two separate parts needing differing versions of the same `build-snaps` during the build stage is very reasonable.
The `canonical/trivy-adapter` ROCK for example builds both `trivy` and a separate `trivy-adapter-photon` binary [with different Go versions](https://github.com/canonical/harbor-rocks/blob/main/v2.6.3/trivy-adapter-photon/rockcraft.yaml#L55-L77).
You can reproduce the issue using this sample file:
```yaml
# cat rockcraft.yaml
name: go-snap-parts-version-test
summary: Test image to showcase snap parts issue.
description: Test image to showcase snap parts issue.
version: v1.0.0
license: Apache-2.0
base: ubuntu@22.04
build-base: ubuntu@22.04
platforms:
amd64:
# arm64:
services:
sleep:
command: sleep inf
override: replace
startup: enabled
parts:
go118:
plugin: go
build-snaps:
- go/1.18/stable
source: https://github.com/canonical/rockcraft
source-type: git
source-tag: 1.5.3
source-depth: 1
override-build: |
go version
go121:
plugin: go
build-snaps:
- go/1.21/stable
source: https://github.com/canonical/rockcraft
source-type: git
source-tag: 1.5.3
source-depth: 1
override-build: |
go version
```
Running `rockcraft pack` yields the following:
```bash
$ rockcraft pack --verbose --debug
Starting rockcraft, version 1.5.3
[...]
Building go118
:: + go version
:: go version go1.18.10 linux/amd64
Building go121
:: + go version
:: go version go1.18.10 linux/amd64
[...]
```
The [only current solution available is manually `snap refresh`-ing the packages](https://github.com/aznashwan/harbor-rocks/commit/acfbb171272147f925d338852114d78a8b32eaac) in `override-build`, which is not ideal...
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
58
Quick Win:
12
Complexity:
76
Confidence:
91
Actionability:
86
|
needs triage | Reproducible build-snaps conflict: parts requesting Go 1.18 and 1.21 both build with 1.18.10. The issue has no maintainer triage or activity. | |
| qwen/qwen3.6-35b-a3b |
Impact:
45
Quick Win:
12
Complexity:
65
Confidence:
65
Actionability:
75
|
needs triage | rockcraft does not handle build-snaps with differing versions across parts; all build-snaps are installed once at startup, causing version conflicts. | |
| qwen/qwen3.8-27b |
Impact:
40
Quick Win:
18
Staleness:
85
Complexity:
55
Confidence:
80
Support Request:
10
|
needs triage | rockcraft should detect when different parts need different versions of the same build-snap and either snap refresh between parts or warn the user; no maintainer response in ~2 years | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
65
Confidence:
85
Support Request:
10
|
close stale | Feature request to handle differing build-snaps versions across independent parts in rockcraft. Currently, later parts inherit earlier snap versions without warning. Inactive for ~2 years with no maintainer response. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
95
Complexity:
60
Confidence:
85
Support Request:
10
|
close stale | Feature request to automatically handle differing build-snap versions across parts. Unlabelled, inactive for ~2 years, zero maintainer interaction, with a documented manual workaround. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
95
Complexity:
75
Confidence:
85
Support Request:
10
|
needs triage | Feature request to handle differing build-snaps versions across independent parts in rockcraft. Currently, later parts inherit earlier snap versions. Unaddressed for over two years with no maintainer response. |
Update history
No update history recorded yet.
Related issues
No related issues found above the similarity threshold.