-
Notifications
You must be signed in to change notification settings - Fork 138
Bump go.mod to 1.23 and remove alias replacements #248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis update revises the Go version in several Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GitHub Actions
participant Test Suite
User->>GitHub Actions: Push code / open PR
GitHub Actions->>Test Suite: Run tests with Go 1.23.x
GitHub Actions->>Test Suite: Run tests with Go 1.24.x
Test Suite-->>GitHub Actions: Report results
GitHub Actions-->>User: Display test outcomes
sequenceDiagram
participant packageModeParser
participant TypeParser
packageModeParser->>TypeParser: parseType(t)
Note right of TypeParser: (Old) Check for alias replacement<br>(New) Directly parse type, no alias lookup
TypeParser-->>packageModeParser: Return parsed type
Poem
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (9)
💤 Files with no reviewable changes (1)
🧰 Additional context used🧬 Code Graph Analysis (2)mockgen/package_mode_test.go (1)
mockgen/internal/tests/alias/mock/interfaces.go (2)
🔇 Additional comments (17)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
a177d86
to
0712b54
Compare
Alias replacements derived from syntax were introduced in uber-go#220 as a way to ensure the aliases used in source code were also used. This helped ensure packages mode worked on go1.22, which didn't have explicit alias node support in the `go/types` package. Alias replacements have a couple issues: * They flat out replace any would-be references to an underlying type with an alias type. * They don't properly handle aliases to generic type instantiations (ref: uber-go#243) Now that go1.24 is released, we can bump `go.mod` to go1.23, which means we can ensure `go/types` has an explicit `types.Alias` node for type aliases, and we can remove the alias replacement logic.
Alias replacements derived from syntax were introduced in #220 as a way to ensure the aliases used in source code were also used. This helped ensure packages mode worked on go1.22, which didn't have explicit alias node support in the
go/types
package.Alias replacements have a couple issues:
Now that go1.24 is released, we can bump
go.mod
to go1.23, which means we can ensurego/types
has an explicittypes.Alias
node for type aliases, and we can remove the alias replacement logic.Summary by CodeRabbit