Skip to content

Doclink: Support linking interfaces#2403

Open
yuandrew wants to merge 9 commits into
mainfrom
docklink-interfaces
Open

Doclink: Support linking interfaces#2403
yuandrew wants to merge 9 commits into
mainfrom
docklink-interfaces

Conversation

@yuandrew

@yuandrew yuandrew commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

What was changed

Added fix for doclink linking interfaces

Why?

We want these linked

Checklist

  1. Closes Doclink: interfaces are not linked #2213

  2. How was this tested:

  1. Any docs updates needed?

Note

Low Risk
Changes are limited to the doclink dev tool, generated doc comments, and test synchronization; no runtime SDK behavior changes.

Overview
Fixes the doclink tool so -fix can add // Exposed as: [go.temporal.io/sdk/...] comments for types declared inside grouped type (...) blocks—especially interfaces and simple named types like SessionState int—which were previously skipped because matching only looked at the third token (type Foo Bar).

Matching now strips trailing // comments before parsing and treats grouped type lines where the name is the first token (e.g. ContextPropagator interface {). Bare embedded interface fields (e.g. SendChannel inside Channel interface) are no longer mistaken for type definitions. Internal file walks re-open files for the doc check pass and close handles with returned errors instead of defer + log.Fatal.

Adds unit/integration-style tests for the matcher and processInternal. Running the tool updates many internal symbols (workflow channels/selectors, headers, schedules, deployments, temporal errors, etc.) with missing exposure links. Shutdown tests use buffered pollStarted channels to avoid races.

Reviewed by Cursor Bugbot for commit 582b49a. Bugbot is set up for automated code reviews on this repo. Configure here.

@yuandrew yuandrew requested a review from a team as a code owner June 15, 2026 16:39
@yuandrew yuandrew enabled auto-merge (squash) June 17, 2026 23:52

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 8fdbd4a. Configure here.

Comment thread internal/cmd/tools/doclink/doclink.go
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.

Doclink: interfaces are not linked

2 participants