-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/tools/gopls: race in updateAnalyzers #36699
Comments
I'm actually not sure how to fix this effectively since all of the fields in the options are exported. |
I set |
After offline discussion with @ianthehat, @heschik will look into the possibility of setting |
#36872's logs actually show the other side of the race:
|
Change https://golang.org/cl/216844 mentions this issue: |
Seen on CL 215743, which was not related.
This is specific to the tests in
golang.org/x/tools/gopls/test
, because they pass an options modification function (with the signaturefunc(*source.Options)
) that updates the analyzers map. All of the command tests use this type of function, but only the gopls/test ones modify a map. A possible solution would be to have a mutex on the options before modifying them.The text was updated successfully, but these errors were encountered: