diff --git a/mcpp.toml b/mcpp.toml index e199bf4..6d35463 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -1,6 +1,6 @@ [package] name = "mcpp" -version = "0.0.57" +version = "0.0.58" description = "Modern C++ build & package management tool" license = "Apache-2.0" authors = ["mcpp-community"] diff --git a/src/build/execute.cppm b/src/build/execute.cppm index 6073065..784548a 100644 --- a/src/build/execute.cppm +++ b/src/build/execute.cppm @@ -155,7 +155,14 @@ bool is_stale_ninja_failure(std::string_view output) { return output.find("loading 'build.ninja'") != std::string_view::npos || output.find("loading build.ninja") != std::string_view::npos || output.find("unknown target") != std::string_view::npos - || output.find("manifest 'build.ninja' still dirty") != std::string_view::npos; + || output.find("manifest 'build.ninja' still dirty") != std::string_view::npos + // A cached build.ninja can reference an input (e.g. a dependency + // source under the registry) that moved or was reinstalled since the + // graph was generated — the build fingerprint does not yet cover + // registry dep state, so the stale graph is reused. Ninja then aborts + // with this signature. Treat it as stale → drop to a full regen + // instead of hard-failing and forcing the user to `mcpp clean`. + || output.find("missing and no known rule to make") != std::string_view::npos; } // Compile a prepared BuildContext. Shared between `mcpp build` and `mcpp run` diff --git a/src/toolchain/fingerprint.cppm b/src/toolchain/fingerprint.cppm index 1dd4d04..e65f553 100644 --- a/src/toolchain/fingerprint.cppm +++ b/src/toolchain/fingerprint.cppm @@ -18,7 +18,7 @@ import mcpp.toolchain.detect; export namespace mcpp::toolchain { -inline constexpr std::string_view MCPP_VERSION = "0.0.57"; +inline constexpr std::string_view MCPP_VERSION = "0.0.58"; struct FingerprintInputs { Toolchain toolchain;