Observed
run_build_program synthesises a build program for every package that has no build.mcpp and whose dependencies declare a rule_module (src/build/build_program.cppm, synthesised_rule_program). The comment at the synthesis site states the intended condition: "when a dependency's rules claimed device sources in this package". The code does not check that condition; it tests only env.ruleModules.empty().
A package that enables a rule feature only to import its module therefore runs the rule with its defaults. Such a package has no .ui, .qrc or .ts of its own; GalTranslPP's gpp.build is an example. Before mcpp-plugins 0.15.2, rules-qt then reported "no Qt SDK" once per consuming build. That was 5 warnings in one emit and 2 to 3 per member build, and each run costs a build-program compile.
[build-dependencies]
mcpp.plugins = { path = "…", features = ["rules-qt"], host-module = true } # no build.mcpp, no device sources
Rules mcpp.rules.qt (mcpp:plugins)
build.mcpp compiling
build.mcpp running
warning: helper: mcpp.rules.qt: no Qt SDK. …
mcpp-plugins 0.15.2 makes rules-qt silent in this case. The program is still compiled and run.
Request
Synthesise the program only when this package has device sources that a dependency's rule claims, as the comment says.
Observed
run_build_programsynthesises a build program for every package that has nobuild.mcppand whose dependencies declare arule_module(src/build/build_program.cppm,synthesised_rule_program). The comment at the synthesis site states the intended condition: "when a dependency's rules claimed device sources in this package". The code does not check that condition; it tests onlyenv.ruleModules.empty().A package that enables a rule feature only to import its module therefore runs the rule with its defaults. Such a package has no
.ui,.qrcor.tsof its own; GalTranslPP'sgpp.buildis an example. Before mcpp-plugins 0.15.2,rules-qtthen reported "no Qt SDK" once per consuming build. That was 5 warnings in oneemitand 2 to 3 per member build, and each run costs a build-program compile.mcpp-plugins 0.15.2 makes
rules-qtsilent in this case. The program is still compiled and run.Request
Synthesise the program only when this package has device sources that a dependency's rule claims, as the comment says.