Closed
Conversation
Collaborator
jfberry
commented
Jan 11, 2026
- webhooks_test.go: Use t.Errorf instead of t.Fatalf in goroutine
- decoder/pokemon.go: Add keyed field for s2.Point struct literal
- decoder: Change pokemonCache to store *Pokemon to avoid copying mutex embedded in protobuf MessageState
- Add peekPokemonFromCache for read-only access (no copy)
- getPokemonFromCache returns a copy for change detection semantics
- Use peekPokemonFromCache in savePokemonRecordAsAtTime for oldPokemon comparison (optimization from pokemon_less_gc branch)
comstud
reviewed
Jan 11, 2026
- webhooks_test.go: Use t.Errorf instead of t.Fatalf in goroutine - decoder/pokemon.go: Add keyed field for s2.Point struct literal - decoder: Change pokemonCache to store *Pokemon to avoid copying mutex embedded in protobuf MessageState - Add peekPokemonFromCache for read-only access (no copy) - getPokemonFromCache returns a copy for change detection semantics - Use peekPokemonFromCache in savePokemonRecordAsAtTime for oldPokemon comparison (optimization from pokemon_less_gc branch) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace grpc.PokemonInternal with a native PokemonInternalNative struct that can be safely copied without mutex issues. The protobuf types contain embedded sync.Mutex via protoimpl.MessageState which causes go vet warnings when the Pokemon struct is copied. - Add PokemonScanNative and PokemonInternalNative types in decoder package - Add ToProto/FromProto conversion functions for serialization - Update all internal usages to use native types - Protobuf is now only used at DB serialization boundaries Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4f13d62 to
508b113
Compare
Fabio1988
approved these changes
Jan 27, 2026
Collaborator
Author
|
Alternative approach implemented in #332, there may still be an argument for moving away from protobuf in the pokemon object but it's not to reduce vet problems any longer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.