dry-rb / dry-schema

Coercion and validation for data structures
https://dry-rb.org/gems/dry-schema
MIT License
425 stars 110 forks source link

Prevent error message YAML files from being parsed multiple times #364

Closed alassek closed 3 years ago

alassek commented 3 years ago

Fixes #352

Adds source_cache to Dry::Schema::Messages::YAML.

Since this data is now being shared by Schemas, I opted to freeze it.

I'm leaning towards not adding test coverage for this specifically, since it's changing the implementation of a feature that is already under test.