sourcegraph / lsif-go

Language Server Indexing Format (LSIF) generator for Go
https://lsif.dev/
MIT License
116 stars 20 forks source link

☂️ Support for generics #238

Open varungandhi-src opened 2 years ago

varungandhi-src commented 2 years ago

Go 1.18 with generics will be released this month (March 2022). We need to add support for generics (e.g. Go to Definition for type parameters in type signatures) so that people can continue using precise code intel when they bump their toolchain version. I'm not entirely sure how much work this will require; if it needs to be broken up, this can be used as an umbrella issue with various sub-issues organized in a TODO list (with - [ ]).

Strum355 commented 2 years ago

For my own curiosity, I had a look at how our current grouping n such applies to generics, and it seems itll require a bit of work.

the types.Object for a type param is also of type *types.TypeName, but building of the identifying string doesn't seem to be clash-free, so we'd need some other information specifically for type params

image

DaedalusG commented 2 years ago

Related investigation: https://github.com/sourcegraph/lsif-go/issues/240