Skip to content

Commit 50826b2

Browse files
erudenkoclaude
andcommitted
feat: gc export importer for ~1000x faster type resolution
- Add gc_export_importer.go: reads pre-compiled type data from Go build cache instead of parsing source, dramatically faster for large deps - Type resolver now tries gcexportdata first, falls back to source importer - Optional DINGO_PROFILE=1 env var for timing diagnostics - Value enum formatting cleanup Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8387797 commit 50826b2

8 files changed

Lines changed: 642 additions & 54 deletions

File tree

.claude/settings.json

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,8 @@
1212
}
1313
]
1414
},
15-
"extraKnownMarketplaces": {
16-
"claude-code-plugins": {
17-
"source": {
18-
"source": "github",
19-
"repo": "anthropics/claude-code"
20-
}
21-
},
22-
"mag-claude-plugins": {
23-
"source": {
24-
"source": "github",
25-
"repo": "MadAppGang/claude-code"
26-
}
27-
}
28-
},
2915
"enabledPlugins": {
30-
"orchestration@mag-claude-plugins": true,
31-
"code-analysis@mag-claude-plugins": true,
16+
"code-analysis@magus": true,
3217
"commit-commands@claude-code-plugins": false,
3318
"explanatory-output-style@claude-code-plugins": false,
3419
"feature-dev@claude-code-plugins": false,
@@ -39,20 +24,41 @@
3924
"code-review@claude-plugins-official": true,
4025
"explanatory-output-style@claude-plugins-official": true,
4126
"learning-output-style@claude-plugins-official": true,
42-
"seo@mag-claude-plugins": true,
43-
"dev@mag-claude-plugins": true,
44-
"ralph-loop@claude-plugins-official": true
27+
"seo@magus": true,
28+
"dev@magus": true,
29+
"ralph-loop@claude-plugins-official": true,
30+
"multimodel@magus": true,
31+
"browser-use@magus": true,
32+
"terminal@magus": true,
33+
"kanban@magus": true
34+
},
35+
"extraKnownMarketplaces": {
36+
"claude-code-plugins": {
37+
"source": {
38+
"source": "github",
39+
"repo": "anthropics/claude-code"
40+
}
41+
},
42+
"magus": {
43+
"source": {
44+
"source": "github",
45+
"repo": "MadAppGang/magus"
46+
}
47+
}
4548
},
4649
"installedPluginVersions": {
47-
"orchestration@mag-claude-plugins": "0.8.2",
48-
"code-analysis@mag-claude-plugins": "3.0.0",
50+
"code-analysis@magus": "5.0.1",
4951
"commit-commands@claude-plugins-official": "0.0.0",
5052
"feature-dev@claude-plugins-official": "0.0.0",
5153
"code-review@claude-plugins-official": "0.0.0",
5254
"explanatory-output-style@claude-plugins-official": "0.0.0",
5355
"learning-output-style@claude-plugins-official": "0.0.0",
54-
"seo@mag-claude-plugins": "1.5.1",
55-
"dev@mag-claude-plugins": "1.17.0",
56-
"ralph-loop@claude-plugins-official": "0.0.0"
56+
"seo@magus": "1.6.5",
57+
"dev@magus": "2.6.0",
58+
"ralph-loop@claude-plugins-official": "0.0.0",
59+
"multimodel@magus": "2.10.0",
60+
"browser-use@magus": "1.0.3",
61+
"terminal@magus": "4.0.0",
62+
"kanban@magus": "1.0.0"
5763
}
5864
}

CLAUDE.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,5 +426,17 @@ Local development path: `/Users/jack/mag/dingo.nvim`
426426
- Research: `ai-docs/claude-research.md`, `ai-docs/gemini_research.md`
427427
- Architecture: `ai-docs/dingo-vs-borgo.md`
428428

429+
## Learned Preferences
430+
431+
### Tools & Commands
432+
<!-- learned: 2026-03-28 session: 9f136fc8 source: repeated_pattern -->
433+
- Use `claudish` CLI for external model invocation and multi-model review sessions
434+
<!-- learned: 2026-03-28 session: 83851fd3 source: repeated_pattern -->
435+
- Use `CI=true` prefix when running Go tests to suppress interactive prompts
436+
437+
### Project Structure
438+
<!-- learned: 2026-03-28 session: 9f136fc8 source: explicit_rule -->
439+
- Session artifacts go in `ai-docs/sessions/{command}-{YYYYMMDD}-{HHMMSS}-{hash}/`
440+
429441
---
430-
**Last Updated**: 2026-01-07
442+
**Last Updated**: 2026-03-28

