Skip to content

Fix token error handling in named type parameters - #324

Merged
git-hulk merged 1 commit into
masterfrom
codex/fix-named-type-token-errors
Sep 10, 2026
Merged

Fix token error handling in named type parameters#324
git-hulk merged 1 commit into
masterfrom
codex/fix-named-type-token-errors

Conversation

@git-hulk

@git-hulk git-hulk commented Sep 10, 2026

Copy link
Copy Markdown
Member

Problem

The named-type parameter parser still treats tryConsumeTokenKind as
returning only a token. After the helper gained an error return, this
caller prevents trunk from compiling.

Reproduction

go test ./...
parser/parser_column.go:1509:6: multiple-value p.tryConsumeTokenKind(TokenKindComma) (value of type (*Token, error)) in single-value context

Fix

Handle the returned error before checking whether a comma was consumed.
This PR changes only that caller in parseColumnTypeWithNamedParams.

Test

The existing named-type fixtures cover successful parsing. make test
(including race and compatibility tests), make lint, and make pass
with Go 1.21.13. Tests/lint use external linking on macOS.

parseColumnTypeWithNamedParams still uses tryConsumeTokenKind as a
single-value function after the helper changed to return a token and
an error. This prevents the merged trunk from compiling.

Handle the error before checking whether a comma was consumed, matching
the other callers. The existing named-type fixtures exercise parsing.
@git-hulk
git-hulk added this pull request to stack #325 September 10, 2026 09:34
@git-hulk
git-hulk marked this pull request as ready for review September 10, 2026 09:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T09:37:08.618684Z 49d542b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@git-hulk
git-hulk merged commit 05fda6a into master Sep 10, 2026
4 checks passed
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.

1 participant