← 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

Opt-in monorepo support now mounts the enclosing Git repository, allowing subdirectory rockcraft.yaml files to use shared source elsewhere in the repository.

Suggested action: close resolved

Reason: Commit 5b168c74 (PR #1356) enables opt-in ROCKCRAFT_EXPERIMENTAL_MONOREPO support, detects the enclosing Git root, and mounts it into the build environment; the new monorepo guide and spread tests cover shared source for a project in a subdirectory. This resolves the reported repository and multi-rock layout, although support remains Git-root-scoped and experimental rather than unrestricted arbitrary-disk access.

Evaluated by: mr-cal-bot

Impact: 58 Quick Win: 17 Complexity: 66 Confidence: 93 Actionability: 84

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
stealth/space-bunny-alpha
Impact: 58
Quick Win: 17
Complexity: 66
Confidence: 93
Actionability: 84
close resolved Opt-in monorepo support now mounts the enclosing Git repository, allowing subdirectory rockcraft.yaml files to use shared source elsewhere in the repository.
stealth/space-bunny-alpha
Impact: 54
Quick Win: 9
Complexity: 76
Confidence: 94
Actionability: 67
keep open Experimental Git-root monorepo support now covers shared files in a repository, but arbitrary host-disk source contexts remain unsupported and need broader cross-craft design.
qwen/qwen3.6-35b-a3b
Impact: 50
Quick Win: 18
Complexity: 50
Confidence: 75
Actionability: 70
keep open Feature request to allow rockcraft.yaml in subdirectories while pulling source from outside the project context, enabling monorepo setups with shared source.
qwen/qwen3.8-27b
Impact: 45
Quick Win: 18
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.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: rockcraft#1356 (confidence 97%)

    Commit 5b168c74 adds opt-in monorepo build-root support, with documentation and spread-test coverage for shared sources outside the rockcraft.yaml directory.

  • Related To: charmcraft#1079 (confidence 91%)

    The issue explicitly links to Charmcraft's request; Charmcraft PR #2836 (commit e06d40c1) implemented analogous experimental monorepo support.

Related issues

Issue Project State Summary Similarity
#1356 feat(application): enable opt-in monorepo support rockcraft merged Merged in canonical/rockcraft#1356 (commit 5b168c74), adding opt-in monorepo support via ROCKCRAFT_EXPERIMENTAL_MONOREPO and a packaging how-to for Rockcraft 1.21.
72%