@@ -1186,8 +1186,16 @@ prepare_build(bool print_fingerprint,
11861186 // Propagate lua-level namespace into the loaded manifest when
11871187 // the manifest itself doesn't carry one (Form A descriptors
11881188 // whose upstream mcpp.toml predates the namespace field).
1189+ // Guard: if the manifest's name already starts with luaNs+"."
1190+ // (e.g. name="mcpplibs.tinyhttps" with luaNs="mcpplibs"),
1191+ // the namespace is already embedded in the name — don't inject
1192+ // it again or the scanner will produce a double-prefixed
1193+ // qualified name like "mcpplibs.mcpplibs.tinyhttps".
11891194 if (manifest->package .namespace_ .empty () && !luaNs.empty ()) {
1190- manifest->package .namespace_ = luaNs;
1195+ auto prefix = luaNs + " ." ;
1196+ if (!manifest->package .name .starts_with (prefix)) {
1197+ manifest->package .namespace_ = luaNs;
1198+ }
11911199 }
11921200
11931201 return std::pair{effRoot, std::move (*manifest)};
@@ -3290,7 +3298,7 @@ int run(int argc, char** argv) {
32903298 std::string_view a = argv[1 ];
32913299 if (a == " --help" || a == " -h" ) { print_usage (); return 0 ; }
32923300 if (a == " --version" || a == " -V" ) {
3293- std::println (" mcpp {}" , mcpp::toolchain::MCPP_VERSION);
3301+ std::println (" mcpp {} - " , mcpp::toolchain::MCPP_VERSION);
32943302 return 0 ;
32953303 }
32963304 }
0 commit comments