-
Notifications
You must be signed in to change notification settings - Fork 3
Generalize reading and writing crates #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This has several advantages: - no instanceof - no handling of non-intended use required - only one interface with no restrictions on type T Also provides a helper/factory function for the construction of available readers. Downsides: - Deprecates some existing API for the next major version - Generics required in reading code (e.g. CrateReader<String> in future)
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
…trategy and keep old names as deprecated aliases
…h newZipPathReader
71e7caa
to
bef5f67
Compare
Notes:
Introduce generic readers instead of the StreamReaderStrategy. This means a location may be given using any type T, which will make implementations more flexible (for example, allow other types of streams). The same is planned for writers later.
Deprecates (but still possible to use):
To simplify the construction of readers, a new static factory class "Readers" is available.
This has several advantages:
Also provides a helper/factory function for the construction of available readers.
Downsides:
TODOs
check if the strategies have code in common that should be placed in the writerpostponed, not too important for now