Skip to content

fix: stabilize v0.14 compiler and CI gates#66

Merged
erudenko merged 4 commits into
mainfrom
fix/v0.14.1-stabilization
Jul 12, 2026
Merged

fix: stabilize v0.14 compiler and CI gates#66
erudenko merged 4 commits into
mainfrom
fix/v0.14.1-stabilization

Conversation

@erudenko

Copy link
Copy Markdown
Member

Summary

Stabilizes the v0.14 line and restores the full CI path.

PR #62 is intentionally deferred because it adds a new plugin validation lifecycle and belongs in a feature release rather than this stabilization patch.

Verification

  • go test ./...
  • CI race/coverage command
  • golden and compilation tests
  • golangci-lint v2.6: 0 issues
  • all 18 Dingo examples transpile and build
  • VS Code extension compiles and packages
  • --no-mascot verified in a real PTY

bbodi and others added 4 commits July 12, 2026 18:22
…notations

The token-walking transformer in `TransformSource` only entered the
parameter-list context when it saw `func name(` or `func(`. For methods
with a receiver, e.g. `func (r *T) Foo(x: int)`, the second `(` is
preceded by `IDENT RPAREN`, which the previous logic treated as an
arbitrary parenthesised expression. As a result the `:` in `x: int` was
never converted into a space and the generated Go was invalid.

Detect the receiver form by walking backwards from the param list `(`
through a matching `RPAREN ... LPAREN` group with depth tracking, then
checking that `FUNC` sits immediately before the receiver's `(`. The
walk bails on `;`, `{` or `}` so unrelated parenthesised expressions
preceding a function call are not misclassified.

Added `pkg/ast/transform_test.go` with four cases (pointer receiver,
value receiver + multiple params, body struct literal colons preserved,
generic receiver type). Each parses the transformer output with
`go/parser` so the assertion is exactly the property we care about:
valid Go on the way out. Without this fix all four cases fail because
the surviving `:` makes go/parser reject the param list.
Add ENUM and GUARD to two complementary tokenizer tests:

- `TestTokenIsKeyword` checks the `IsKeyword()` predicate that classifies
  a `TokenKind` once it already exists.
- `TestTokenizeIdentifiers` drives the full scanner over a source buffer
  and asserts the resulting `TokenKind` values, so it covers the
  keyword-lookup map that maps identifier text -> kind.

These surfaces are independent: removing `"enum"`/`"guard"` from the
keyword map in `tokenizer.go` only breaks `TestTokenizeIdentifiers`,
because `IsKeyword()` works on the `TokenKind` itself. Covering both
catches regressions in either direction.
…ant field types

The enum parser's parseTypeExpr accepted any number of '*' prefixes, but only
a single trailing '[]', and only in the order `<pointers><slice><name>`. Field
declarations such as `[]*Foo`, `[][]Foo`, or `[][]*Foo` therefore tripped the
parser, which surfaced downstream as a confusing
"parse error: ... expected declaration, found enum" message at the enum's
opening line.

Replace the two ad-hoc loops with a single loop that consumes '*' and '[]'
tokens in any order and any count, matching what the rest of the pipeline
already accepts for ordinary field types.

Tests cover plain, pointer (*T, **T), slice ([]T, [][]T), mixed (*[]T, []*T,
[][]*T), generic slice ([]int) prefixes for both struct-style and tuple-style
variants, plus end-to-end regressions through TransformSource for the
previously failing `[]*Name` and multi-line variant bodies.
- recover lambda types across dgo call chains and range variables
- preserve grouped var composite literals during tuple scanning
- honor --no-mascot for interactive transpile commands
- wrap unresolved MustErr returns with the enclosing Result type
- clear staticcheck failures and add regression coverage
@github-actions

Copy link
Copy Markdown

📊 Performance Benchmark Report

Performance Benchmark Report

Analyzed 190 benchmark(s)

