-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What should we do about purescript- prefixes? #388
Comments
I think this is a sensible default since |
In today's Registry weekly call we agreed that our first priority here is to avoid users getting confused by the legacy prefix.
|
The first two steps of the plan are complete but the third (Pursuit) is not yet done. |
Historically the PureScript community has used a
purescript-
prefix on package names. For example, theaff
package is in thepurescript-aff
repository, and it is registered on Bower under the namepurescript-aff
. This applies to the compiler and Pursuit, too: thepurs publish
command considers the "package name" to be whatever came from a bower.json'sname
field, and Pursuit does the same thing.However, when we stopped depending on Bower, we moved away from prefixes.
aff
may be in thepurescript-aff
repository, but itsspago.dhall
file and its name as far as the package sets are concerned isaff
.With the registry this goes a step further. Packages in the registry are registered without the prefix, and their name is recorded in the
purs.json
manifest file without the prefix. As far as the registry is concerned (and its products, such as the package sets) there is no usage of the prefix.This leaves us in an inconsistent state where some tooling and some conventions use the prefix and some do not. For example:
purescript-
in their namepurescript-
in the Bowerfile package namepurs publish
can accept either abower.json
file or apurs.json
file for publishing packages. If it receives apurs.json
file, then it will add thepurescript-
prefix to the name so as to mirror the Bower naming scheme.purs publish
, so everything is prefixed on Pursuit.This is super messy! The registry has to perform some awkward processing so that things work out:
purs publish
so that the links work correctly. We don't add the prefix to the package manifest because the compiler already does that by default.This can easily result in weird cases:
purs.json
manifest (since, after all, that seems to be what all the other packages are doing)? We will not strip off the prefix when registering and then a second prefix will be added when publishing to Pursuit.purescript-language-cst-parser
won't be able to use the prefix, even though in that case it totally makes sense: it's a parser for the PureScript language.There's no clear answer for how to keep all of this tidy, but one idea I had is to reject packages that use the purescript- prefix by default, pinging the registry trustees — the user can opt-in to this explicitly and we can continue the pipeline, but by default we tell them the prefix is no longer used.
Regardless of everything else, we're gonna have to start putting a plan together for Pursuit, so that Pursuit itself no longer uses the prefix.
The text was updated successfully, but these errors were encountered: