pluginhandler: make the build environment available to all steps
Metadata
Current evaluation
Merged. Reviewer feedback refined scoping: build environment is now available across all plugin steps. SNAPCRAFT_STAGE stays global, build-environment stays on the build step. Changes affect 10 files.
Suggested action: —
No scores available.
Issue body
LP: #1876260
Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged. Reviewer feedback refined scoping: build environment is now available across all plugin steps. SNAPCRAFT_STAGE stays global, build-environment stays on the build step. Changes affect 10 files. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Reviewer feedback refined the implementation to keep SNAPCRAFT_STAGE available globally while restricting build-environment to the build step only, aligning with project conventions. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged after incorporating reviewer feedback on environment variable scoping. The change exposes the build environment to all steps, keeping SNAPCRAFT_STAGE globally available while aligning other variable scopes with established conventions. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3096 pluginhandler: export SNAPCRAFT_BUILD_BASE to build environment | snapcraft | closed | Closed. The change refreshes snap_meta before expand_env() to export SNAPCRAFT_BUILD_BASE to the build environment, fixing a population failure and improving package-repositories handling with extensions. | |
| #2047 pluginhandler: organize in build instead of stage | snapcraft | merged | Merged. Relocates file organization from the stage step to the build step in Snapcraft, resolving double-staging failures and ensuring collision detection accounts for organized files. Approved by reviewer. | |
| #2322 project_loader: add build-environment part property | snapcraft | merged | Merged into master. Adds a build-environment property to snapcraft parts for declarative environment variable definition. Resolves LP: #1778174. Approved and passed CI. | |
| #3126 pluginhandler: allow cleaning the build step | snapcraft | merged | Merged fix resolving PluginV2 part cleanup failures caused by an improper guard in the clean_build method. Approved by reviewer, passed CI, and integrated into the codebase. | |
| #2122 many: introduce variables for part src and build | snapcraft | merged | Merged following approval. Introduces new environment variables and replacements for part src and build directories, resolving LP #1763028. Consolidates SNAPCRAFT_* environment handling into a single location. Approved by one reviewer with passing CI checks. | |
| #2744 project_loader: load build-environment after snapcraft environment | snapcraft | merged | Merged fix to load the build-environment after the snapcraft environment, enabling access to internal variables like $SNAPCRAFT_PART_INSTALL. The change swaps the evaluation order in the project loader and was approved by maintainers. |