Pitch: Add identifier uniqueness criteria to SSWG minimum requirements
My interpretation in a software context of this would include that many different components need to be able to interact as a system. In other words, it should be possible to combine pretty much any (SwiftPM) package into an application which is 'a system'.
However, Swift and SwiftPM both have certain restrictions regarding names which can stop two packages being able to coexist in one application. Namely, at least the following must be unique across a whole application:
- all module names
- the package basename (
- the pacakge name (the
Currently, the only requirement on uniqueness that the SSWG requires is
- Name (must be unique within SSWG)
Besides this being not precise enough, I strongly believe the SSWG should add the following to the minimum requirements:
A package must ensure that at the time it submits the proposal to the SSWG the following uniqueness criteria a met:
- all module names are unique
- the package basename is unique
- the package
Package.swiftmatches the package basename and is unique
The author(s) should make a reasonable effort to ensure that the names are unique, for example by searching github.com & gitlab.com. Archived or very outdated and clearly inactive packages can be ignored but must be listed as having possibly conflicting identifiers.
Also, for the health of the ecosystem, authors should try to prevent future name clashes to a reasonable degree. For example, even if still available, a package should abstain from naming a module or a type just
Connectionbecause of the likelihood of clashes in the future.
Notes: I previously started a discussion thread for the wider issues. This pitch is not as wide-ranging as the discussion thread and tries to merely address the immediate, worst issues that we would face if we ignored module/identifier clashes.
Please let me know your thoughts on this. If people are generally happy, I'd proceed with a slightly more detailed proposal.