-
Notifications
You must be signed in to change notification settings - Fork 15
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
Uncurated Hackage Layer #6
Open
gbaz
wants to merge
7
commits into
haskell:master
Choose a base branch
from
gbaz:gbaz-uncurated
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
229dc65
Clarify the path to a proposal being "finished"
alanz f2979a0
Create 0000-uncurated-layer.rst
gbaz 7bbc492
Minor edits
tomjaguarpaw ac3d502
Update 0000-uncurated-layer.rst
gbaz 8f09419
Merge pull request #1 from tomjaguarpaw/patch-2
gbaz 040fa7b
Update 0000-uncurated-layer.rst
gbaz 6d14ad8
Update 0000-uncurated-layer.rst
gbaz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
.. proposal-number:: Leave blank. This will be filled in when the proposal is | ||
accepted. | ||
|
||
.. highlight:: haskell | ||
|
||
Uncurated Hackage Layer | ||
============== | ||
|
||
Motivation | ||
---------- | ||
|
||
There is a tension between two purposes of Hackage -- first as a central repository of Haskell code, and second as a curated store that has artifacts that are intended to be correctly built and depended upon in a self-contained fashion (i.e. which contain all information necessary to correctly build them). The way the latter is accomplished is by asking packages follow the Package Versioning Policy (https://pvp.haskell.org/) that is used to inform clients of a package of changes to that package that might affect them, and to provide a way for clients to specify a particular range of versions of a dependency that they are compatible with. | ||
|
||
The aim of this proposal is to separate these two purposes, by allowing authors to distinguish if they wish to opt-out of following the PVP and the attendant curation process that helps to maintain correct dependency information. In so doing, they recognize that their discoverability on Hackage may be reduced, since the UI will give precedence to those packages which, in conjunction with potential cabal revisions, are self-contained with regards to the information necessary to build them. | ||
|
||
Proposed Change | ||
--------------- | ||
|
||
This is a phased proposal with gradual rollout possible, in dependency order of the steps. The first phase is immediate. Other phases may be rolled out at any pace, but necessarily in the order specified (including the collapse of two steps into a joint step). | ||
|
||
The desired end-state will have the following properties: | ||
|
||
1) Packages will have an additional flag set in the Hackage package database, that indicates if they are curated or not. This flag is set *per version*. | ||
2) Package authors will set this flag *on upload*, by setting the "x-curation" property of the cabal file of a package. If no "x-curation" property is set, this will be considered "curated". Along with "curated" and "uncurated," other sub-settings will be made available. In particular: "uncurated-no-trustee-contact" and "uncurated-seeking-adoption". | ||
3) Hackage will provide two package repository roots -- http://hackage.haskell.org and http://uncurated.hackage.haskell.org These roots will provide index-01.tar.gz files that contain the information, respectively, for curated packages, or for all packages. The uncurated root will contain no revision information for uncurated packages (even those that have been adopted), but will contain revision information for curated packages. | ||
4) Curated packages cannot depend on uncurated packages, and the hackage server will detect this as an error at upload time. | ||
5) Uncurated packages may be "adopted" into the curated ecosystem by trustees. Metadata revisions necessarily remove the x-curation property from the revised cabal metadata. | ||
|
||
The first phase of this rollout is simply social. It has the following properties: | ||
|
||
+ Hackage trustees will recognize and respect the uncurated flag. When it is set to "uncurated-no-trustee-contact" they will not contact authors with any issues. They *will* retain the ability to make metadata revisions, bearing in mind that they must remove the x-curation property from revised metadata. | ||
|
||
The second phase is a technical change as soon as possible to enforce the semantics of x-curation: | ||
|
||
+ Hackage will ensure that no revision has x-curation set to any variant of "uncurated". | ||
|
||
The third phase is implementation of UI: | ||
|
||
+ The curation flag will be detected and displayed on a package's page, as part of the general data provided about a package. It will also be provided in search and browse results. Ideally, search and browse results will be extended in general with the ability to perform in-page filtering on flags and fields, such as "library", curated status, deprecation status, perhaps presence in distributions or compatibility with ghc versions, etc. (note: integration with tags may be a mechanism for this). | ||
|
||
The fourth phase is indices: | ||
|
||
+ The uncurated package repo root will be built and provided. | ||
|
||
Fifth, Hackage can now begin to gauge the costs of enforcing the policy regarding curated packages not depending on uncurated packages (or, more precisely, having an install-plan that can operate purely out of the curated index). | ||
|
||
+ Warnings will be given in such situations, and statistics will be collected as to the frequency of these warnings and the blocking packages in need of adoption. | ||
|
||
Sixth, when there is confidence among the trustees that the impact will not be too significant, the policy can be enforced. | ||
|
||
+ Curated package uploads will be checked on upload to ensure they don't have dependencies on uncurated packages. Further, the curated index will only provide information on curated packages. | ||
|
||
At this point we can proceed to a discussion on default filtering settings, bearing in mind that settings can always be saved and persisted per-user. | ||
|
||
Future Plans | ||
--------------- | ||
In the future, full support for collections may be implemented in Hackage. At such point, the current "curated" layer may simply become one of a number of collections (though likely the largest). The UI surrounding display and discovery of curated and uncurated packages, etc. would likely be transformed in such a setting (and indeed the two package repos might be merged again, with support for distinguishing curated and uncurated instead coming through some future collection specification). This is just speculation at the moment, but worth bearing in mind. The end-state given by this proposal is not necessarily the end-state of hackage -- just something that accomplishes the narrow goals set forward in the motivation without reliance on other potential work that is not yet fully specified. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am commenting here again because of this comment on Reddit:
I am not okay with the proposal as it is now, and taking my silence as tacit approval feels weird. As I stated earlier, I strongly disagree with hiding uncurated packages from the UI entirely. Is that decision part of this discussion, or is it going to happen at some later time?