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

Public API using private types: Buffer::from_bytes takes unexported Bytes #6754

Closed
tv42 opened this issue Nov 19, 2024 · 5 comments · Fixed by #6939
Closed

Public API using private types: Buffer::from_bytes takes unexported Bytes #6754

tv42 opened this issue Nov 19, 2024 · 5 comments · Fixed by #6939
Labels
arrow Changes to the arrow crate arrow-flight Changes to the arrow-flight crate bug parquet Changes to the parquet crate

Comments

@tv42
Copy link

tv42 commented Nov 19, 2024

Describe the bug

https://docs.rs/arrow-buffer/53.2.0/arrow_buffer/buffer/struct.Buffer.html#method.from_bytes

/// Auxiliary method to create a new Buffer
pub fn from_bytes(bytes: Bytes) -> Self

This method is in the public API, but cannot be called.

Expected behavior

  1. All types used by public API are public.

Any outside users looking at this are probably better served by Buffer::from_vec.

@tv42 tv42 added the bug label Nov 19, 2024
@tustvold
Copy link
Contributor

tustvold commented Nov 19, 2024

We should probably make from_bytes crate private, agreed

@alamb
Copy link
Contributor

alamb commented Jan 4, 2025

Here is a proposal to fix the problem (deprecate the confusing API and convert to use From impls)

@alamb alamb added the parquet Changes to the parquet crate label Jan 27, 2025
@alamb
Copy link
Contributor

alamb commented Jan 27, 2025

label_issue.py automatically added labels {'parquet'} from #6939

@alamb alamb added the arrow Changes to the arrow crate label Jan 27, 2025
@alamb
Copy link
Contributor

alamb commented Jan 27, 2025

label_issue.py automatically added labels {'arrow'} from #6939

@alamb alamb added the arrow-flight Changes to the arrow-flight crate label Jan 27, 2025
@alamb
Copy link
Contributor

alamb commented Jan 27, 2025

label_issue.py automatically added labels {'arrow-flight'} from #6939

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate arrow-flight Changes to the arrow-flight crate bug parquet Changes to the parquet crate
Projects
None yet
3 participants