← Back to issue list

`go-use` plugin doesn't respect `source-subdir`

View original Github issue

Metadata

Project
craft-parts
Number
#978
Type
issue
State
closed
Author
tigarmo
Labels
—
Created
Updated
Closed

Current evaluation

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.

Resolution: closed resolved

Reason: PR canonical/craft-parts#980 updated go-use to build the module from the configured source-subdir and was merged as commit 314bab9f. The fix is documented in the 2.4.0 release notes.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description Some go modules are hosted in subdirs of a git repo; for example, https://github.com/elazarl/goproxy/tree/master/ext has the `github.com/elazarl/goproxy/ext` module but the repo itself is github.com/elazarl/goproxy. One can use `source-subdir` to specify the build subdir, but the `go-use` plugin doesn't respect it. ### To Reproduce . ### part yaml ```shell parts: elazarl/goproxy/ext: override-pull: craftctl default; git checkout a0805db90819 plugin: go-use source: https://github.com/elazarl/goproxy.git source-subdir: ext ``` ### Relevant log output ```shell . ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved 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.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR canonical/craft-parts#980 (commit 314bab9f), making go-use build modules from the specified source-subdir instead of the repository root.
qwen/qwen3.6-35b-a3b — — Closed without resolution. Only an automated Jira sync comment exists, with no developer response or code changes, indicating the bug was deferred or abandoned.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The go-use plugin continues to ignore the source-subdir attribute. No fix or workaround was implemented.
qwen/qwen3.6-35b-a3b — — The go-use plugin failure to respect source-subdir was closed without resolution. No fix or pull request was submitted, and the report was only synced to Jira before closure.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution. The go-use plugin remains unable to respect the source-subdir parameter. Synced to Jira as CRAFT-3906 with no subsequent fix or update.

Update history

No update history recorded yet.

Related work

Related issues

Issue Project State Summary Similarity
#1613779 go plugin ignores the source-subdir keyword snapcraft (launchpad) open Legacy Go plugin ignored source-subdir; later Go-module support replaced the GOPATH workflow and current craft-parts honors the configured source subtree.
81%
#980 fix: use source-subdir in go-use plugin craft-parts merged Merged as commit 314bab9f: go-use now honors source-subdir and links the Go module there, fixing subdirectory modules reported in #978.
79%
#1061 check if sources can use `go-use` plugin craft-parts closed Resolved in canonical/craft-parts#1478 (commit e5af6aab): go-use now checks for go.mod before running and raises PartsError when it is missing.
73%