Skip to content

feat(generator): check if glob pattern is valid#91

Merged
lerouxrgd merged 1 commit intolerouxrgd:masterfrom
landreussi:master
Jan 14, 2026
Merged

feat(generator): check if glob pattern is valid#91
lerouxrgd merged 1 commit intolerouxrgd:masterfrom
landreussi:master

Conversation

@landreussi
Copy link
Copy Markdown
Contributor

This patch adds a validation that checks if the glob pattern found any files.

That's a validation that does make sense for my use case, which consists of a proc macro that expands Rust types from Avro schemas, and a build script that does the same thing.

This modification could break existing use cases:
If no files were found, the clients of this crate will need to treat that case like this:

match g.generate(...) {
    Ok(_) => Ok(()),
    Err(Error::GlobPattern(..)) => Ok(()),
    Err(e) => Err(e),
}?;

This looks to me like this validation should exist in the crate, but let me know if you have any disagreements.

@leo-def
Copy link
Copy Markdown

leo-def commented Jan 14, 2026

Great job

This patch adds a validation that checks if the glob pattern found any files.
@lerouxrgd lerouxrgd merged commit 090c29c into lerouxrgd:master Jan 14, 2026
2 checks passed
@lerouxrgd
Copy link
Copy Markdown
Owner

Thanks for the PR !

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.

7 participants