← Back to issue list

plugins: build-attributes is already in the state

View original Github issue

Metadata

Project
snapcraft
Number
#1620
Type
pull request
State
merged
Author
kyrofa
Labels
Created
Updated
Closed

Current evaluation

Merged. Removes redundant build-attributes tracking from individual plugins, centralizing state management in core classes while preserving correct dirty-state detection for build steps.

Suggested action:

No scores available.

Issue body

- [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] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh unit`? ----- The build state tracks `build-attributes` as a build property, which means if it changes, the build step is considered dirty. However, a few plugins have also added `build-attributes` to their build properties, which is redundant. This PR makes sure the core Snapcraft properties are handled in the state classes, and keep the plugins handling their own schema. While we have tests covering this, you can verify `build-attributes` still makes the `build` step dirty manually with the following: ``` $ snapcraft init Created snap/snapcraft.yaml. Edit the file to your liking or run `snapcraft` to get started $ snapcraft build Preparing to pull my-part Pulling my-part Preparing to build my-part Building my-part $ echo " build-attributes: [debug]" >> snap/snapcraft.yaml $ snapcraft build Skipping pull my-part (already ran) The 'build' step of 'my-part' is out of date: The 'build-attributes' part property appears to have changed. In order to continue, please clean that part's 'build' step by running: snapcraft clean my-part -s build ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Removes redundant build-attributes tracking from individual plugins, centralizing state management in core classes while preserving correct dirty-state detection for build steps.
qwen3.6-35b-a3b-mtp-q6 Merged fix eliminating redundant build-attributes tracking in plugin schemas. Core properties are now centralized in state classes, maintaining independent plugin schemas and ensuring correct build step invalidation.
qwen3.6-35b-a3b-mtp-q6 Merged. Removes redundant build-attributes tracking from individual plugins, centralizing it in core Snapcraft state classes to ensure accurate dirty-state detection without schema duplication.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1148 feat: Plugin-constrained build-attributes craft-parts merged Merged. Adds plugin-constrained build-attributes to craft-parts, requiring explicit plugin support. Currently implements the 'self-contained' attribute for maven and maven-use plugins. Approved and passed all CI checks.
71%