check if sources can use `go-use` plugin
Metadata
Current evaluation
Resolved in canonical/craft-parts#1478 (commit e5af6aab): go-use now checks for go.mod before running and raises PartsError when it is missing.
Resolution: closed resolved
Reason: PR #1478 was merged as commit e5af6aab, adding an early go.mod existence check to the go-use plugin and raising PartsError with a corrective resolution message when absent.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### What needs to get done
Check if directory is a proper go module before `go-use` plugin commands are run.
Error out if it's not a correct project as it will fail anyway
### Why it needs to get done
`go-use` plugin does not validate if the directory it is run against is a valid go module (not only the go project itself, but the one that have `go.mod` file).
It would greatly improve user experience if plugin would error out, when run on incorrect sources instead of silently skip it.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Resolved in canonical/craft-parts#1478 (commit e5af6aab): go-use now checks for go.mod before running and raises PartsError when it is missing. | |
| stealth/space-bunny-alpha | — | closed resolved | go-use now fails early with a PartsError when the source directory lacks go.mod; fixed by PR #1478 in commit e5af6aab. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by canonical/craft-parts#1478 (commit e5af6aab): go-use now checks for go.mod and raises a CraftError when it is missing. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed in #1478 via commit e5af6aab: go-use now checks for go.mod and raises a CraftError when it is missing. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without implementation or discussion. The request to validate go.mod presence before running the go-use plugin was abandoned. | |
| qwen/qwen3.8-27b |
Impact:
35
Quick Win:
30
Staleness:
75
Complexity:
15
Confidence:
92
Support Request:
0
|
close stale | Request to make the go-use plugin error out when the source directory lacks a go.mod file instead of silently skipping. Implemented by merged PR #1478 (commit e5af6aab), which raises a PartsError when go.mod is missing; the issue can be closed as done. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
15
Confidence:
85
Support Request:
5
|
close stale | Enhancement request to validate that a directory contains a valid Go module before running go-use plugin commands, preventing silent failures. Currently unaddressed and inactive for over a year. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
95
Complexity:
20
Confidence:
85
Support Request:
10
|
close stale | Feature request to add go.mod validation to the go-use plugin to prevent silent failures. Currently unlabelled and inactive for over 15 months. |
Update history
| Date | Change |
|---|---|
| closed |
Related work
-
Likely Fixed By:
canonical/craft-parts#1478
(confidence 100%)
Commit e5af6aab directly implements the requested validation for go-use sources.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1478 feat: go-use checks if go.mod exists; throws error if not | craft-parts | merged | Merged as commit e5af6aab: go-use plugin now raises PartsError when no go.mod exists in the part source/subdir before running go work use; test added and changelog noted. | |
| #978 `go-use` plugin doesn't respect `source-subdir` | craft-parts | closed | go-use was fixed to honor source-subdir by merged PR canonical/craft-parts#980 (commit 314bab9f); the change shipped in craft-parts 2.4.0. | |
| #1802256 go plugin: support Go modules | snapcraft (launchpad) | closed | Closed as done: Go module support landed in the successor craft-parts Go plugin (merged PR canonical/craft-parts#78, commit b5b779df), which builds from go.mod; maintainer mr-cal cited it when closing. |