Skip to content

Simplify GYB device definitions with feature defaults - #508

Merged
Zandor300 merged 2 commits into
masterfrom
t3code/support-gyb-named-parameters
Sep 10, 2026
Merged

Zandor300 merged 2 commits into
masterfrom
t3code/support-gyb-named-parameters

Conversation

@Zandor300

Copy link
Copy Markdown
Member

Device definitions currently repeat long sequences of positional feature values. Add keyword-only feature parameters with defaults (False for flags and 0 for Apple Pencil support and cameras), and specify only supported features in each definition. Core specifications remain required.

Updates all 134 device definitions and removes 1,543 redundant default values. Regenerated Source/Device.generated.swift; its contents are byte-for-byte unchanged, so only the GYB template is included in the diff.

Validation:

  • GYB generation succeeded; generated Swift matches the committed file exactly.
  • Compared every attribute of all 134 devices against the original definitions: identical.
  • swift test: all 4 tests passed.
  • git diff --check: passed.
  • swiftlint --quiet: fails on the existing cyclomatic complexity violation at Source/Device.generated.swift:626 (140 versus limit 10); also reports existing warnings, including obsolete rule names. The generated file and lint configuration are unchanged.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
1 Warning
⚠️ Big PR, consider splitting into smaller

Generated by 🚫 Danger

@Zandor300
Zandor300 force-pushed the t3code/support-gyb-named-parameters branch from e00bde8 to f17cd4c Compare September 9, 2026 21:09
@Zandor300
Zandor300 merged commit 5521bad into master Sep 10, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant