Skip to content

chore(deps): upgrade Tomlyn 0.19.0 -> 2.10.1#90

Merged
ShortArrow merged 1 commit into
mainfrom
chore/tomlyn-2
Jul 22, 2026
Merged

chore(deps): upgrade Tomlyn 0.19.0 -> 2.10.1#90
ShortArrow merged 1 commit into
mainfrom
chore/tomlyn-2

Conversation

@ShortArrow

Copy link
Copy Markdown
Owner

Picks up the Tomlyn major upgrade that Dependabot could not land (its build failed against the v2 API).

Why it broke

Tomlyn v1/v2 is a major redesign — a System.Text.Json-style API (TomlSerializer, source generation, TOML 1.1). The static Toml entry point (Toml.ToModel / Toml.FromModel) is gone.

What

Migrate the four untyped-model call sites — config, scenario, api-token, and plugin-manifest parsers:

  • Toml.ToModel(s)TomlSerializer.Deserialize<TomlTable>(s) ?? new TomlTable()
  • Toml.FromModel(m)TomlSerializer.Serialize(m)

TomlTable / TomlTableArray (Tomlyn.Model) and TomlException are unchanged, so model access and syntax-error handling stay as-is.

Verification

  • Full suite green (12 projects), including the 11 invalid-syntax parser tests that exercise the TomlException catch path.
  • Real-binary visa addvisa list config round-trip works (write + read through Tomlyn v2).
  • --locked-mode restore passes; lock files refreshed; CSharpier clean.

TOML 1.1 (v2) is a superset of the 1.0 features these documents use, so no config/scenario changes are needed. Version bump + CHANGELOG will be aggregated in the next release PR.

Tomlyn v1/v2 is a major redesign with a System.Text.Json-style API; the static
`Toml` entry point is gone. Migrate the untyped-model call sites (config,
scenario, api-token, and plugin-manifest parsers):

- `Toml.ToModel(s)`   -> `TomlSerializer.Deserialize<TomlTable>(s) ?? new TomlTable()`
- `Toml.FromModel(m)` -> `TomlSerializer.Serialize(m)`

`TomlTable` / `TomlTableArray` (Tomlyn.Model) and `TomlException` are unchanged,
so the model access and syntax-error handling stay as-is. Tomlyn v2 targets
TOML 1.1; our config/scenario/token documents round-trip unchanged. Verified by
the full suite (incl. 11 invalid-syntax tests) and a real-binary config
add/list round-trip. Lock files refreshed.
@ShortArrow
ShortArrow merged commit 6d73042 into main Jul 22, 2026
7 checks passed
@ShortArrow
ShortArrow deleted the chore/tomlyn-2 branch July 22, 2026 06:45
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