← Back to issue list

Allow Custom Build Contexts

View original Github issue

Metadata

Project
rockcraft
Number
#959
Type
issue
State
open
Author
clay-lake
Labels
Created
Updated
Closed

Current evaluation

Feature request to allow rockcraft to pull source from outside the project context directory, enabling multi-rock repositories to share common source. Acknowledged by maintainer as cross-craft concern, linked to charmcraft#1079. No implementation exists; last activity ~11.5 months ago.

Suggested action: keep open

Reason: Maintainer @lengau acknowledged the issue on 2025-09-10, noting it is 'relevant for all crafts' and linking to charmcraft#1079, which shows it has been triaged and considered. The feature does not exist in the codebase (no build-root or custom context support found), and the use case (multi-rock repos sharing source) remains valid. Inactivity is notable but the issue is still relevant and not superseded.

Impact: 45 Quick Win: 18.0 Staleness: 65 Complexity: 60 Confidence: 75 Support Request: 10

Issue body

### What needs to get done It should be possible to for rockcraft to pull in source from arbitrary locations on the users disk. Currently this is only possible from rockcraft's project context (from ./rockcraft.yaml) and below. This feature would enable a rockcraft.yaml to be placed in a subdirectory of a repository but still pull in content from another location in the repository. ### Why it needs to get done Most projects which produce a single rock will place the rockcraft.yaml in the root of the repository. However for projects with multiple variants of a rock, for example different bases, each rock is typically placed in individual directories (seen below). This introduces challenges when each rock references the same common source, since the ./src directory will be outside of rockcraft's project context. The current solution is to clone the repository from git during the build process, but this can be brittle, inefficient or difficult if authentication is required. Multi-rock repository: ``` ./src/* ./rocks/22.04/rockcraft.yaml ./rocks/24.04/rockcraft.yaml ./rocks/25.04/rockcraft.yaml ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 45
Quick Win: 18.0
Staleness: 65
Complexity: 60
Confidence: 75
Support Request: 10
keep open Feature request to allow rockcraft to pull source from outside the project context directory, enabling multi-rock repositories to share common source. Acknowledged by maintainer as cross-craft concern, linked to charmcraft#1079. No implementation exists; last activity ~11.5 months ago.
qwen/qwen3.6-35b-a3b
Staleness: 85
Complexity: 65
Confidence: 85
Support Request: 10
needs triage Feature request to allow rockcraft to reference source files outside its project directory for multi-rock repositories. Currently untriaged, with maintainer acknowledgment of cross-craft relevance but no implementation plan or assignee.
qwen3.6-35b-a3b-mtp-q6
Staleness: 80
Complexity: 65
Confidence: 80
Support Request: 10
needs triage Feature request to allow rockcraft to reference source files outside the project directory for multi-variant repositories. Unlabelled, no assignee, last activity over nine months ago.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 65
Confidence: 70
Support Request: 15
needs triage Feature request to allow rockcraft to source files from arbitrary directories outside the project context, enabling multi-rock repository layouts. Acknowledged as relevant but inactive for ~10 months with no labels or assignee.
qwen3.6-35b-a3b-mtp-q6
Staleness: 60
Complexity: 55
Confidence: 75
Support Request: 10
keep open Allows rockcraft to build from arbitrary disk paths instead of only relative to the project directory. Addresses multi-variant repos sharing common source. Under discussion as a cross-craft feature, awaiting team feasibility review. Open 279 days.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/charmcraft#1079 (confidence 80%)

    Maintainer explicitly linked this issue to charmcraft#1079, which addresses symlinks to external files in monorepo setups. Both address the same underlying need for cross-directory source access in multi-project repos.

Related issues

Issue Project State Summary Similarity
#433 isolate parts of a rockcraft build process from each other rockcraft open Feature request to fully isolate each part's build environment in rockcraft (e.g. build-packages of one part leaking into others), modeled on Docker multi-stage builds. No maintainer response, labels, or activity since filing; the shared build environment is core craft-parts behavior.
71%