pkg/ast/enum.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,14 @@ func (e *EnumDecl) String() string {
186186
// - @prefix(false) enum contextKey: string { UserID = "user_id" }
187187
// - enum Status: int { Pending, Active, Closed }
188188
type ValueEnumDecl struct {
189-
Enum token.Pos // Position of 'enum' keyword
190-
Name *Ident // Enum name
191-
Colon token.Pos // Position of ':' (distinguisher from sum types)
192-
BaseType *TypeExpr // Base type (string, int, byte, etc.)
193-
LBrace token.Pos // Position of '{'
194-
Variants []*ValueEnumVariant // Enum values
195-
RBrace token.Pos // Position of '}'
196-
Attributes []*Attribute // @prefix(false), etc.
189+
Enum token.Pos // Position of 'enum' keyword
190+
Name *Ident // Enum name
191+
Colon token.Pos // Position of ':' (distinguisher from sum types)
192+
BaseType *TypeExpr // Base type (string, int, byte, etc.)
193+
LBrace token.Pos // Position of '{'
194+
Variants []*ValueEnumVariant // Enum values
195+
RBrace token.Pos // Position of '}'
196+
Attributes []*Attribute // @prefix(false), etc.
197197
}
198198

199199
// ValueEnumVariant represents one value in a value enum

pkg/ast/value_enum_codegen.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ func NewValueEnumCodeGen() *ValueEnumCodeGen {
3636
// const (
3737
// contextKeyUserID contextKey = "user_id"
3838
// )
39+
//
3940
// GenerateResult wraps the output with optional error
4041
type GenerateResult struct {
4142
Output []byte

pkg/ast/value_enum_test.go

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func TestValueEnumCodeGen(t *testing.T) {
159159
contains: []string{
160160
"type Status int",
161161
"StatusPending Status = iota",
162-
"\tStatusActive\n", // No type on subsequent iota lines
162+
"\tStatusActive\n", // No type on subsequent iota lines
163163
"\tStatusClosed\n",
164164
"const (",
165165
},
@@ -219,7 +219,7 @@ func TestValueEnumCodeGen(t *testing.T) {
219219
func TestValueEnumWithPrefix(t *testing.T) {
220220
// Test @prefix(false) attribute
221221
decl := &ValueEnumDecl{
222-
Name: &Ident{Name: "Status"},
222+
Name: &Ident{Name: "Status"},
223223
BaseType: &TypeExpr{Text: "int"},
224224
Variants: []*ValueEnumVariant{
225225
{Name: &Ident{Name: "Pending"}},
@@ -307,7 +307,7 @@ func TestTransformValueEnumSource(t *testing.T) {
307307
contains: []string{
308308
"type Status int",
309309
"StatusPending Status = iota",
310-
"\tStatusActive\n", // Second line should just be the name
310+
"\tStatusActive\n", // Second line should just be the name
311311
},
312312
},
313313
{
@@ -331,7 +331,7 @@ func TestTransformValueEnumSource(t *testing.T) {
331331
src: "package main\n\nenum Status: int { Active }\nenum Result { Ok(T) }\n",
332332
contains: []string{
333333
"type Status int",
334-
"StatusActive Status = iota", // Single variant still gets full declaration
334+
"StatusActive Status = iota", // Single variant still gets full declaration
335335
"type Result interface",
336336
},
337337
},
@@ -665,7 +665,7 @@ func TestTransformWithPrefixAttribute(t *testing.T) {
665665
"\tStatusActive\n",
666666
},
667667
notContain: []string{
668-
"\tPending Status", // Should NOT have unprefixed
668+
"\tPending Status", // Should NOT have unprefixed
669669
},
670670
},
671671
{
@@ -746,33 +746,33 @@ func TestTransformWithPrefixAttribute(t *testing.T) {
746746

747747
func TestFindAttributeStart(t *testing.T) {
748748
tests := []struct {
749-
name string
750-
src string
751-
enumStart int
749+
name string
750+
src string
751+
enumStart int
752752
expectDeclStart int
753753
}{
754754
{
755-
name: "no attribute",
756-
src: "enum Status: int { }",
757-
enumStart: 0,
755+
name: "no attribute",
756+
src: "enum Status: int { }",
757+
enumStart: 0,
758758
expectDeclStart: 0,
759759
},
760760
{
761-
name: "attribute on same line",
762-
src: "@prefix(false) enum Status: int { }",
763-
enumStart: 15,
761+
name: "attribute on same line",
762+
src: "@prefix(false) enum Status: int { }",
763+
enumStart: 15,
764764
expectDeclStart: 0,
765765
},
766766
{
767-
name: "attribute on previous line",
768-
src: "@prefix(false)\nenum Status: int { }",
769-
enumStart: 15,
767+
name: "attribute on previous line",
768+
src: "@prefix(false)\nenum Status: int { }",
769+
enumStart: 15,
770770
expectDeclStart: 0,
771771
},
772772
{
773-
name: "attribute with spaces",
774-
src: "@prefix(false) enum Status: int { }",
775-
enumStart: 16,
773+
name: "attribute with spaces",
774+
src: "@prefix(false) enum Status: int { }",
775+
enumStart: 16,
776776
expectDeclStart: 0,
777777
},
778778
}

0 commit comments

Comments
 (0)