build providers: clean environment if project directory is changed
Metadata
Current evaluation
Merged PR #3434 as commit 805327b65, adding project-directory tracking and cleaning build environments after relocation or project-name reuse.
Resolution: closed resolved
Reason: The approved PR was merged as commit 805327b65. It now detects a changed project directory during instance compatibility checks and cleans the build environment before building.
Evaluated by: mr-cal-bot
No scores available.
Issue body
A common issue when a user moves/copies/relocates a project directory,
or re-uses the same project name.
Save the project directory location and verify it when checking
instance compatibility. If it doesn't match, clean the environment
prior to building.
Signed-off-by: Chris Patterson <chris.patterson@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 |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3434 as commit 805327b65, adding project-directory tracking and cleaning build environments after relocation or project-name reuse. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3434 as commit 805327b65: build providers now record the project directory and wipe/clean the build environment when it changes (moved or renamed projects reusing the same name). | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3434 as commit 805327b65, adding project-directory tracking and cleaning build environments when projects move or reuse the same name. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged into master. Fixes environment cleanup when project directories are relocated or reused. The build provider now tracks the directory path, verifies compatibility, and automatically cleans the environment on mismatch. Approved and passed CI. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into master. Build environment is now automatically cleaned when the project directory path changes or is reused. Directory location is saved and verified during compatibility checks to prevent stale state issues. 100% diff coverage. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3216 build providers: tweak environment clean detection and logging | snapcraft | merged | Merged #3216 in commit a00e3f52d, improving build-environment clean detection/logging and consolidating clean_project() into one call. | |
| #410 providers: introduce clean_project_environments() (CRAFT-314) | charmcraft | merged | Merged #410 via 91207ad4, adding clean_project_environments() in 4aa71880 to remove all project environments and support the upcoming clean command. | |
| #3284 build providers: rename clean() -> clean_parts() to clarify scope | snapcraft | merged | Merged into master as commit 81ade060c: build provider clean() renamed to clean_parts() (5 files, +9/-9) to distinguish parts cleanup from clean_project() and other build instance cleanup. |