Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[EPIC] Prefer DRY tool versioning

Aperta
#1,699 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 8 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Ambito
documentation

Direzione di ricerca

Inizia con gli esempi referenziati in src/node/README.md e src/ruby/README.md, quindi esamina gli altri README delle feature che specificano esplicitamente le versioni degli strumenti in devcontainer.json. Verifica se le feature caricano già .nvmrc o .ruby-version, aggiorna gli esempi interessati in modo che utilizzino file di versione dedicati e documenta qualsiasi comportamento richiesto affinché le versioni locali, di Actions e del Dev Container possano rimanere allineate.

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

Descrizione

The examples in this repository often show a configuration approach where tool version numbers are explicitly specified in the devcontainer.json file.

However, best practice nowadays is to extract your tool versions to a dedicated file.

We should support this best practice in our examples by showing how to indirectly reference to versions.

Examples of thing to change

https://github.com/devcontainers/features/blob/4170bca4d08a2be5d96a33251a45a0027cc5cacb/src/node/README.md?plain=1#L14-L20

https://github.com/devcontainers/features/blob/4170bca4d08a2be5d96a33251a45a0027cc5cacb/src/ruby/README.md?plain=1#L9-L11

Example end state

"features": {
    "ghcr.io/devcontainers/features/node:2": {
        "version": ".nvmrc"
    }
}
"features": {
    "ghcr.io/devcontainers/features/ruby:2": {
        "version": ".ruby-version"
    }
}

Discussion

Adopting the above approach allows us to achieve DRY version specification with modern development approaches. This means we can easily achieve parity between local developers, GitHub Agents, GitHub Actions, and Dev Containers :nirvana_emoji:

It is possible that the above features I have referenced already implicitly load such a version file. If so, this behavior is undocumented.

I am marking this GitHub issue as an "epic" because it affects many different features. And perhaps we will require several pull requests to address this.

Lingua principale
Shell
Stelle
1.5k
Fork
621
Merge medio
7g 8h
PR unite (30g)
10

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 devcontainers/features

Tutte le issue di devcontainers/features

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.