gum-runtime-syntax-version

Manages the assembly-level syntax version stamped on Gum runtime DLLs for codegen gating.

614|78|Updated Mar 11, 2015
One-click install
npx skills add https://github.com/vchelaru/Gum --skill gum-runtime-syntax-version
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gum-runtime-syntax-version
Source: https://github.com/vchelaru/Gum/tree/main/.claude/skills/gum-runtime-syntax-version
Command: npx skills add https://github.com/vchelaru/Gum --skill gum-runtime-syntax-version

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When the Gum tool generates code for a consumer project, it must know which runtime conventions, namespaces, and role interfaces the target runtime supports. This Skill explains how the integer syntax version stamped on each runtime assembly via GumSyntaxVersionAttribute drives that detection, and when to bump it.

Core Features & Use Cases

  • Version Stamping Guidance: Identifies the four AssemblyAttributes.cs files (GumCommon, MonoGameGum, RaylibGum, SkiaGum) that must be bumped in lock step, noting that KniGum and FnaGum inherit the MonoGameGum stamp via globbing.
  • Detection Logic Reference: Explains how SyntaxVersionDetectionService resolves the version from ProjectReference, PackageReference via MetadataLoadContext, or a manual .codsj override.
  • Bump Criteria: Distinguishes codegen-relevant runtime surface changes (renamed role interfaces, namespace moves) from changes that do not require a bump, and documents the instance-member pattern that replaces extension-method shims.
  • Use Case: When migrating a static extension like AddToRoot to an instance method on GraphicalUiElement, use this Skill to decide whether the change requires a syntax version bump and which assemblies to update.

Quick Start

Ask the AI to determine whether a planned Gum runtime API change requires bumping the syntax version and which AssemblyAttributes.cs files to update.

Frequently Asked Questions about gum-runtime-syntax-version

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bump the Gum runtime syntax version?

Bump the integer in the AssemblyAttributes.cs file of all four runtime projects (GumCommon, MonoGameGum, RaylibGum, SkiaGum) in lock step, then add a row to the version table in docs/gum-tool/upgrading/syntax-versions.md. KniGum and FnaGum inherit the MonoGameGum stamp automatically through csproj globbing.

When should the Gum syntax version be bumped?

Bump it only when the runtime surface that codegen pattern-matches against changes, such as renamed or removed role interfaces, new runtime types, or namespace changes. Pure renderable, Forms, or sample changes that codegen ignores do not require a bump.

How does the Gum tool detect a consumer project's syntax version?

SyntaxVersionDetectionService reads the consumer's .csproj: ProjectReference leads to regex-parsing the referenced runtime's AssemblyAttributes.cs, PackageReference reads the attribute from the NuGet cache DLL via MetadataLoadContext, and otherwise a manual SyntaxVersion override in the .codsj file is used.

Is the syntax version the same as the .gumx file format version?

No. The syntax version is an assembly-level integer on runtime DLLs that gates tool codegen, while .gumx file format versioning is a separate concern covered by the gum-project-versioning skill. GumCommon is stamped only for metadata consistency, not detection.

Why prefer instance methods over extension-method shims in GumCommon?

Instance methods need no using directive, avoid CS0121 ambiguity between identically-signed extensions, and eliminate Obsolete-attribute migration noise. A seam like IGumService.Default can dispatch the work, as done for AddToRoot and RemoveFromRoot at syntax version 3.