Merge branch 'claude/issue-41': refuse a build that holds two builds of one module
All checks were successful
Flatpak / flatpak (push) Successful in 12m49s

PR #42, fixes #41. Build() now refuses a configuration whose transitive
dependencies hold two configurations exporting a module of the same
name, such as one project loaded along two paths with different arg
lists, before it builds anything, and names both paths. Until now both
builds ended up in the one program, which compiled cleanly and then
read garbage. Merged cleanly on top of claude/forward-project-args;
the suite, with claude/dependency-notes' fixtures, passes under the
new check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jorijn van der Graaf 2026-10-31 05:30:36 +01:00
commit eefd1df3eb
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB
11 changed files with 233 additions and 4 deletions

View file

@ -97,9 +97,9 @@ export namespace Crafter {
// --debug and the project's own flags reach every sibling down a chain
// without being passed. Set them to forward something else: {} for
// nothing, or a list built from this project's args, such as one without
// a flag only this project reads. Give such a list to every sibling: a
// project that two paths load with two different lists is built twice,
// and the program ends up with both builds.
// a flag only this project reads. Give such a list to every sibling:
// Build() refuses a graph in which two paths load one project with two
// different lists, since the program would end up with both builds.
struct GitProjectSpec {
GitSource source;
fs::path projectFile = "project.cpp";