Skip to content

Split interp/runner.go into focused modules#4

Merged
AlexandreYang merged 2 commits intomainfrom
dd/split-interp-runner
Mar 9, 2026
Merged

Split interp/runner.go into focused modules#4
AlexandreYang merged 2 commits intomainfrom
dd/split-interp-runner

Conversation

@AlexandreYang
Copy link
Copy Markdown
Member

Summary

Splits the monolithic interp/runner.go into three focused files to reduce cognitive load and improve navigability.

Changes

  • runner_expand.go — expansion config, error handling, expandEnv type (fillExpandConfig, updateExpandOpts, expandErr, fields, literal, document)
  • runner_redir.go — redirect and heredoc logic (redir, hdocReader, isQuotedHdoc, hdocLiteral, hdocLiteralPart)
  • runner_exec.go — statement execution, command dispatch, loops, builtins/external call (stmt, stmtSync, cmd, stmts, loopStmtsBroken, call, exec)
  • runner.go — trimmed to shared utilities only (handlerCtx, errf, stop, open, todoPos)

No logic changes — pure code reorganization.

Testing

  • go build ./interp/... passes
  • go test ./interp/... passes
  • go vet ./interp/... clean
  • gofmt clean

PR by Bits
View session in Datadog

Comment @DataDog to request changes

Co-authored-by: AlexandreYang <49917914+AlexandreYang@users.noreply.github.com>
@datadog-datadog-prod-us1
Copy link
Copy Markdown

View session in Datadog

Bits Dev status: ✅ Done

CI Auto-fix: Disabled | Enable

Comment @DataDog to request changes

@AlexandreYang AlexandreYang marked this pull request as ready for review March 9, 2026 09:28
@AlexandreYang AlexandreYang merged commit a98840a into main Mar 9, 2026
7 checks passed
@AlexandreYang AlexandreYang deleted the dd/split-interp-runner branch March 9, 2026 09:33
This was referenced Mar 12, 2026
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