← Back to issue list

snapcraft has many exit points

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1477639
Type
issue
State
closed
Author
~elopio
Labels
Created
Updated
Closed

Current evaluation

⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.

Abandoned. The suggestion to centralize error handling via exceptions instead of scattered sys.exit() calls was not adopted, leaving the codebase unchanged.

Suggested action:

No scores available.

Issue body

I think it should be better to raise exceptions on many of these cases that exit with 1. Then, the main method can catch the exceptions, and exit with 1. For the cases that exit with 0, we should just return to the main caller. elopio@calchas:~/workspace/canonical/snapcraft/trunk$ grep -r sys.exit snapcraft/cmds.py: sys.exit(1) snapcraft/cmds.py: sys.exit(0) snapcraft/cmds.py: sys.exit(1) snapcraft/cmds.py: sys.exit(1) snapcraft/cmds.py: sys.exit(1) snapcraft/plugins/ant_project.py: sys.exit(1) snapcraft/plugins/ubuntu.py: sys.exit(1) snapcraft/plugins/ubuntu.py: sys.exit(1) snapcraft/main.py: sys.exit(1) snapcraft/main.py: sys.exit(0) snapcraft/yaml.py: sys.exit(1) snapcraft/yaml.py: sys.exit(1) snapcraft/yaml.py: sys.exit(1) snapcraft/plugin.py: sys.exit(1) snapcraft/common.py: sys.exit(1)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Abandoned. The suggestion to centralize error handling via exceptions instead of scattered sys.exit() calls was not adopted, leaving the codebase unchanged.
qwen/qwen3.6-35b-a3b Closed and abandoned with no comments. The proposal to replace scattered sys.exit calls with exceptions and return statements was not implemented. Subsequent refactoring likely addressed the architecture independently.
qwen3.6-35b-a3b-mtp-q6 The suggestion to replace scattered sys.exit calls with centralized exception handling was closed without resolution. The proposal was abandoned or addressed by subsequent codebase refactoring.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1790455 snapcraft hides error traces snapcraft (launchpad) closed Abandoned. The proposed non-interactive flag was never implemented, leaving CI error handling unchanged.
72%