← Back to issue list

plugins v1: move build base test in v1 plugins to base class

View original Github issue

Metadata

Project
snapcraft
Number
#3389
Type
pull request
State
merged
Author
cmatsuoka
Labels
Created
Updated
Closed

Current evaluation

Merged refactoring that moves build base validation to the V1 plugin base class constructor. The change reduces duplication across 23 files while maintaining checks for core, core16, and core18 bases.

Suggested action:

No scores available.

Issue body

V1 plugins can be used only if the build base is core, core16 or core18. As an additional sanity check, each plugin tests for base consistency. To clean that up, move the base check from each individual plugin to the V1 plugin base class constructor. 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 refactoring that moves build base validation to the V1 plugin base class constructor. The change reduces duplication across 23 files while maintaining checks for core, core16, and core18 bases.
qwen3.6-35b-a3b-mtp-q6 Merged. Consolidated build base consistency checks from individual V1 plugins into the V1 plugin base class constructor. Reviewer suggested alternative compatibility checks, but the refactoring was accepted and merged as proposed.
qwen3.6-35b-a3b-mtp-q6 Merged. Consolidated V1 plugin build base checks into the base class constructor. A reviewer proposed an alternative compatibility interface, but the original refactoring was accepted and merged.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3070 plugins v2: update plugins so they have a similar behavior snapcraft merged Merged after reviewer approval and passing CI. Standardized plugin behavior by removing invalid minitems usage, eliminating prefix setup and default build type concepts, and correcting docstring formatting across 13 files.
71%
#2308 plugins: remove the copy plugin when using a base snapcraft merged Merged into master. Removes the copy plugin when a base is specified. Updated spread tests to verify backwards compatibility. Approved by reviewer, passed CI, and integrated with a net reduction of 622 lines across eight files.
71%