parts: add early base parsing (CRAFT-766)
Metadata
Current evaluation
Merged into snapcraft/7.0. Adds early base parsing for lifecycle commands, verifying the base entry via project YAML and falling back to legacy handlers if not core22. Approved, passed CI, +0.81% coverage.
Suggested action: —
No scores available.
Issue body
Load the project YAML file to verify the base entry when a lifecycle
command is used. If it's not core22, fall back to the legacy handlers.
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged into snapcraft/7.0. Adds early base parsing for lifecycle commands, verifying the base entry via project YAML and falling back to legacy handlers if not core22. Approved, passed CI, +0.81% coverage. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into snapcraft/7.0. Implements early base parsing for lifecycle commands, verifying the project YAML base entry and falling back to legacy handlers if not core22. Coverage increased by 0.81%. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into snapcraft/7.0. Implements early base parsing to validate the base entry in project YAML during lifecycle commands, falling back to legacy handlers for non-core22 bases. Coverage increased by 0.81%. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2309 snap: improve early base detection logic | snapcraft | merged | Merged. Resolved early base detection failure in build providers by updating logic to account for snapcraft's non-project directory execution. Approved by reviewer, passed CI, and merged with minimal changes. | |
| #5388 fix: don't fail when checking the base | snapcraft | merged | Merged a fix preventing snapcraft from failing early during base checks. Enables user-friendly error reporting for incorrect bases. Approved by two reviewers and merged with 10 additions and 30 deletions across three files. | |
| #3729 parts: handle build base | snapcraft | merged | Merged into snapcraft/7.0. Implements build-base handling for parts, configuring the correct build environment by using the declared build-base or falling back to the package name for base-type projects. Approved and passed CI. | |
| #2499 many: support for "base: core" in snapcraft.yaml | snapcraft | merged | Added support for base: core in snapcraft.yaml. Merged after approval and passing CI checks. Modified 43 files with a net change of +224/-75 lines. | |
| #2954 cli: enable config file for base snapcraft command | snapcraft | merged | Merged a single-line update enabling config file parsing for the base snapcraft command. The change extends existing lifecycle configuration support to the main entry point, approved by maintainers and passing all CI checks. | |
| #2411 cli: snapcraft init with a base | snapcraft | merged | Merged. Adds a syntax documentation link after snapcraft init execution. Approved by one reviewer, passed CI checks, modified five files, and achieved 100% diff coverage. Resolves LP #1803776. | |
| #3637 meta: generate basic snap.yaml (CRAFT-801) | snapcraft | merged | Merged into snapcraft/7.0, adding automatic generation of a basic snap.yaml to enable snap packing. Approved by a reviewer, passed CI, and increased test coverage by 1.16%. | |
| #3583 build providers: snapcraft's new base is core20 (CRAFT-544) | snapcraft | merged | Merged into master. Replaced core18 injection with core20 as the new snapcraft base. Approved by one reviewer, passed CI, and achieved 100% diff coverage. | |
| #6193 fix: snapcraft try error shows effective base | snapcraft | merged | Merged fix for #6186 that updates the snapcraft try error message to accurately display the effective base using get_effective_base(). Approved by reviewers and merged with added unit tests for core24 and core26. | |
| #3673 parts: consider non core22 when loading yaml | snapcraft | merged | Merged following approval and passing CI. Updates the shared YAML loader to handle non-core22 parts via a two-step process: validating the base with a plain safe loader, then parsing with Snapcraft's custom _SafeLoader. Changed lines maintain 100% test coverage. |