create JSON schema for slice definitions files

Aperta
#178 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
json
Ambito
devtools, tooling

Direzione di ricerca

Inizia esaminando l'issue #176 e lo schema delle slice di Chisel esistente in SchemaStore, quindi confronta lo schema Rockcraft e la sua pull request originale. Definisci lo schema di proprietà del repository e stabilisci in che modo format, chisel-release e la versione di Chisel influiscono sulla validazione; il lavoro sarà completo quando lo schema sarà manutenibile in questo repository e adatto all'uso con CI e SchemaStore.

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

Descrizione

Problem

The issue is depicted in #176. In short, we want to be able to validate new slice definitions that are being proposed, even though Chisel itself may ignore fields that are not part of the schema.

Suggested approach

Instead of making Chisel print warnings for unknown fields, the preferred approach is to create a manageable JSON schema within this repo, that can be updated alongside the code and used as a reference from the SchemaStore.

Pros:

  • the repo itself will be the source of truth and hold the explicit schema that Chisel expects within a Slice Definitions File
    • with this JSON schema, our CI can do an early validation of new slice definitions without having to run Chisel
  • adding this schema to the SchemaStore will allow contributors to have off-the-shelf validation within their IDEs
Additional considerations

When validating a slice definition, we may need to consider

  1. the format version
  2. the chisel-release
  3. the chisel version

We need to carefully think about this because adding new fields doesn't equate to bumping the format.

Examples

Similar work has already been done for Rockcraft:

Lingua principale
Go
Stelle
434
Fork
74
Merge medio
1g 30m
PR unite (30g)
1

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

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 canonical/chisel

Tutte le issue di canonical/chisel

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.