2026.05.15

  • ~literalizer.literalize now accepts an opt-in bound_refs mapping. Unlike ref_values (which only informs a ref’s type and leaves it as a free external identifier), each name in bound_refs additionally has a binding emitted for it before its first use, so a single literalize(..., bound_refs=..., wrap_in_file=True) call produces a complete, valid file with per-language declaration sequencing (Nix nested let, the Fortran rule that specification statements precede executable statements, and so on). Binding emission only happens with wrap_in_file=True and a ~literalizer.NewVariable or ~literalizer.ExistingVariable variable_form; otherwise bound_refs degrades to type information only, exactly like ref_values. The default behavior is unchanged. Without bound_refs, a $ref is a free external identifier. The ref golden-file harness now drives every case through one literalize call, retiring its regex-based stub-stitching helpers. See #2294.

  • ~literalizer.Go gains the RECORD heterogeneous_strategy (already on ~literalizer.Rust). Each record-shaped dict (non-empty, string-keyed) becomes a generated type RecordN struct { ... } declared in the preamble plus a matching RecordN{Field: value, ...} literal, so a dict whose values mix scalars and containers is representable instead of raising. Field names are exported (PascalCase) and the struct-name prefix is configurable via the new record_struct_name_prefix constructor parameter. See #2297.

  • ~literalizer.Scala gains the RECORD heterogeneous_strategy (already on ~literalizer.Rust and ~literalizer.Go). Each record-shaped dict (non-empty, string-keyed) becomes a generated case class RecordN(field: Type, ...) declared in the enclosing object plus a matching RecordN(field = value, ...) literal, so a dict whose values mix scalars and containers is representable instead of raising. Field names are the dict keys verbatim and the case class-name prefix is configurable via the new record_struct_name_prefix constructor parameter. See #2299.

  • ~literalizer.Rust accepts a record_shape_names constructor parameter, a mapping from each record’s key-set (frozenset [str]) to a user-chosen struct name, so the RECORD heterogeneous strategy can emit struct Entry { ... } instead of the auto-generated Record0, Record1, … names. Shape names that are not PascalCase Rust identifiers, that collide with heterogeneous_value_enum_name, that duplicate another mapped name, or that match a Rust reserved keyword raise the new ~literalizer.exceptions.InvalidRecordNameError. The existing record_struct_name_prefix is validated the same way. See #2236.

  • ~literalizer.Fortran now offers VersionFormats.V2003 alongside VersionFormats.V2008 (the default). The 2003 target defines the int64 kind via selected_int_kind(18) instead of importing it from the intrinsic iso_fortran_env module (whose int64 constant is a Fortran 2008 addition), so generated code is otherwise identical and the _int64 literal suffix is unchanged. The golden harness emits a parallel @v2003 / @v2008 fixture set and CI lints each with the matching gfortran -std=f2003 / -std=f2008 flag. See #1931.

  • The integration golden-file harness now accepts input.toml next to the existing input.yaml for cases whose input contains a value YAML 1.2 cannot natively express (currently datetime.time). New time_list, time_dict, and times_heterogeneous_with_dates golden cases give every supported language end-to-end coverage of datetime.time rendering, which surfaced and fixed several preexisting bugs in time emission: tagged-union languages (~literalizer.Elm, ~literalizer.OCaml, ~literalizer.Roc, ~literalizer.Gleam, ~literalizer.Haskell, ~literalizer.Zig, ~literalizer.Sml, ~literalizer.Ada, ~literalizer.Fortran, ~literalizer.ObjectiveC) now wrap a fallback ISO 8601 time inside the value-type constructor the same way they wrap other scalars; collection type inference (C++, C#, Java, Kotlin, Scala, Dart, Go, Visual Basic, and others) now knows about datetime.time and narrows homogeneous collections to the correct element type; and ~literalizer.FSharp fully qualifies System.TimeOnly so the rendered output no longer emits an open System line before module. See #2230.

  • ~literalizer.Haskell now accepts variable_form on ~literalizer.literalize_call, emitting the inference-style binding my_data = make_widget (42) without a name :: Type annotation (the call’s return type is not known to the renderer). wrap_in_file=True Haskell scaffolds emit a {-# OPTIONS_GHC -Wno-missing-signatures #-} pragma so the inferred binding compiles under -Wall -Werror. See #2244.

  • datetime.time is now a first-class Scalar value. Languages with a native time-only type emit native literals (Python datetime.time(...), TOML unquoted HH:MM:SS, .NET new TimeOnly(...) / TimeOnly(...) / New TimeOnly(...) for ~literalizer.CSharp, ~literalizer.FSharp, ~literalizer.VisualBasic, and LocalTime.of(...) for ~literalizer.Java, ~literalizer.Kotlin, ~literalizer.Scala, ~literalizer.Groovy); other languages fall back to the existing ISO 8601 quoted-string form. TOML time inputs now round-trip through ~literalizer.Toml as native time literals instead of being re-emitted as quoted ISO 8601 strings. Typed collection openers in languages such as ~literalizer.CSharp, ~literalizer.Java, ~literalizer.Kotlin, and ~literalizer.Scala now narrow uniform time-only sequences to the language’s time type (e.g. TimeOnly[] / Array<LocalTime>) instead of falling back to a generic Object/Any opener.

  • Golden files for languages whose compiler version is pinned (Elixir, Erlang, Gleam, Kotlin, Odin, Zig) now carry the version in the filename: {stem}@{version}{extension} (e.g. Odin@dev-2026-04.odin). Every fixture is explicitly tied to the compiler version it was generated against. Each lint.yml job sets a job-scoped environment variable once and feeds it to both the install action and python -m tests.integration.list_fixtures; the test code auto-discovers the same version from sibling filenames so no separate registry file is needed.

  • ~literalizer.Fortran’s language_version default is now Fortran.VersionFormats.V2008 (was V2003) so it matches the Fortran 2008 features the generator actually emits (e.g. int64 from iso_fortran_env). V2003 has been removed from Fortran.VersionFormats.

  • lint-fast CI job now syntax-checks and runs the Python fixtures under tests/integration/cases, matching the per-language gate already in place for Bash, Ruby, JavaScript, and other fixture languages. See #1921.

  • lint-odin CI job now uses odin run . again to catch runtime errors that odin build . cannot detect (e.g. nil-proc calls). The laytan/setup-odin action is pinned to dev-2026-04, the last Odin release where odin run . did not segfault on these fixtures; release: latest (dev-2026-05) crashes at runtime, and the compiler itself segfaults on some fixtures under odin build .. See #1745.