Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Mistyped xtool.yml keys are silently ignored (e.g. entitlements instead of entitlementsPath)

オープン
#353 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
swift
領域
build-system

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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 of entitlementsPath: — 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 of iconPath: — the app silently ships without its icon. Notably the value is validated (iconPath: icon.jpg fails with "iconPath should have a 'png' path extension", PackSchema.swift:56-60), but a mistyped key isn't.
  • extension: instead of extensions: — the extension is silently not built.
  • bundleId: (lowercase d) instead of bundleID: — then orgID is missing too, and you get "Must specify either orgID or bundleID", which at least fails — but if the project also sets orgID, 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.

主要言語
Swift
スター
5.5k
フォーク
163
平均マージ
18時間 29分
マージ済み PR(30日)
27

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

xtool-org/xtool のほかの issue

xtool-org/xtool の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。