← 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 #1620 via commit 599c70fd6, removing redundant plugin build-attributes handling because core state already tracks it for build-step dirtiness.

Resolution: closed resolved

Reason: PR #1620 was merged as commit 599c70fd6. It removed redundant build-attributes handling from plugins while preserving dirty-state detection in the core state classes.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved Merged #1620 via commit 599c70fd6, removing redundant plugin build-attributes handling because core state already tracks it for build-step dirtiness.
stealth/space-bunny-alpha — closed resolved Merged PR #1620 (599c70fd6), removing redundant plugin handling of build-attributes because core state already tracks it as a build property.
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.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1148 feat: Plugin-constrained build-attributes craft-parts merged Merged PR #1148 in commit 9f4e255d, introducing plugin-gated build attributes and self-contained support for the maven and maven-use plugins.
75%
#372 plugins: check if plugin properties are dirty craft-parts merged Merged PR #372 as commit 65afe7d2, adding plugin properties to part state and configurable dirty checks for pull/build steps without breaking existing plugin APIs.
72%