SwiftPM is such diva. TIL "target names need to be unique across the package graph", meaning two DIFFERENT packages can't provide a target with the same name.
@krzyzanowskim Someone really thought this through, right? At least it's like the first package manager ever, and there was no prior art they could check on.
@helge yea, very damn "just make target name unique GLOBALLY" thinking over there
@krzyzanowskim Darwin, the package with the sole purpose to demonstrate the issue. From 6 years ago. https://github.com/AlwaysRightInstitute/Darwin
@krzyzanowskim Another issue is that it affects the whole resolution graph. E.g. if one target uses A and another target uses a different A, but they otherwise have no business w/ each other, that still fails. Something they already addressed in dyld w/ 2-level namespaces 25 years ago. But no, they don't even ask their *own* elderly people ;-)
(btw: those are a hack to workaround such issues)
@helge Swift 6.3 introduced module keyword ModuleA::A ModuleB::A
@krzyzanowskim Oh, I need to read up on that. I thought it just doesn't work on the binary level (because the pkg name is not included in the module name).
@krzyzanowskim Are you referring to the "Module name selectors"? I'm slightly confused by them, because that was already possible w/ just a dot? ModuleA.getValue, ModuleB.getValue or Swift.Error?
@helge yes. and yes, me too
@krzyzanowskim Maybe they are trying to get closer to C++ w/ the `::` syntax 🙈
@helge @krzyzanowskim I believe the review discussion called this exact point out several times 😅