Benchmark ns/op allocs/op bytes/op
BenchmarkTupleCodeGen_SimpleLiteral 167.30 2 80
BenchmarkTupleCodeGen_SimpleLiteral 160.40 2 80
BenchmarkTupleCodeGen_SimpleLiteral 159.30 2 80
BenchmarkTupleCodeGen_SimpleLiteral 158.80 2 80
BenchmarkTupleCodeGen_SimpleLiteral 159.10 2 80
BenchmarkTupleCodeGen_ComplexDestructure 738.80 14 304
BenchmarkTupleCodeGen_ComplexDestructure 738.70 14 304
BenchmarkTupleCodeGen_ComplexDestructure 797.40 14 304
BenchmarkTupleCodeGen_ComplexDestructure 743.90 14 304
BenchmarkTupleCodeGen_ComplexDestructure 737.10 14 304
BenchmarkMapToDingo 76.09 1 64
BenchmarkMapToDingo 73.03 1 48
BenchmarkMapToDingo 79.35 1 64
BenchmarkMapToDingo 77.73 1 64
BenchmarkMapToDingo 76.11 1 64
BenchmarkParseSingleExpression/simple_ident 3233.00 51 5123
BenchmarkParseSingleExpression/simple_ident 3093.00 51 5123
BenchmarkParseSingleExpression/simple_ident 3060.00 51 5123
BenchmarkParseSingleExpression/simple_ident 3065.00 51 5123
BenchmarkParseSingleExpression/simple_ident 3096.00 51 5123
BenchmarkParseSingleExpression/binary_add 5482.00 65 8320
BenchmarkParseSingleExpression/binary_add 5444.00 65 8320
BenchmarkParseSingleExpression/binary_add 5459.00 65 8320
BenchmarkParseSingleExpression/binary_add 5441.00 65 8320
BenchmarkParseSingleExpression/binary_add 5415.00 65 8320
BenchmarkParseSingleExpression/binary_chain 12534.00 109 18744
BenchmarkParseSingleExpression/binary_chain 12442.00 109 18744
BenchmarkParseSingleExpression/binary_chain 12645.00 109 18744
BenchmarkParseSingleExpression/binary_chain 12595.00 109 18744
BenchmarkParseSingleExpression/binary_chain 12525.00 109 18744
BenchmarkParseSingleExpression/error_prop 6716.00 79 9160
BenchmarkParseSingleExpression/error_prop 6714.00 79 9160
BenchmarkParseSingleExpression/error_prop 6619.00 79 9160
BenchmarkParseSingleExpression/error_prop 6620.00 79 9160
BenchmarkParseSingleExpression/error_prop 6625.00 79 9160
BenchmarkParseSingleExpression/error_context 6889.00 82 9192
BenchmarkParseSingleExpression/error_context 7028.00 82 9192
BenchmarkParseSingleExpression/error_context 6933.00 82 9192
BenchmarkParseSingleExpression/error_context 6915.00 82 9192
BenchmarkParseSingleExpression/error_context 6932.00 82 9192
BenchmarkParseSingleExpression/error_lambda_rust 14367.00 127 20232
BenchmarkParseSingleExpression/error_lambda_rust 14271.00 127 20232
BenchmarkParseSingleExpression/error_lambda_rust 14228.00 127 20232
BenchmarkParseSingleExpression/error_lambda_rust 14245.00 127 20232
BenchmarkParseSingleExpression/error_lambda_rust 14303.00 127 20232
BenchmarkParseSingleExpression/error_lambda_ts 14845.00 131 20688
BenchmarkParseSingleExpression/error_lambda_ts 15022.00 131 20688
BenchmarkParseSingleExpression/error_lambda_ts 14954.00 131 20688
BenchmarkParseSingleExpression/error_lambda_ts 15003.00 131 20688
BenchmarkParseSingleExpression/error_lambda_ts 15045.00 131 20688
BenchmarkParseSingleExpression/error_lambda_ts_single 12888.00 114 18496
BenchmarkParseSingleExpression/error_lambda_ts_single 12804.00 114 18496
BenchmarkParseSingleExpression/error_lambda_ts_single 12761.00 114 18496
BenchmarkParseSingleExpression/error_lambda_ts_single 12732.00 114 18496
BenchmarkParseSingleExpression/error_lambda_ts_single 12872.00 114 18496
BenchmarkParseSingleExpression/ternary 8031.00 80 11816
BenchmarkParseSingleExpression/ternary 7951.00 80 11816
BenchmarkParseSingleExpression/ternary 7874.00 80 11816
BenchmarkParseSingleExpression/ternary 7949.00 80 11816
BenchmarkParseSingleExpression/ternary 7855.00 80 11816
BenchmarkParseSingleExpression/nested_ternary 12076.00 103 18816
BenchmarkParseSingleExpression/nested_ternary 12281.00 103 18816
BenchmarkParseSingleExpression/nested_ternary 12238.00 103 18816
BenchmarkParseSingleExpression/nested_ternary 12351.00 103 18816
BenchmarkParseSingleExpression/nested_ternary 12280.00 103 18816
BenchmarkParseSingleExpression/safe_nav 6625.00 73 10504
BenchmarkParseSingleExpression/safe_nav 6629.00 73 10504
BenchmarkParseSingleExpression/safe_nav 6607.00 73 10504
BenchmarkParseSingleExpression/safe_nav 6636.00 73 10504
BenchmarkParseSingleExpression/safe_nav 6662.00 73 10504
BenchmarkParseSingleExpression/null_coal 5237.00 61 7713
BenchmarkParseSingleExpression/null_coal 5226.00 61 7713
BenchmarkParseSingleExpression/null_coal 5289.00 61 7713
BenchmarkParseSingleExpression/null_coal 5237.00 61 7713
BenchmarkParseSingleExpression/null_coal 5221.00 61 7713
BenchmarkParseSingleExpression/match_simple 18648.00 150 26880
BenchmarkParseSingleExpression/match_simple 18610.00 150 26880
BenchmarkParseSingleExpression/match_simple 18575.00 150 26880
BenchmarkParseSingleExpression/match_simple 18635.00 150 26880
BenchmarkParseSingleExpression/match_simple 18599.00 150 26880
BenchmarkParseSingleExpression/lambda_rust 11048.00 100 16920
BenchmarkParseSingleExpression/lambda_rust 11013.00 100 16920
BenchmarkParseSingleExpression/lambda_rust 11133.00 100 16920
BenchmarkParseSingleExpression/lambda_rust 11038.00 100 16920
BenchmarkParseSingleExpression/lambda_rust 11095.00 100 16920
BenchmarkParseSingleExpression/lambda_ts 11535.00 104 17376
BenchmarkParseSingleExpression/lambda_ts 11745.00 104 17376
BenchmarkParseSingleExpression/lambda_ts 11549.00 104 17376
BenchmarkParseSingleExpression/lambda_ts 11698.00 104 17376
BenchmarkParseSingleExpression/lambda_ts 11522.00 104 17376
BenchmarkParseSingleExpression/complex_chain 11707.00 108 15939
BenchmarkParseSingleExpression/complex_chain 11524.00 108 15939
BenchmarkParseSingleExpression/complex_chain 11705.00 108 15939
BenchmarkParseSingleExpression/complex_chain 11649.00 108 15939
BenchmarkParseSingleExpression/complex_chain 11718.00 108 15939
BenchmarkLookahead/isTypeScriptLambda_positive 10914.00 97 17064
BenchmarkLookahead/isTypeScriptLambda_positive 10972.00 97 17064
BenchmarkLookahead/isTypeScriptLambda_positive 10920.00 97 17064
BenchmarkLookahead/isTypeScriptLambda_positive 10951.00 97 17064
BenchmarkLookahead/isTypeScriptLambda_positive 11345.00 97 17064
BenchmarkLookahead/isTypeScriptLambda_negative 7313.00 77 10836
BenchmarkLookahead/isTypeScriptLambda_negative 7227.00 77 10836
BenchmarkLookahead/isTypeScriptLambda_negative 7271.00 77 10836
BenchmarkLookahead/isTypeScriptLambda_negative 7265.00 77 10836
BenchmarkLookahead/isTypeScriptLambda_negative 7307.00 77 10836
BenchmarkLookahead/classifyQuestion_ternary 5414.00 63 8248
BenchmarkLookahead/classifyQuestion_ternary 5358.00 63 8248
BenchmarkLookahead/classifyQuestion_ternary 5373.00 63 8248
BenchmarkLookahead/classifyQuestion_ternary 5408.00 63 8248
BenchmarkLookahead/classifyQuestion_ternary 5313.00 63 8248
BenchmarkLookahead/classifyQuestion_postfix 2942.00 53 4340
BenchmarkLookahead/classifyQuestion_postfix 2964.00 53 4340
BenchmarkLookahead/classifyQuestion_postfix 2960.00 53 4340
BenchmarkLookahead/classifyQuestion_postfix 2931.00 53 4340
BenchmarkLookahead/classifyQuestion_postfix 2914.00 53 4340
BenchmarkLookahead/classifyQuestion_context 2203.00 47 3280
BenchmarkLookahead/classifyQuestion_context 2186.00 47 3280
BenchmarkLookahead/classifyQuestion_context 2183.00 47 3280
BenchmarkLookahead/classifyQuestion_context 2213.00 47 3280
BenchmarkLookahead/classifyQuestion_context 2191.00 47 3280
BenchmarkLookahead/hasTernaryColon_found 5356.00 63 8248
BenchmarkLookahead/hasTernaryColon_found 5329.00 63 8248
BenchmarkLookahead/hasTernaryColon_found 5361.00 63 8248
BenchmarkLookahead/hasTernaryColon_found 5289.00 63 8248
BenchmarkLookahead/hasTernaryColon_found 5330.00 63 8248
BenchmarkLookahead/hasTernaryColon_nested 11779.00 102 17696
BenchmarkLookahead/hasTernaryColon_nested 11707.00 102 17696
BenchmarkLookahead/hasTernaryColon_nested 11551.00 102 17696
BenchmarkLookahead/hasTernaryColon_nested 11689.00 102 17696
BenchmarkLookahead/hasTernaryColon_nested 11670.00 102 17696
BenchmarkMatchExpression 49015.00 354 71144
BenchmarkMatchExpression 49420.00 354 71144
BenchmarkMatchExpression 49624.00 354 71144
BenchmarkMatchExpression 49610.00 354 71144
BenchmarkMatchExpression 50545.00 354 71144
BenchmarkLargeFile 831444.00 0 0
BenchmarkLargeFile 827806.00 0 0
BenchmarkLargeFile 835691.00 0 0
BenchmarkLargeFile 832611.00 0 0
BenchmarkLargeFile 831627.00 0 0
BenchmarkParserCreation 3053.00 50 5099
BenchmarkParserCreation 3054.00 50 5099
BenchmarkParserCreation 3062.00 50 5099
BenchmarkParserCreation 3037.00 50 5099
BenchmarkParserCreation 3038.00 50 5099
BenchmarkStateOperations 44.01 0 0
BenchmarkStateOperations 44.03 0 0
BenchmarkStateOperations 44.07 0 0
BenchmarkStateOperations 44.09 0 0
BenchmarkStateOperations 44.06 0 0
BenchmarkComplexExpression 28226.00 206 41266
BenchmarkComplexExpression 27966.00 206 41266
BenchmarkComplexExpression 29218.00 206 41266
BenchmarkComplexExpression 27957.00 206 41266
BenchmarkComplexExpression 28219.00 206 41266
BenchmarkIsAddressable_Identifier 2.48 0 0
BenchmarkIsAddressable_Identifier 2.47 0 0
BenchmarkIsAddressable_Identifier 2.46 0 0
BenchmarkIsAddressable_Identifier 2.46 0 0
BenchmarkIsAddressable_Identifier 2.47 0 0
BenchmarkIsAddressable_Literal 2.83 0 0
BenchmarkIsAddressable_Literal 2.82 0 0
BenchmarkIsAddressable_Literal 2.52 0 0
BenchmarkIsAddressable_Literal 2.82 0 0
BenchmarkIsAddressable_Literal 2.83 0 0
BenchmarkWrapInIIFE 518.00 19 656
BenchmarkWrapInIIFE 503.70 19 656
BenchmarkWrapInIIFE 486.60 19 656
BenchmarkWrapInIIFE 487.60 19 656
BenchmarkWrapInIIFE 475.60 19 656
BenchmarkMaybeWrapForAddressability_NoWrap 27.77 1 32
BenchmarkMaybeWrapForAddressability_NoWrap 28.56 1 32
BenchmarkMaybeWrapForAddressability_NoWrap 28.32 1 32
BenchmarkMaybeWrapForAddressability_NoWrap 28.11 1 32
BenchmarkMaybeWrapForAddressability_NoWrap 28.13 1 32
BenchmarkMaybeWrapForAddressability_Wrap 489.80 19 656
BenchmarkMaybeWrapForAddressability_Wrap 487.80 19 656
BenchmarkMaybeWrapForAddressability_Wrap 488.70 19 656
BenchmarkMaybeWrapForAddressability_Wrap 488.20 19 656
BenchmarkMaybeWrapForAddressability_Wrap 481.40 19 656
BenchmarkExtractImports 3112.00 55 2528
BenchmarkExtractImports 3090.00 55 2528
BenchmarkExtractImports 3094.00 55 2528
BenchmarkExtractImports 3074.00 55 2528
BenchmarkExtractImports 3082.00 55 2528
BenchmarkExtractImportsRegex 16512.00 120 12904
BenchmarkExtractImportsRegex 16576.00 120 12905
BenchmarkExtractImportsRegex 16681.00 120 12905
BenchmarkExtractImportsRegex 16582.00 120 12911
BenchmarkExtractImportsRegex 16593.00 120 12906

@erudenko
erudenko merged commit 1764dba into main Jul 12, 2026
12 checks passed
@erudenko
erudenko deleted the fix/v0.14.1-stabilization branch July 12, 2026 08:29
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.

BUG: --no-mascot doesn't work from TTY BUG: var() group fails to parse with composite literal

2 participants