You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
build.mcpp: two build-dependencies with the same tail (openmui.rules, gongfu.rules) warn on every build though their qualified names differ #852
warning: build.mcpp: dependency name collides on MCPP_DEP_RULES_DIR (kept '.../mgame/gongfu/rules', ignored '.../mcpp/rules') — rename one dependency to disambiguate
Both rules still work, because each one can ask for itself by its qualified name: mcpp::dep_dir("openmui.rules") gives MCPP_DEP_OPENMUI_RULES_DIR, and the published names include the qualified spelling (#642). But:
The warning stays on every build, and the fix it suggests (renaming a package) isn't the fix the user needs.
A rule that asks for its bare name, dep_dir("rules"), silently gets the other package's directory. openmui.rules did this until we changed it to look itself up by its qualified name.
Expected
When two visible dependencies share a bare tail but their qualified names differ, the ambiguous bare name could be left unbound, with no warning: neither package can be the bare name. The qualified names stay unique.
A bare dep_dir("rules") would then answer empty, so a rule that asks for its bare name fails visibly instead of reading the other package's directory. The current warning could become a note that says to ask by the qualified name.
Where
src/build/prepare/graph.cppfillDepDirs (the published names, including the bound tail) and src/build/build_program.cppm (the collision warning on the MCPP_DEP_<NAME>_DIR and _LINKAGE variables).
Seen in
Sunrisepeak/mui (showcase/fighting's build.mcpp, which uses both openmui.rules and gongfu.rules).
Activity