-
Notifications
You must be signed in to change notification settings - Fork 79
Description
The registry by default only accepts a purs.json manifest file.
However, we've demonstrated in the legacy import tool that it is possible to derive a purs.json manifest from a legacy Spago manifest file — though it means creating version ranges from thin air. This got me thinking.
If a manifest file format is in use in the community, and it can be used to derive a correct purs.json manifest without having to modify the user-provided data, then I suggest we support it directly in the registry. This gives users fewer files to maintain in their repositories and less duplicated data. For example:
- The registry always accepts
purs.jsonfiles, and any package manager can support the registry by generating this file on behalf of their users. - If a package has no
purs.jsonfile, then the registry will fall back to the first supported format it finds. For example, the new-style Spago config files will have a format usable for apurs.jsonfile, so a package with aspago.dhallfile using the new format will be accepted. - If a package has no supported manifest files then it will be rejected.
In order for a format to be supported it must be translatable to a purs.json schema with no modifications. For example, that means:
- It must have a way to derive all required fields in the schema, including version ranges
- It must provide its users a way to use any optional fields that could end up in the
purs.json(it shouldn't omit fields such as the "owners" field)
To start we would only support the spago config format, with the option to expand over time if we want.