What should we do about purescript- prefixes?
维护者通常 1 天内回复
@thomashoneyman 已经在做这个了。
开始于 2026年7月27日。
评估
这个 Issue 还没有评估数据。
描述
Historically the PureScript community has used a purescript- prefix on package names. For example, the aff package is in the purescript-aff repository, and it is registered on Bower under the name purescript-aff. This applies to the compiler and Pursuit, too: the purs publish command considers the "package name" to be whatever came from a bower.json's name field, and Pursuit does the same thing.
However, when we stopped depending on Bower, we moved away from prefixes. aff may be in the purescript-aff repository, but its spago.dhall file and its name as far as the package sets are concerned is aff.
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:
- Repositories will continue to use
purescript-in their name - Bowerfiles (for packages that continue to use them) will use
purescript-in the Bowerfile package name - The registry, purs.json manifest, and package sets do not use the prefix for package names
purs publishcan accept either abower.jsonfile or apurs.jsonfile for publishing packages. If it receives apurs.jsonfile, then it will add thepurescript-prefix to the name so as to mirror the Bower naming scheme.- Pursuit reuses the Bower naming scheme supplied by
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:
- We strip prefixes from packages when importing them from Bower, undoing the naming scheme. We don't strip the prefix if the package is published from a purs.json manifest.
- We have to re-add the prefixes when producing a resolutions file for publishing to Pursuit via
purs publishso 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:
- What happens if a user who hasn't followed all of this sees the prefixed names on Pursuit and on GitHub and decides to use a prefixed name in their
purs.jsonmanifest (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. - What if we decide to ban the use of the prefix in package names for say 1 year so that people can switch over? Then, packages like
purescript-language-cst-parserwon'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.
- 主要语言
- PureScript
- 星标
- 95
- 派生
- 79
- 平均合并
- 16 小时 13 分钟
- 30 天内合并 PR
- 14
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
purescript/registry-dev 的其他 Issue
-
难度 5/5 一周以上 新手友好度 22/100
purescript/registry-dev#804 · 9 条评论 ·
维护者通常 1 天内回复
-
A failed publish job permanently blocks retrying the same package version可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 48/100
purescript/registry-dev#793 · 5 条评论 ·
维护者通常 1 天内回复
-
Implement search and versioned Prim docs for the new Pursuit可能重新可做 @thomashoneyman 于 109 天前认领,目前没有进行中的 PR。 未关闭pursuit
purescript/registry-dev#790 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Migrate Pursuit application to the monorepo可能重新可做 @thomashoneyman 于 109 天前认领,目前没有进行中的 PR。 未关闭pursuit
purescript/registry-dev#789 · 1 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
Complete support for monorepos / subdir key and non-GitHub locations可能重新可做 @thomashoneyman 于 109 天前认领,目前没有进行中的 PR。 未关闭
purescript/registry-dev#750 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复