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: dynamic configuration overwrites env in multi-workspace sessions #39592
There are several places in the gopls codebase that assume a source.Options may be cloned by passing it by value. Perhaps this was once correct, but isn't correct anymore, as for example
One place where this shows up is in
Another place this manifests is in didChangeConfiguration. This
We should explictly clone source.Options before mutating it. Note this would also make it safe to pass around the (quite large) options type by reference, and/or make it opaque.