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

Importing a VM with an invalid config.plist should name the offending key

Aperta Adatta ai principianti
#7,936 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
swift
Ambito
desktop

Direzione di ricerca

Inizia in Platform/UTMData.swift, nei controlli di importazione di VMData(url: url) intorno alle righe 676 e 733, e traccia il modo in cui gli errori di decodifica di Codable vengono attualmente ridotti a UTMDataError.importFailed. Usa i due esempi di config.plist non validi per verificare che l'output di debug includa codingPath e debugDescription di DecodingError, invece del solo errore di importazione generico.

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

Descrizione

When a VM's config.plist does not decode, UTM reports only that it cannot import the VM. The config is decoded with Codable, and the DecodingError carries the key path and the reason, but that is discarded. Platform/UTMData.swift uses guard let _ = try? VMData(url: url) else { throw UTMDataError.importFailed } (lines 676 and 733 in v4.7.5, and the same pattern on main).

Two examples from writing configs for 4.7.5 by hand. Each took a bisection to find:

  • omitting PS2Controller, which is decoded with a non-optional decode() and has no default
  • UsbBusSupport set to "USB3_0" instead of the raw value "3.0"

Both give the same generic message. Showing DecodingError.Context.codingPath and debugDescription, even only in the debug log, would turn each of these into a one-line fix.

Configuration

  • UTM Version: 4.7.5
  • macOS Version: 26.x
  • Mac Chip: M2 Pro
Lingua principale
Swift
Stelle
35.9k
Fork
1.9k
Merge medio
2g 20h
PR unite (30g)
23

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 utmapp/UTM

Tutte le issue di utmapp/UTM

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.