← Back to issue list

fix: parts: check for out of source builds

View original Github issue

Metadata

Project
craft-parts
Number
#248
Type
pull request
State
closed
Author
mr-cal
Labels
Created
Updated
Closed

Current evaluation

Merged to fix out-of-source build detection in cmake and meson plugins, resolving source directory selection issues with the source-subdir parameter. Addresses CRAFT-1185.

Suggested action:

No scores available.

Issue body

- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? ----- Plugins that supported out-of-source building were not working with the `source-subdir` parameter. There were two minor issues: - A missing check for out-of-source plugins when determining the build directory - cmake and meson plugins not choosing the right source directory Unfortunately, accessing the `out_of_source_build` property prior to instantiating the plugin was a challenge. I've made some comments below. (CRAFT-1185)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged to fix out-of-source build detection in cmake and meson plugins, resolving source directory selection issues with the source-subdir parameter. Addresses CRAFT-1185.
qwen3.6-35b-a3b-mtp-q6 Merged fix addressing out-of-source build failures with the source-subdir parameter. Corrected build directory detection and resolved cmake and meson source directory selection issues.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#250 parts: check for out of source builds craft-parts merged Merged fix for out-of-source builds with the source-subdir parameter. Added missing out-of-source checks and corrected source directory selection for cmake and meson plugins. Approved, passed CI, and merged with 221 additions and 24 deletions across 22 files.
87%
#180 plugins: add meson plugin craft-parts merged Merged to add a Meson plugin and correct out-of-source build logic. Approved by one reviewer, the change introduces 532 additions across seven files and resolves CRAFT-863.
73%
#1825797 cmake: Shouldn't use sourcedir for building snapcraft (launchpad) open Request for cmake plugin to use out-of-source builds (build in SNAPCRAFT_PART_BUILD instead of SNAPCRAFT_PART_SRC). 2689 days old, no labels, no comments, no maintainer interaction. The current craft-parts cmake plugin already implements out-of-source builds via get_out_of_source_build() returning True.
73%
#3392 plugins v2: add support for out of source tree builds snapcraft merged Merged. Introduces an out_of_source_build property to PluginV2, disabling automatic source copying. Applied to meson and cmake plugins, adjusted for consistency per review, and merged with 100% diff coverage.
72%
#3154 cmake v2 plugin: take source-subdir into account snapcraft merged Merged. Updates cmake v2 plugin to use SNAPCRAFT_PART_SOURCE_WORK instead of SNAPCRAFT_PART_SOURCE for pull and build steps, fixing source subdirectory handling. Approved, passed CI, and modified 10 files (+55/-7).
72%