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
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
x/tools/gopls: parse dependency ASTs in full mode #38278
We really only use dependency ASTs for finding definitions and documentation, and we can avoid extra work and AST traversal by precomputing what we need. In most cases, dependencies are only type-checked once. I propose this alternative:
A while back, @findleyr and I discussed a related topic which might allow us to get accurate analysis results for dependencies without the memory cost of keeping full ASTs in memory. Rob suggested that we could try pruning the ASTs after analysis runs, so the facts generated by analyses would be correct, but we would not pay the cost of keeping the full ASTs in memory.