-
Notifications
You must be signed in to change notification settings - Fork 150
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
locations.go sourceInfoRegistry cache is not concurrent #1430
Comments
Yeah you are totally right. Cool that you are using it for what I'm guessing are non ApiLinter use cases? Or if you are, using goroutines in a linter rule is interesting and I'd like to hear more. Anyways, I'll work on a change to add locking around the map access. I don't particularly want to use a |
Thanks for working on it @noahdietz, really appreciated! In our use case, we have a CLI in Go that contains a linter combining AIP rules and some self-written ones specific to our domain. When writing our rules we need to report problematic locations in protos to the end user, and the path from the Since we already have AIP linter as a dependency, we found the |
Is the reason for running the rules in "parallel" via goroutines simply for speed of execution? |
Fix is out for review. Hopefully I can get it released today for ya |
👍 |
We found the
locations.go
a useful utility to access locations of HTTP options, in particular:MethodHTTPRule
.However, it is not concurrent and might crash like:
With goroutine:
or:
The text was updated successfully, but these errors were encountered: