project_loader: process parts in consistent order
Metadata
Current evaluation
Merged #2146 as commit e3f327f88, sorting parts by name for deterministic project loading while honoring after prerequisites; fixes LP #1759875.
Resolution: closed resolved
Reason: PR #2146 was merged in commit e3f327f88. It resolved nondeterministic part ordering by processing parts in a consistent, name-sorted order.
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`?
-----
Currently, if parts are not strictly ordered by using `after`, the snapcraft CLI will process them in a completely non-deterministic order that changes between runs. This can make it extremely difficult to track down bugs that only occur when building in a specific order. This PR resolves [LP: #1759875](https://bugs.launchpad.net/snapcraft/+bug/1759875) by processing parts consistently and deterministically by sorting them by name.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged #2146 as commit e3f327f88, sorting parts by name for deterministic project loading while honoring after prerequisites; fixes LP #1759875. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #2146 in commit 0b84e215cc12, making project_loader process parts deterministically by sorting names and resolving LP: #1759875. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2146 in commit e3f327f88, making part processing deterministic by sorting parts by name and resolving LP #1759875. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2146, making Snapcraft process parts deterministically by sorting them by name; merge commit 0b84e215cc124017db32aee74c40b1c9d381e783. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #2146 in commit 0b84e215cc124017db32aee74c40b1c9d381e783, sorting parts by name for deterministic processing and resolving LP: #1759875. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Resolves LP: #1759875 by sorting parts by name for deterministic builds. Approved after adding a consistency test and rejecting OrderedDict reliance. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into master. Fixes non-deterministic part processing by sorting parts by name, resolving Launchpad bug #1759875. Includes consistency tests and passes all coverage checks. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #799 Load project information in one location | snapcraft | merged | Merged as commit 1a282439c (#799), centralizing project loading so the project resolves before plugins load from parts, fixing LP bug #1622435 (remote parts filesets not respected). | |
| #2472 project loader: do not leak a part's build-environment | snapcraft | merged | Merged #2472 as commit 8ca7dd7f2, preventing a part's build environment from leaking into parts declared with after and avoiding unintended concatenation. |