← Back to issue list

clean behavior is confusing

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1582469
Type
issue
State
open
Author
~niemeyer
Labels
18.10-build-caching clean craft-5
Created
Updated
Closed

Current evaluation

Snapcraft 'clean' UX is confusing: forcing a part is skipped when cached, 'clean --step' errors, and removing phase content breaks internal state. Body specs un/re lifecycle commands and deprecating clean. 10 yrs old, last activity 5.3 yrs ago, craft-5 milestone.

Suggested action: close stale

Reason: The issue is ~10 years old (3759 days) with last activity 1953 days ago and 0 comments, and carries the 'craft-5' milestone label, indicating it was targeted at a milestone that has long since shipped. The specific behaviors and error messages described (e.g. "'snap' is not a valid step for part 'qt5-packages'") are from the 18.10-era snapcraft, a version no longer supported, and the project has since undergone major architectural changes (craft-parts split, snapcraft 8.x). The underlying clean/re-run UX concern, if still present, would be better captured in a fresh issue against current snapcraft.

Impact: 45 Quick Win: 24.75 Staleness: 90 Complexity: 45 Confidence: 55 Support Request: 10

Issue body

When using snapcraft in practice I've been often stumbling upon the behavior of "cleaning". Several small nits that come in mind right now: 1. Forcing a particular stage does not work If one types "snapcraft build some-part", this should indeed build the part. Right now it skips if it was already done before, which is a fine behavior when a part name is not given, but when the developer requested a specific part, it should actually respect the request rather than assuming a cached result is okay. 2. "snapcraft clean" doesn't always work For example:     % snapcraft clean --step snap     'snap' is not a valid step for part 'qt5-packages' 3. Removing content doesn't work This is the most obvious way to "clean" when one really cannot tell snapcraft what to do. Just nuke the phase content (e.g. "rm -rf ./snap/"). Instead of taking the cue that the directory is simply not there, snapcraft barfs on internal state:     % rm -rf snap     % snapcraft snap     Skipping pull qt5conf (already ran)     (...)     [Errno 2] No such file or directory:     '/home/niemeyer/src/makemkv/snap/bin/qt5-launch' To recover from this state I had to nuke the parts/qt5conf path, which is not intuitive. We need to urgently improve the experience of people re-running stages, as this is foundation of the try-and-run cycle. [Impact] * `snapcraft clean` is a convoluted cli to manage states for parts. * This introduces un and re prefixes for the lifecycle commands available for snapcraft [Test Case] * Run snapcraft prime * Run snapcraft reprime * Verify the lifecycle step is rerun. * Repeat for pull, build and stage * Run unprime, unstage, unbuild and unpull * Run snapcraft reprime <part-name> * Verify the lifecycle step for only <part-name> is rerun. * Repeat for pull, build and stage * Run unprime, unstage, unbuild and unpull for <part-name> * Verify only <part-name> is cleaned. * Run snapcraft clean with and without <part-name> and -s <step> and verify it still works with a deprecation message shown to use the new syntax. [Regression Potential] * This should had minimal effect on regressions as the clean command is staying for backwards compatibility. * The un and re commands will be UI modifications not touching the lower layers of snapcraft that manage states. * The "re" commands are totally new feature but with minimal impact (per plugin).

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 45
Quick Win: 24.75
Staleness: 90
Complexity: 45
Confidence: 55
Support Request: 10
close stale Snapcraft 'clean' UX is confusing: forcing a part is skipped when cached, 'clean --step' errors, and removing phase content breaks internal state. Body specs un/re lifecycle commands and deprecating clean. 10 yrs old, last activity 5.3 yrs ago, craft-5 milestone.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 80
Confidence: 90
Support Request: 10
close stale Reports confusing behavior in snapcraft's clean and stage forcing mechanisms, proposing new re/un CLI prefixes to improve lifecycle management. Unaddressed for over a decade.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 75
Confidence: 90
Support Request: 15
close stale Feature request to improve snapcraft's build caching and cleaning UX by introducing re/un prefixes for lifecycle steps. Unaddressed for over a decade with no maintainer interaction.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 45
Confidence: 90
Support Request: 20
close stale Report on confusing snapcraft clean behavior with proposed re/un prefix commands. Inactive for over 5 years, originates from an older project version with no maintainer engagement.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 40
Confidence: 95
Support Request: 10
close stale Proposes replacing the confusing snapcraft clean command with explicit un and re prefixes for lifecycle steps to improve stage re-running and build caching. Issue remains open with no comments and needs triage.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.