← Back to issue list

User friendly error missing when using go's source entry incorrectly

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1499240
Type
issue
State
closed
Author
~dholbach
Labels
—
Created
Updated
Closed

Current evaluation

Tracked to GitHub canonical/snapcraft#20 and closed by PR #97 (merge 7e6dc4b74, commit f15caeeb1), which added local-source support to the go plugin in snapcraft 0.5; maintainers noted the plugin now handles source-type projects differently.

Resolution: closed resolved

Reason: Closed after elopio pointed out snapcraft 0.5 shipped go-plugin improvements resolving the traceback scenario, specifically PR #97 'go plugin: Support local sources' (merge commit 7e6dc4b74, commit f15caeeb1), which closed LP bugs #1499240 and #1515132.

Evaluated by: mr-cal-bot

No scores available.

Issue body

daniel@daydream:~/dev/apps/bwm-ng.snap$ cat snapcraft.yaml name: bwm-ng version: 0.6-3.2 vendor: Daniel Holbach <email address hidden> summary: small and simple console-based bandwidth monitor description: Bandwidth Monitor NG is a small and simple console-based live network and disk io bandwidth monitor for Linux, BSD, Solaris, Mac OS X and others icon: ubuntu.png binaries: bwm-ng: exec: usr/bin/bwm-ng parts: bwm-ng: type: go source: . stage-packages: [bwm-ng] daniel@daydream:~/dev/apps/bwm-ng.snap$ ls image parts snapcraft.yaml ubuntu.png daniel@daydream:~/dev/apps/bwm-ng.snap$ snapcraft Skipping pull bwm-ng (already ran) Skipping build bwm-ng (already ran) Skipping stage bwm-ng (already ran) Traceback (most recent call last): File "/usr/bin/snapcraft", line 33, in <module> snapcraft.main.main() File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 80, in main args.func(args) File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 99, in assemble snap(args) File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 81, in snap cmd(args) File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 325, in cmd shutil.rmtree(common.get_snapdir()) File "/usr/lib/python3.4/shutil.py", line 459, in rmtree onerror(os.lstat, path, sys.exc_info()) File "/usr/lib/python3.4/shutil.py", line 457, in rmtree orig_st = os.lstat(path) FileNotFoundError: [Errno 2] No such file or directory: '/home/daniel/dev/apps/bwm-ng.snap/snap' daniel@daydream:~/dev/apps/bwm-ng.snap$

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Tracked to GitHub canonical/snapcraft#20 and closed by PR #97 (merge 7e6dc4b74, commit f15caeeb1), which added local-source support to the go plugin in snapcraft 0.5; maintainers noted the plugin now handles source-type projects differently.
stealth/space-bunny-alpha — closed superseded Superseded by snapcraft#20, where Go source validation was fixed in commit 0e575ce53 and local-source support shipped in Snapcraft 0.5.
stealth/space-bunny-alpha — closed resolved Go part source validation now fails with a user-friendly error instead of a cryptic FileNotFoundError; fixed in commit 0e575ce53.
qwen/qwen3.6-35b-a3b — — Resolved by adding validation to display a user-friendly error message instead of a cryptic FileNotFoundError when the Go part source is misconfigured.
qwen/qwen3.6-35b-a3b — — Closed without comments or resolution, likely abandoned due to age.

Update history

Date Change
created

Related work

  • Likely Fixed By: ubuntu-core/snapcraft#97 (confidence 85%)

    Merged PR adding local-directory source support to the go plugin; summary states it closes LP bugs #1499240 and #1515132.

  • Duplicate Of: ubuntu-core/snapcraft#20 (confidence 80%)

    elopio moved the report to GitHub canonical/snapcraft#20 with the same title.

  • Related To: ubuntu-core/snapcraft#709 (confidence 55%)

    Later 'Improve the go plugins usability' PR further refined go source handling.

Related issues

Issue Project State Summary Similarity
#1515132 Snapcraft crashes after defining a local source for a golang project snapcraft (launchpad) closed Snapcraft's Go plugin crashed on local source paths because it assumed a URI. Fixed by ubuntu-core/snapcraft#97 (commit f15caeeb1) and confirmed working in 0.5.
77%
#1649569 Make plugin/source error reporting a bit more useful snapcraft (launchpad) closed Merged PR snapcore/snapcraft#958 added the source value to invalid-handler errors, making “no handler to manage source” identify the unrecognized source.
72%