Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
x/tools/gopls: forgets/complains about unchanged types/code #38924
What version of Go are you using (
I caught part of this live again.
I have a function definition which exists in file A. That function definition returns a type which exists in a package (P) different than A's package. The import that provides that type to file A is import aliased.
If I open the file (A) with the function definition (and the import alias), both files stop reporting errors. If I close the file with the function definition, both files start reporting errors again.
Thanks for the detailed report! The second issue you described should be covered by #38403, which was just resolved. Please upgrade to master and do let us know if you see this issue again.
Regarding the first issue, can you share your logs when you see this happen? Details on how to capture them here.