-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deserialization previously used implicit schema based on reflection. This showed problems in common schema evolution scenarios (Adding a field). The formatter was updated to be passed the schema explicitly (instead of inferring it).
- Loading branch information
1 parent
3efce44
commit ef8e6bc
Showing
28 changed files
with
409 additions
and
350 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# Directories containing independent Go modules. | ||
MODULE_DIRS = . | ||
GOLANGCI_VERSION=1.61.0 | ||
AVRO_CMD_PATH=github.com/hamba/avro/v2/cmd/[email protected] | ||
|
||
|
||
# Sets up kafka broker using docker compose | ||
|
@@ -47,10 +48,13 @@ golangci-lint: | |
gen: protoc-exists | ||
cd test/evolution; protoc --proto_path=. --go_out=./ ./schema_1.proto | ||
cd test/evolution; protoc --proto_path=. --go_out=./ ./schema_2.proto | ||
go run github.com/heetch/avro/cmd/[email protected] -p main -d ./example/producer_avro ./example/producer_avro/dummy_event.avsc | ||
go run github.com/heetch/avro/cmd/[email protected] -p main -d ./example/worker_avro ./example/worker_avro/dummy_event.avsc | ||
go run github.com/heetch/avro/cmd/[email protected] -p avro1 -d ./test/evolution/avro1 ./test/evolution/schema_1.avsc | ||
go run github.com/heetch/avro/cmd/[email protected] -p avro2 -d ./test/evolution/avro2 ./test/evolution/schema_2.avsc | ||
go run ${AVRO_CMD_PATH} -pkg main -o ./example/producer_avro/event_gen.go ./example/producer_avro/event.avsc | ||
go run ${AVRO_CMD_PATH} -pkg main -o ./example/worker_avro/event_gen.go ./example/worker_avro/event.avsc | ||
mkdir -p ./test/evolution/avro1 | ||
mkdir -p ./test/evolution/avro2 | ||
go run ${AVRO_CMD_PATH} -pkg avro1 -o ./test/evolution/avro1/schema_1_gen.go ./test/evolution/schema_1.avsc | ||
go run ${AVRO_CMD_PATH} -pkg avro2 -o ./test/evolution/avro2/schema_2_gen.go ./test/evolution/schema_2.avsc | ||
go run github.com/heetch/avro/cmd/[email protected] -p avro1 -d ./test/evolution/avro1x ./test/evolution/schema_1.avsc | ||
|
||
# a forced dependency which fails (and prints) if `avro-tools` isn't installed | ||
.PHONY: protoc-exists | ||
|
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.