Mistyped xtool.yml keys are silently ignored (e.g. entitlements instead of entitlementsPath)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- swift
- Área
- build-system
Línea de trabajo
The schema is PackSchemaBase in Sources/PackLib/PackSchema.swift (lines 8-36), decoded with Yams around lines 73-75. Start by seeing how the decoder drops unknown keys, then compare the keys in the raw YAML document with the known property set. Done means an unrecognized key such as entitlements or icon produces an error or warning, and the issue's open question about error versus warning is settled with a maintainer.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Keys in xtool.yml that don't match a schema property are silently ignored. Because almost every schema property is optional, a single-character typo in a key name produces a valid-looking build with the wrong contents instead of an error.
PackSchemaBase (Sources/PackLib/PackSchema.swift:8-36) is decoded with plain Codable (via Yams at PackSchema.swift:73-75), so unknown keys are dropped by the decoder and the missing properties decode as nil.
Concrete cases:
entitlements:instead ofentitlementsPath:— the app is silently built with no entitlements at all. A push/network-extension app then installs but its features fail at runtime, and nothing at configure or build time indicates the file was never used.icon:instead oficonPath:— the app silently ships without its icon. Notably the value is validated (iconPath: icon.jpgfails with "iconPath should have a 'png' path extension",PackSchema.swift:56-60), but a mistyped key isn't.extension:instead ofextensions:— the extension is silently not built.bundleId:(lowercased) instead ofbundleID:— thenorgIDis missing too, and you get "Must specify either orgID or bundleID", which at least fails — but if the project also setsorgID, the explicit bundle-id intent is silently lost.
Related: when both bundleID and orgID are present, bundleID silently wins (PackSchema.swift:41-44); a warning would be reasonable there too.
The version key shows the other behavior is possible: an unsupported version errors out explicitly (PackSchema.swift:43-44), so being strict about unknown keys is consistent with the existing design.
Suggested direction
After decoding, diff the keys actually present in the YAML document against the known property set and throw (or at least warn) on unrecognized keys. YAMLDecoder won't do this on its own, but the raw document keys are easy to obtain with Yams' Yams.load(yaml:), and a short known-key list would catch most typos without much maintenance.
- Lenguaje dominante
- Swift
- Estrellas
- 5.5k
- Forks
- 163
- Merge medio
- 19 h 16 min
- PR fusionados (30 d)
- 26
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de xtool-org/xtool
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
-
Error: exited(127)Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
xtool-org/xtool#376 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Feature Request] Add `xtool update` command for automatic CLI updatesPosiblemente ocupada @Madhav008 la tomó hace 2 días. Abiertoenhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
xtool-org/xtool#365 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
xtool-org/xtool#364 · 13 reacciones ·
Los mantenedores suelen responder en 1 día
Todos los issues de xtool-org/xtool
Issues similares
-
[Bug] Error: thaw@beta: thaw@beta: This cask does not run on macOS versions older than Golden Gate.Abiertomacos-27 ops
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
thaw-app/Thaw#1400 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
salah-kit/Salah#75 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
compiler-explorer/compiler-explorer#9402 ·
Los mantenedores suelen responder en 1 día