Skip to content
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

BufferProvider is DynamicDataProvider<BufferMarker> #4992

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

robertbastian
Copy link
Member

No description provided.

@robertbastian robertbastian requested review from sffc, Manishearth and a team as code owners June 3, 2024 16:15
@robertbastian
Copy link
Member Author

#4881

Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

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

There are two directions we can take:

  1. Remove DynamicDataProvider and acknowledge that the only use cases are in BufferProvider and DataExporter and make traits for those specific situations
  2. Remove BufferProvider and leverage the more general solution named DynamicDataProvider to handle that use case

This PR goes toward option 2 but I'm not convinced. I think I had preferred option 1.

I don't know why so many times we end up on different ends of these arbitrary architecture choices...

@robertbastian
Copy link
Member Author

  1. lets us unify code paths for BufferProvider and AnyProvider.

@robertbastian
Copy link
Member Author

Note that this PR lets us remove quite a few implementations. I'd like to point out impl IterableDynamicDataProvider<BufferMarker> for BlobDataProvider. If we remove DynamicDataProvider, we'd need a IterableBufferProvider. I don't see the need for all these concrete types if we can keep it generic.

@robertbastian robertbastian requested a review from sffc June 3, 2024 17:43
Copy link
Member

@Manishearth Manishearth left a comment

Choose a reason for hiding this comment

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

⛹️‍♂️ 💨 🗑️

Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

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

ok, I can be convinced that fewer impls is better

@robertbastian robertbastian merged commit fffa624 into unicode-org:main Jun 3, 2024
28 checks passed
@robertbastian robertbastian deleted the buf branch June 6, 2024 17:36
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.

3 participants