feat: opt-in experimental monorepo support
Metadata
Current evaluation
Merged PR #1109, adding opt-in experimental monorepo builds; commit 8b5db661 mounts the Git root when both the application and user opt in.
Resolution: closed resolved
Reason: The feature was approved and merged into the main branch as commit 8b5db661. It mounts the Git working-tree root and runs builds from the project subdirectory when both opt-ins are enabled.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Have you followed the guidelines for contributing?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `make lint && make test`?
- [ ] Have you added an entry to the changelog (`docs/reference/changelog.rst`)?
---
Implementation of ST178: https://docs.google.com/document/d/1pQtEWU_q1kR7H0sf5StmISvhmhQ2-9MBM9ciw3uG88o/edit?tab=t.0
This adds experimental monorepo support. The support requires opt-in by both the application and the user. The application must enable this support by setting `allow_git_build_root=True` in the app metadata, and the user must enable support by setting the `<APP_NAME>_EXPERIMENTAL_MONOREPO` environment variable to a truthy value.
If both of those are set *and* the app is running inside of a git repository, instead of mounting the current working directory in `/root/project`, the Provider Service mounts the git root in `/root/project` and sets the working directory inside of the provider to the relevant subdirectory of `/root/project`.
This way a project that needs access to something outside of the project directory (but still within the same git repository) may access it by setting the `source` of a part to a relative directory walking up the FS tree (e.g. `../`).
CRAFT-5272
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1109, adding opt-in experimental monorepo builds; commit 8b5db661 mounts the Git root when both the application and user opt in. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged opt-in experimental monorepo support (CRAFT-5272), mounting the Git root and selecting the project subdirectory when both app and user opt in. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged canonical/craft-application#1109, adding opt-in experimental monorepo builds: when both application and user opt-ins are set, the provider mounts the git root and uses the project subdirectory. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged experimental monorepo support. Setting allow_git_build_root=True and the APP_NAME_EXPERIMENTAL_MONOREPO env var causes the provider to mount the git root to /root/project. Approved and passed CI. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
10
Complexity:
40
Confidence:
85
|
needs review | Implements experimental monorepo support via opt-in metadata and environment variables. Has two approvals but 13 unresolved review comments and a failing lint check. Requires final review and CI fixes before merging. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
10
Complexity:
65
Confidence:
85
|
keep open | Experimental prototype adding monorepo support to charmcraft. Currently in early development with no comments or reviews, awaiting further implementation and maintainer feedback. |
Update history
| Date | Change |
|---|---|
| updated |
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. | |
| #2836 feat: opt into git-driven build root via CHARMCRAFT_EXPERIMENTAL_MONOREPO | charmcraft | merged | Merged in #2836 (commit e06d40c1): adds CHARMCRAFT_EXPERIMENTAL_MONOREPO env var and APP_METADATA.allow_git_build_root so charmcraft packs charms from a monorepo, with unit and spread tests. | |
| #2761 feat(PROTOTYPE): git build-root for monorepos | charmcraft | closed | Prototype PR for git build-root monorepo support was closed unmerged; @mr-cal marked it superseded by PR #2836, which merged (e06d40c1) adding opt-in CHARMCRAFT_EXPERIMENTAL_MONOREPO git-driven build root. |