go plugin: do not remove install /bin directory before build
Metadata
Current evaluation
Merged PR #2957 (commit 1fee618c0) stopped the Go plugin from purging $SNAPCRAFT_PART_INSTALL/bin before build, preserving stage-package files; added a spread test for coverage.
Resolution: closed resolved
Reason: The PR was approved by @stgraber and merged into master as commit 1fee618c0, which removes the pre-build removal of the install bin directory and adds spread-test coverage.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Packages configured in a part's stage-packages are installed prior
to build and installed to $SNAPCRAFT_PART_INSTALL. Cleaning
$SNAPCRAFT_PART_INSTALL/bin will purge any files that may have been
installed there.
Running go build should overwrite any previously installed files,
which will be OK for incremental builds. However, as the go plugin
does not enable out_of_source_build, the entire build directory is
purged on every build anyways.
Add spread test for coverage.
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
Reported by @stgraber
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2957 (commit 1fee618c0) stopped the Go plugin from purging $SNAPCRAFT_PART_INSTALL/bin before build, preserving stage-package files; added a spread test for coverage. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2957 in commit 1fee618c0: the Go plugin now preserves $SNAPCRAFT_PART_INSTALL/bin before builds, retaining stage-package files, and adds spread-test coverage. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2957 (commit 1fee618c0) stopped the Go plugin deleting $SNAPCRAFT_PART_INSTALL/bin before builds, preserving stage-package files and adding spread test coverage. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged fix preventing the Go plugin from deleting the install /bin directory before building. This preserves stage-packages files. Approved by maintainer, passed CI, and adds spread test coverage. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix preventing the Go plugin from deleting the install bin directory before builds, preserving stage-packages files. Added spread test coverage. Approved and merged after maintainer review. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2194 plugins: do not install go debs if go snap is used | snapcraft | merged | Merged as commit 12d9151d3: the Go plugin now skips golang-go when a go build-snap is defined, preventing PATH conflicts. | |
| #3161 npm v2 plugin: always include $SNAPCRAFT_PART_INSTALL/bin in $PATH | snapcraft | merged | Merged PR #3161 (71cebabd8) always adds ${SNAPCRAFT_PART_INSTALL}/bin to PATH, preventing npm v2 builds from failing when node is already present there. | |
| #1611827 dump plugin with stage-packages fails | snapcraft (launchpad) | closed | Resolved by merged snapcore/snapcraft PR #729, commit 26ae9a507: the dump plugin no longer removes the install directory, fixing stage-packages builds. | |
| #777 go plugin: don't put debugging symbols in generated binaries | snapcraft | closed | Rejected unmerged: Snapcraft already stripped Go binaries during prime, making build-time symbol suppression redundant. | |
| #398 Support cleaning build step. | snapcraft | merged | Merged via snapcraft#401 as commit 5904250f8, adding clean_build() to the plugin API and Go plugin so only a part's built files are cleaned. |