Skip to content

chore: upgrade to Go 1.24 and add support for *types.Alias#77

Closed
fujiwara-manabu-0516 wants to merge 1 commit into
go-generalize:mainfrom
fujiwara-manabu-0516:feature/go124-types-alias/main
Closed

chore: upgrade to Go 1.24 and add support for *types.Alias#77
fujiwara-manabu-0516 wants to merge 1 commit into
go-generalize:mainfrom
fujiwara-manabu-0516:feature/go124-types-alias/main

Conversation

@fujiwara-manabu-0516
Copy link
Copy Markdown

@fujiwara-manabu-0516 fujiwara-manabu-0516 commented Aug 20, 2025

  • bump Go version to 1.24
  • update code handling for *types.Alias introduced in 1.24

We would greatly appreciate it if you could review and merge this PR at your convenience.
Thank you very much for your time and support!

- bump Go version to 1.24
- update code handling for *types.Alias introduced in 1.24
fujiwara-manabu-0516 added a commit to fujiwara-manabu-0516/volcago that referenced this pull request Aug 20, 2025
- go.mod/go.sum の Go バージョンを 1.24 に更新
- 実行時にnet/httpの型関連のエラーが起きるためgolang.org/x/ 系モジュールをあわせて更新
- go-easyparserで*types.Aliasのエラーが発生する問題は以下のPRで対応
  - go-generalize/go-easyparser/pull/77
@54m
Copy link
Copy Markdown
Member

54m commented May 3, 2026

Thank you very much for the contribution and for raising attention to this issue!

Released v0.5.0 (#78), which addresses the same *types.Alias panic you reported here. The implementation in v0.5.0 uses types.Unalias() instead of Underlying(), because Underlying() strips not only the alias layer but also the named-type layer. That would silently break special handling for named types — most notably time.Time aliases would lose their Date conversion, and type Foo = SomeStruct would be inlined as an anonymous struct instead of being treated as a reference to SomeStruct

In addition to *types.Alias, v0.5.0 also covers *types.Signature and *types.TypeParam (both falling back to Any{}), Go 1.24+ generic type aliases (type Vec[T any] = []T), and clarifies the panic message wording

Closing in favor of #78. Thanks again for prompting the fix!

@54m 54m closed this May 3, 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