project_loader: replace dict keys as well as values
Metadata
Current evaluation
Merged PR #2166 as commit 95c842863, expanding built-in variables in dictionary keys as well as values and fixing the organize behavior behind LP #1746636.
Resolution: closed resolved
Reason: PR #2166 was approved and merged into master as commit 95c842863. The patch applies Snapcraft's built-in-variable substitutions to dictionary keys as well as values, resolving the reported organize behavior.
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 snapcraft CLI actually runs a text replacement over the `snapcraft.yaml`, replacing all occurrences of its built-in variables (such as `$SNAPCRAFT_STAGE`) with their actual values, knowing that, once these are migrated into the final `snap.yaml` the variables have no meaning. However, when it comes to running the replacements on dicts, it only checks the values for replacement, not the keys. This PR fixes [LP: #1746636](https://bugs.launchpad.net/snapcraft/+bug/1746636) by simply running replacements on the keys as well as the values.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2166 as commit 95c842863, expanding built-in variables in dictionary keys as well as values and fixing the organize behavior behind LP #1746636. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2166 via commit 95c842863, replacing built-in variables in dictionary keys as well as values and fixing LP: #1746636. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged into master, extending snapcraft variable replacement to dictionary keys alongside values. Resolves bug LP:1746636. Approved by maintainers, passed CI checks, and integrated with 100% diff coverage. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into master. Resolves Launchpad bug #1746636 by extending variable substitution to dictionary keys in snapcraft.yaml, alongside existing value replacements. Achieved 100% test coverage. |
Update history
No update history recorded yet.
Related issues
No related issues found above the similarity threshold.