Skip to content

First step to start extracting parts of schema.rs into smaller files - #405

Merged
Kriskras99 merged 1 commit into
mainfrom
split-schema-rs
Jan 17, 2026
Merged

Kriskras99 merged 1 commit into
mainfrom
split-schema-rs

Conversation

@martin-g

Copy link
Copy Markdown
Member

avro/src/schema.rs is almost 8000 lines.
It is time to split it into smaller files. For example we could extract the Parser related code into src/schema/parser.rs, the UnionSchema related code (+ tests) to src/schema/union.rs, etc.

This is the first step: move src/schema.rs to src/schema/mod.rs. No other changes!

@Kriskras99 Kriskras99 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea!

We could also move AvroSchema and AvroSchemaComponent to the serde module (and keep a pub use in the schema module for backwards compatibility)

@Kriskras99
Kriskras99 merged commit 10fafe4 into main Jan 17, 2026
@Kriskras99
Kriskras99 deleted the split-schema-rs branch January 17, 2026 07:01
@martin-g

Copy link
Copy Markdown
Member Author

Yes! We should try to keep it backward compatible as much as possible!

Why in src/serde/ ?
I'd say arc/schema/derive.rs

@Kriskras99

Copy link
Copy Markdown
Contributor

In my mind AvroSchema is very closely coupled to working with the serde crate.
99% of users will use it for that.
Having it in the serde module, will make the documentation for serde related stuff all be in one place.

@martin-g martin-g added this to the 0.22.0 milestone Jan 19, 2026
@Kriskras99 Kriskras99 mentioned this pull request Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants