← Back to issue list

go plugin is not striping the .git from the source

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1591565
Type
issue
State
open
Author
~elopio
Labels
—
Created
Updated
Closed
—

Current evaluation

The 2016 GOPATH-era Go plugin treated a .git-suffixed source directory as a package path; the current module-based implementation no longer does so, with the transition recorded in craft-parts#313.

Suggested action: close resolved

Reason: The current Go plugin uses module-aware commands, `go mod download all` and `go install ... ./...`, rather than constructing a GOPATH package path from the source directory name, so the reported `./cli.git/...` behavior no longer applies. This transition is recorded in commit 890de44e, associated with craft-parts PR #313.

Evaluated by: mr-cal-bot

Impact: 20 Quick Win: 13 Complexity: 25 Confidence: 92 Actionability: 88

Issue body

When I use a source for the go plugin like this: source: https://github.com/cloudfoundry/cli.git It will use cli.git as the go package. Notice the ".git" in the last argument: env GOPATH=/home/elopio/workspace/canonical/snappy-playpen/cloudfoundry-cli/parts/cli/go go get -t -d ./cli.git/...

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 20
Quick Win: 13
Complexity: 25
Confidence: 92
Actionability: 88
close resolved The 2016 GOPATH-era Go plugin treated a .git-suffixed source directory as a package path; the current module-based implementation no longer does so, with the transition recorded in craft-parts#313.
stealth/space-bunny-alpha
Impact: 20
Quick Win: 7
Complexity: 10
Confidence: 82
Actionability: 40
close stale A 2016 GOPATH-era Go plugin treated the cloned directory, including .git, as a package path. The current module-based plugin no longer derives paths this way, but no explicit resolution is recorded.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 19
Complexity: 20
Confidence: 70
Actionability: 80
keep open Go plugin fails to strip .git suffix from source URLs, causing incorrect package paths. Open with no maintainer response or labels.
qwen/qwen3.8-27b
Impact: 15
Quick Win: 12
Staleness: 95
Complexity: 20
Confidence: 75
Support Request: 10
close stale 2015 bug report: the legacy go parts plugin does not strip the .git suffix from source URLs, so go get targets the wrong package path (e.g. ./cli.git/...). No labels, no comments, inactive ~9.5 years; the go plugin no longer exists in modern snapcraft.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 15
Confidence: 90
Support Request: 5
close stale Go plugin fails to strip .git suffix from source URLs, causing incorrect package paths. Unlabeled, no comments, inactive for over 9 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 5
close stale Go plugin fails to strip the .git suffix from source URLs, causing incorrect package paths. Issue is over 9 years old with no maintainer activity or labels.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 15
Confidence: 65
Support Request: 5
close stale Go plugin fails to strip .git suffix from source URLs, causing incorrect package paths in go get commands. Issue remains unlabelled and inactive for over 9 years.

Update history

Date Change
created

Related work

  • Likely Fixed By: craft-parts#313 (confidence 90%)

    Commit 890de44e updated the Go plugin for module-based Go builds; the current implementation no longer references the .git-suffixed source basename.

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.
78%