hiltontj / serde_json_path

Query serde_json Values with JSONPath
https://serdejsonpath.live/
MIT License
50 stars 3 forks source link

feat: Add `regex` feature flag #93

Closed LucasPickering closed 1 month ago

LucasPickering commented 2 months ago

First off, love this library, thanks for it. For my use case I don't really need the regex functions, and it's a really large dependency to pull in (adds ~8s to my build process).

This change hides the regex functions (match and search) behind a feature flag regex, which is enabled by default. This allows consumers to completely eliminate regex as a dependency if they choose. Also added some docs on feature flags.

I wasn't sure if I should update the changelog since it looks like it might be auto-generated from git cliff, let me know what you'd like.

LucasPickering commented 1 month ago

@hiltontj I agree about the breaking change, it would be an easy upgrade but still deserves 0.7. I'll add to the changelog. Incidentally I realized I no longer need this flag because I ended up pulling regex into my project as part of an unrelated dependency, but this might still be helpful for others 😛

hiltontj commented 1 month ago

Oh shoot, the docs link to tracing in the feature flags section is broken -perhaps because tracing is behind a non-default feature flag? Either way, you could probably just link to the latest tracing docs directly: https://docs.rs/tracing/latest/tracing/