Details
Description
Consider the following:
import qbs import qbs.FileInfo import qbs.TextFile Project { Product { name: "test" multiplexByQbsProperties: ["architectures"] destinationDirectory: FileInfo.joinPaths(project.buildDirectory, qbs.architecture) Group { files: ["test.h"] qbs.install: true qbs.installDir: "include" } qbs.installPrefix: qbs.architecture } Product { name: "other" type: ["dummy"] Depends { name: "test" } Rule { multiplex: true inputsFromDependencies: ["installable"] Artifact { filePath: "dummy" fileTags: ["dummy"] } prepare: { var cmd = new JavaScriptCommand(); cmd.silent = true; cmd.sourceCode = function() { var tf; try { tf = new TextFile(output.filePath, TextFile.WriteOnly); } finally { if (tf) tf.close(); } } return [cmd]; } } qbs.installPrefix: qbs.architecture } }
Build with modules.qbs.architectures:x86,x86_64 and the error from the title appears. Note that I've also gotten this to appear when the 'other' product's multiplexByQbsProperties is ALSO set to "architectures" but I was not able to create a reproducible test case for that.
It seems that this connect() check in buildgraph.cpp might be broken for multiplexing cases and/or it should be checking the installed artifact path instead of the source.
Also, this is not exactly a user-facing error. Could it be rephrased or instead made into an assert?