Skip to content

Add option for ExportCSVConfig to target txn outputs#262

Draft
davidwzhao wants to merge 5 commits into
mainfrom
dz-export-output-2
Draft

Add option for ExportCSVConfig to target txn outputs#262
davidwzhao wants to merge 5 commits into
mainfrom
dz-export-output-2

Conversation

@davidwzhao

Copy link
Copy Markdown
Contributor

No description provided.

davidwzhao and others added 5 commits June 23, 2026 11:36
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
builtin.tuple is registered as variadic (arity -1), so make_builtin
gives it an empty param list and the generic type-variable matching
can't resolve the return type T. Add a special case that infers
TupleType directly from the argument types, matching what _infer_type
already does in the parser.

Without this, IfElse nodes wrapping tuple constructs were typed as
interface{} in Go, causing a compile error when the function's declared
return type is []interface{}.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…xportCSVConfig

ExportCSVColumns had no custom == so structural comparison fell back to identity,
breaking ExportCSVSource comparisons. Add equality for ExportCSVColumns first,
then ExportCSVSource, then wire csv_source, csv_config, and the new
transaction_output_name field into ExportCSVConfig ==, hash, and isequal.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@comnik comnik self-requested a review June 23, 2026 08:59
Comment thread meta/src/meta/target.py
Comment on lines +348 to +350
# builtin.tuple is variadic; infer TupleType from the argument types directly.
if isinstance(self.func, Builtin) and self.func.name == "tuple":
return TupleType(tuple(a.target_type() for a in self.args))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this needed? 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new grammar rule i think is the first use of tuples as return values in the grammar, and this exposed a bug in the parser generator. I'm not super sure on the details, but Claude found the problem and this was its fix. It was causing errors before, and works properly now

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.

2 participants