haskell / haskell/hackage-server
Contextual (time-dependent) mapping of package names to packages; garbage collection
Nessuno ha ancora preso questa issue.
- Lingua principale
- Haskell
- Stelle
- 467
- Fork
- 226
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
As it stands, if I upload a package X then the package name X will forever point to my package (and its revisions). If I abandon my package and let it die, still the name X will be taken forever.
Mathematically, there is no problem with this, since at each point of time the available names is a potential infinity. However, people like "nice" names that make their package easily discoverable, and those nice names should not be taken up forever by dead packages.
In fact, we need not eternally bind a name to a fixed package. (In natural language, words are not bound to the same meaning for all eternity, but the meaning can change over time as human culture develops and objects disappear from every-day life and new objects appear.)
Resolution of names to packages could be time-dependent. At each point in time, there is a context that maps package names to packages. If a package is uploaded at time t, then context t is used to resolve the names it mentions. Even if at a later time a name is assigned to a new package, the references of older packages stay intact.
This way we could open the avenue to future garbage collection of dead packages, making their names available for new packages (after some resting time).
One could even refer to package whose name has been reassigned by explicitly providing the context, e.g. X@2013 could point to the package that held the name X in 2013. In general, the absolute reference would be X@t where t is a point in time, given to the precision where no ambiguity arises in the resolution of X. But usually, the context can be implicit; there would be no need to change the user interaction in any way.
I think we would not need to store extra information. All the information to reconstruct the context at a certain point in time is already on hackage (i.e. the upload times for the packages).
If it were decided recycle a name, an entry like unlink X could be added to the hackage journal to indicate that the name can be taken again (after some resting time of a couple of years).
Original write-up: https://github.com/haskell/hackage-server/issues/112#issuecomment-950147006
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dalla descrizione originale collegata nell’issue e verifica come Hackage risolve attualmente i nomi dei pacchetti e registra gli orari di upload. La proposta prevede contesti dei nomi dipendenti dal tempo, riferimenti espliciti come X@t e voci di journal come unlink X; per arrivare a done sarebbe necessario un design condiviso per la risoluzione, i periodi di attesa e la Garbage Collection.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- haskell
- Ambito
- backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 20/100