← Back to issue list

Snapcraft.yml in 'snap' directory. prime/parts/stage in '.'

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1747778
Type
issue
State
open
Author
~8-launchpad-michaelcole-com
Labels
—
Created
Updated
Closed
—

Current evaluation

Feature request (2018) to let snapcraft put parts/stage/prime build dirs next to snap/snapcraft.yaml instead of the project root. Maintainer kyrofa agreed it is desirable; no implementation exists — lifecycle still uses Path.cwd() as work_dir.

Suggested action: keep open

Reason: Maintainer kyrofa explicitly endorsed the idea ('Indeed, this is something we'd like to do', 2018-02-06), so the request is triaged and valid; but nothing has changed since — snapcraft/parts/lifecycle.py still sets `work_dir = project_dir = Path.cwd()` and there is no `build-dir`/`stage-dir` option anywhere in the tree, so the behaviour the reporter dislikes is still current. Age alone is not grounds to close, and the subsystem is alive (snap/ and snapcraft.yaml support is documented in docs/explanation/snapcraft-yaml.rst). Actionability is capped because the issue contains no design spec: implementing it touches provider/managed-environment work dirs (utils.get_managed_environment_home_path), remote build, and hundreds of spread tests that assert paths like prime/meta/snap.yaml.

Evaluated by: mr-cal-bot

Impact: 35 Quick Win: 7 Complexity: 65 Confidence: 82 Actionability: 55

Issue body

Is there a reason to put these working/build directories in . ? They clutter up the directory list in my code editor. My snapcraft.yml is in ./snap/snapcraft.yml, why not these directories as well? ./snap/snapcraft.yml ./snap/parts ./snap/prime ./snap/stage

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 35
Quick Win: 7
Complexity: 65
Confidence: 82
Actionability: 55
keep open Feature request (2018) to let snapcraft put parts/stage/prime build dirs next to snap/snapcraft.yaml instead of the project root. Maintainer kyrofa agreed it is desirable; no implementation exists — lifecycle still uses Path.cwd() as work_dir.
stealth/space-bunny-alpha
Impact: 33
Quick Win: 14
Complexity: 48
Confidence: 88
Actionability: 80
keep open Requested moving Snapcraft's parts, stage, and prime directories from the project root into snap/. A maintainer agreed this was desirable, but no implementation is evidenced.
qwen/qwen3.6-35b-a3b
Impact: 15
Quick Win: 5
Complexity: 20
Confidence: 70
Actionability: 40
needs triage User asks if build directories (prime/parts/stage) can be placed in the snap/ directory alongside snapcraft.yml instead of the project root. No maintainer response.
qwen/qwen3.8-27b
Impact: 15
Quick Win: 6
Staleness: 95
Complexity: 60
Confidence: 70
Support Request: 40
close stale 2017 request to place snapcraft build dirs (parts, prime, stage) next to snapcraft.yml in ./snap/ instead of the project root. No response for 8.5 years; dirs remain in project root by design, CRAFT_PARTS_DIR partially addresses configurability.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 85
close stale User asks why snapcraft build directories (parts, stage, prime) are created in the project root instead of alongside snapcraft.yml in the ./snap/ directory. Issue is completely inactive with no maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 10
Confidence: 90
Support Request: 85
close stale User asks why snapcraft build directories (parts, prime, stage) are created in the project root instead of alongside snapcraft.yml. Unanswered for over 8 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 10
Confidence: 80
Support Request: 85
needs triage Unassessed support question asking why snapcraft generates build directories in the project root instead of alongside snapcraft.yml. No maintainer response, labels, or assignee.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#1538688 Support referencing the stage dir from snapcraft.yaml snapcraft (launchpad) closed Implemented SNAPCRAFT_STAGE substitution for part properties and merged the fix in canonical/snapcraft#270 via eb033b40c.
72%
#6095 Allow staging snap components snapcraft open Feature request to support snap components in stage-snaps (snap+component syntax). Triaged as feasible; implementation lives upstream in craft-parts PR #1604, currently on hold pending snapd UX decisions on component access/management.
71%
#270 Support $SNAPCRAFT_STAGE for parts snapcraft merged Merged in canonical/snapcraft#270 via eb033b40c, adding part-time replacement of $SNAPCRAFT_STAGE with the absolute stage-directory path.
70%
#1805214 stage-snaps snapcraft (launchpad) closed Feature request for a stage-snaps keyword (unpack a snap's content into the snap being built, like stage-packages) was implemented and merged in canonical/snapcraft#2468 (commit 0983e4063), then shipped in the 3.2 release; follow-up fixes in #2525 and #3211.
70%