codeql
codeql copied to clipboard
Go: Support Go 1.23
This PR makes minimal changes for us to tolerate Go 1.23. Go 1.23 makes changes to how aliases are represented by the compiler. This PR modifies the extractor to extract them as a new kind of type.
This is just a first stab at extracting the alias types and does not include parameters or arguments, yet.
Things to check:
- Is it sensible for us to extract the alias types or just resolve them? I think it makes sense to extract them to mirror how the compiler represents the type AST.
- In light of that, do we need to make any adjustments (beyond implementing
getUnderlyingType
) to account for this so that queries which look for certain types don't get fooled by aliases? - Should we extract the type object for aliases?
- Should we extract the names of aliases using the existing table for named types or a separate table?
- Some existing tests fail with the current changes where
interface{}
types change toany
. I am not entirely sure why this is.