Does purescript spago has package scopes?
Unique names of packages have traditionally been enforced by the packages being uploaded to bower. Bower doesn't accept new packages anymore. New packages must now register in a specific repository until we have a working registry.
One important property of a scope is that you have to be the owner of an organisation to publish packages under your scope. Meaning, if you know that Google owns @google
, all packages starting with @google/
are published by that organisation. In PureScript, while you can prefix your package in any way you want, this does not prevent others from naming them after your organisation.
package-sets
has groups. But groups are just files that organise packages of one author in one file. They do not reflect in the package names. I also don't think that this is currently a concern of the working group that is working on the new registry. PureScript is very small as a community and there are not that many packages. The package sets are manually maintained.
There is another level to this. Packages have names, but also modules have names. I have discussed briefly, if I should name a module after another one (e.g. Data.BigInt
). People were not a fan even if it would support the same interface as a "drop in replacement". It is considered bad manners or bad practice to use an existing name. So basically people simply try not to name modules after other modules.
Overall it is not perfect, but the ecosystem is so small that it doesn't cause any big problems.