fix: use get_project_base() in Extension.validate()
Metadata
Current evaluation
Merged PR canonical/rockcraft#1310 to use get_project_base() during Extension.validate(), respecting build-base precedence when base is bare.
Resolution: closed resolved
Reason: PR #1310 was merged. It updates Extension.validate() to use the effective project base, preventing valid build-base and bare combinations from producing a false unsupported-base error.
Evaluated by: mr-cal-bot
No scores available.
Issue body
`Extension.validate()` is still using the raw `base` value from yaml_data:
```
base: str = self.yaml_data["base"]
```
However, with the new extension dispatch, `_FrameworkFactory.__call__` uses `get_project_base`, which gives build-base precedence over base and more importantly use the value of `build-base` when base is `bare`. This breaks some workflow where the user sets `build-base: ubuntu@26.04` and `base: bare` and rockcraft would report:
```
rockcraft.errors.ExtensionError: Extension 'expressjs-framework' does not support base: 'bare'
```
---
- [x] I've followed the [contribution guidelines](https://github.com/canonical/rockcraft/blob/main/CONTRIBUTING.md).
- [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/).
- [x] I've successfully run `make lint && make test`.
- [x] I've added or updated any relevant documentation.
- [x] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing.
- [x] I've updated the relevant release notes.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR canonical/rockcraft#1310 to use get_project_base() during Extension.validate(), respecting build-base precedence when base is bare. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/rockcraft#1310: Extension.validate() now uses get_project_base(), respecting build-base precedence when base is bare. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged a fix updating Extension.validate() to use get_project_base() instead of raw YAML base values. This resolves validation errors when build-base is set with a bare base, ensuring correct precedence with the new extension dispatch system. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
15
Confidence:
90
|
needs review | Fixes Extension.validate() to use get_project_base() instead of raw yaml base, resolving build-base precedence issues with bare bases. Currently pending maintainer review with mostly passing CI. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
10
Complexity:
15
Confidence:
85
|
needs review | Fixes Extension.validate() to use get_project_base() instead of raw yaml base, resolving build-base precedence issues with bare bases. Currently pending maintainer review with minor lint failure. |
Update history
| Date | Change |
|---|---|
| closed | |
| updated | |
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #123 fix: validate bare bases for rockcraft | craft-platforms | merged | Merged PR #123 (commit 80ac005) added bare-base validation for rocks: get_rock_build_plan now raises NeedsBuildBaseError when base is "bare" with no build-base. Shipped in 0.7.1. |