Skip to content
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

Go: Support 1.24 #18306

Merged
merged 15 commits into from
Feb 12, 2025
Merged

Go: Support 1.24 #18306

merged 15 commits into from
Feb 12, 2025

Conversation

mbg
Copy link
Member

@mbg mbg commented Dec 17, 2024

No description provided.

@github-actions github-actions bot added the Go label Dec 17, 2024
@owen-mc owen-mc force-pushed the go/1.24 branch 3 times, most recently from 9155891 to 36d073f Compare January 10, 2025 11:36
@owen-mc owen-mc added the depends on internal PR This PR should only be merged in sync with an internal Semmle PR label Jan 10, 2025
@owen-mc owen-mc force-pushed the go/1.24 branch 4 times, most recently from 27c555d to a444a6a Compare January 17, 2025 08:25
@owen-mc owen-mc force-pushed the go/1.24 branch 2 times, most recently from bf7c52c to afe4554 Compare February 6, 2025 16:04
go/extractor/project/project.go Show resolved Hide resolved
Comment on lines 481 to 482
// `typeNameObj` can only be an alias in versions of Go
// before 1.24.
Copy link
Member Author

Choose a reason for hiding this comment

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

Should this be above the condition? It might also be useful to include what the implications of this are

Copy link
Contributor

Choose a reason for hiding this comment

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

I wasn't quite sure where it should go. I can move it a line higher if you think that's clearer. I'm also happy to rephrase it, but I wasn't sure how to put it clearly. Suggestions welcome. Basically, before 1.24 both defined types and named types will satisfy tp, ok := typeNameObj.Type().(*types.Named); ok, and we want to exclude the alias types from going into this branch of the conditional (though I'm not sure if anything bad would happen - I'm just preserving the old behaviour). From 1.24 onwards, alias types will instead satisfy tp, ok := typeNameObj.Type().(*types.Alias); ok, and will be dealt with by the second conditional below this.

Copy link
Contributor

Choose a reason for hiding this comment

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

I have moved it and tried to make it clearer.

@owen-mc owen-mc marked this pull request as ready for review February 11, 2025 22:18
@owen-mc owen-mc requested review from a team as code owners February 11, 2025 22:18
Copy link
Contributor

@owen-mc owen-mc left a comment

Choose a reason for hiding this comment

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

Proxying @mbg's approval (as he is the author, he can't approve)

Copy link
Member Author

@mbg mbg left a comment

Choose a reason for hiding this comment

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

Looks good. CI failure is expected and should be resolved once the internal PR is merged.

@mbg mbg merged commit a21dfc9 into main Feb 12, 2025
26 of 27 checks passed
@mbg mbg deleted the go/1.24 branch February 12, 2025 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depends on internal PR This PR should only be merged in sync with an internal Semmle PR Go
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants