[Feature]: treat two names of one install as the same version

Aperta
#814 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Detoy ci sta già lavorando.

Dal 22/11/2026.

  • #820 di @Detoy — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go, lua
Ambito
cli

Direzione di ricerca

Start from the vfox install path and the plugin interface that calls PreInstall, since the issue says the install flow checks exact names both before and after that hook. Read the handling of --as (#807) for the existing name-vs-copy distinction, then choose between passing installed names into PreInstall or letting it return aliases. Done means vfox install [email protected] followed by vfox install [email protected] reports already installed rather than downloading again, with a regression test for the canonical-name check.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
1. Your usage scenarios?

vfox checks whether a version is already installed by its exact name, both before and after PreInstall. A plugin can return a canonical name from PreInstall, and vfox checks that name again before it downloads. That works well. But PreInstall gets only the requested version, not the list of installed versions, so a plugin cannot map a new name to an install that was made under an older name.

Example, from the Erlang/OTP plugin (version-fox/vfox-erlang): on Linux, its prebuilt list showed OTP-29.1.2, so installs were named OTP-29.1.2. The plugin is changing to name the same build 29.1.2. After vfox install [email protected], running vfox install [email protected] downloads the build again and creates a second install.

This is different from vfox install --as (#807), which is for a second copy on purpose. Here the two names are one release, and one install is wanted.

2. What is your expected outcome?

Either of these:

  1. Pass the names of the installed versions to PreInstall, so a plugin can return a name that is already installed, and vfox reports already installed.
  2. Let PreInstall return alternative names for the same install, for example aliases = {"OTP-29.1.2"}, and check them the same way as the canonical name.

Related: #664 (plugins providing paths into the cache).

Environment: vfox 1.1.0 on Ubuntu 26.04. On main (after #807), the install flow still checks exact names before and after PreInstall, and PreInstall still gets only the version.

Lingua principale
Go
Stelle
4k
Fork
177
Merge medio
1g 20h
PR unite (30g)
31

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di version-fox/vfox

Tutte le issue di version-fox/vfox

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.