2026.04.24.1¶
Gleamnow emits apub type GValdeclaration containing only the constructors actually needed for the data, rather than always emitting all eight variants. Scalar-only inputs (e.g.GInt(42)) now produce a one-constructor type, bringing Gleam in line with Elm and Haskell.lint-luain.github/workflows/lint.ymlnow runs each Lua fixture end-to-end vialua, catching runtime errors (calls to undefined functions, missing module imports, failed assertions) that the existingluac -pparse-only step let through, mirroringlint-bash/lint-javascript/lint-perletc.literalize_call(..., wrap_in_file=True)now injects a no-op stub for thetarget_functioninto the wrapped file, so the generated source compiles against strict checkers on its own. Callers that supply acall_transformare still responsible for providing a definition for the wrapper function the transform introduces.Added
literalize_callsupport forBash. A newCommandCallStyletagged-union member renders calls astarget arg1 arg2with space-separated arguments and no surrounding parentheses; with acall_transformlikelambda c: f"emit({c})"the inner call is wrapped in$(...)command substitution (emit "$(target arg1 arg2)"). Bash’sformat_call_stubemitsname() { :; }function stubs that accept any arguments so generated files parse withbash -nand run underbash. A newCallArgNotSupportedErroris raised at literalize time when a list, dict, or set is passed as a Bash call argument: Bash has no inline compound-literal syntax in command invocations, so silently emittingcmd (1 2 3)(which parses as a nested(...)child-process group) would leave users with a broken script; callers must declare the collection as a variable and pass a$refmarker instead.literalize_callgains aref_casekeyword argument that converts{"$ref": "name"}identifiers to the target language’s idiomatic case at render time viapyhumps. PassIdentifierCase.SNAKE,CAMEL,PASCAL,UPPER_SNAKE, orKEBABto drive one YAML source through multiple languages without re-authoring the ref names (e.g. the sameuser_objref renders asuser_objfor Python,userObjfor JavaScript,UserObjfor Go). Each language exposes the subset it understands via itsidentifier_casestuple; passing an unsupported case raisesUnsupportedIdentifierCaseError. Whenref_case=None(the default) ref names are emitted verbatim, preserving existing behavior.Mojonow supports an opt-inHeterogeneousStrategies.VARIANTthat wraps mixed scalars in an auto-generatedcomptime Value = Variant[...]over only the Mojo types actually present in the data, with afrom std.utils.variant import Variantpreamble line. Each wrapped scalar renders asValue(...)(with an explicitString(...)orFloat64(...)cast when needed to select the intended Variant alternative, andNoneType()for nulls), so heterogeneous dicts and lists become homogeneous in the Variant type. The alias name is configurable viaMojo.heterogeneous_value_variant_name(default"Value"). The defaultERRORstrategy still raises on heterogeneous input.Cgenerated output now routes positive integers aboveLLONG_MAX(e.g.2**63) through a newunsigned long longunion field instead of narrowing them into the signedlong longfield. TheCValunion gains aumember alongsidei, and a newuint_fieldconstructor argument lets users rename it. clang-tidy’sbugprone-narrowing-conversionsandcppcoreguidelines-narrowing-conversionschecks, previously suppressed in.clang-tidybecause the union-initializer literal silently truncated those values, are now enforced for bothCandCppoutput.Cppgenerated output now wraps theINFINITYandNAN<cmath>macros instatic_cast<double>(with the negation applied outside the cast for-INFINITY) so that brace-init ofstd::vector<double>does not trip clang-tidy’s narrowing-conversions check on the implicitfloat-to-doubleconversion.Erlangnow supportsliteralize_call. Calls use positional argument syntax (f(A, B)); dotted targets likeapp.client.fetchare emitted as quoted-atom function names ('app.client.fetch'(...)) since Erlang atoms do not allow unquoted dots. Call stubs are emitted as module-level function definitions placed between-exportandx(), andx()separates call statements with,terminated by..Added
literalize_callsupport for Gleam:Gleam.format_call_preamble_stubemits module-levelpub fndeclarations with fresh type variables per parameter and apanicbody, andGleam.format_call_targetflattens dotted targets (e.g.app.client.fetch) to underscored identifiers (app_client_fetch) because Gleam identifiers cannot contain..Gleam.CallStyles.POSITIONALrenders calls asfunc(arg1, arg2).ObjectiveCcall stubs now emitk-prefixed, title-cased root names for thestatic const structglobals that back dotted call targets, so a user-writtenthrottler.check(...)is rendered askThrottler.check(...)(andapp.client.fetchtokApp.client.fetch). clang-tidy’sgoogle-objc-global-variable-declarationcheck, previously suppressed in.clang-tidybecause the bare root names did not conform, is now enforced.