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

Update rand requirement from 0.8 to 0.9 #7045

Merged
merged 6 commits into from
Feb 2, 2025

Conversation

mbrobbel
Copy link
Contributor

@mbrobbel mbrobbel commented Jan 29, 2025

Which issue does this PR close?

Rationale for this change

https://rust-random.github.io/book/update-0.9.html

What changes are included in this PR?

The required changes to migrate from 0.8 to 0.9.

Are there any user-facing changes?

rand dependency bumped to 0.9.

dependabot bot and others added 2 commits January 28, 2025 13:57
Updates the requirements on [rand](https://github.com/rust-random/rand) to permit the latest version.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](rust-random/rand@0.8.0...0.9.0)

---
updated-dependencies:
- dependency-name: rand
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@github-actions github-actions bot added parquet Changes to the parquet crate arrow Changes to the arrow crate object-store Object Store Interface labels Jan 29, 2025
@mbrobbel mbrobbel marked this pull request as draft January 29, 2025 11:05
@mbrobbel mbrobbel marked this pull request as ready for review January 29, 2025 11:48
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thanks @mbrobbel -- this looks great

I double checked and given rand is only a dev dependency this change I think can be merged without impacting backwards compatibility

I think we should merge this after making the 42.1 release candidate, which I hope to do in the next few minutes


let values = ScalarBuffer::from_iter(repeat_with(|| rng.gen()).take(4096));
let values = ScalarBuffer::from_iter(repeat_with(|| rng.random()).take(4096));
Copy link
Contributor

Choose a reason for hiding this comment

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

I like this rename from gen to random -- I think it is much clearer now


let usize = UniformUsize::new(usize::MIN, usize::MAX).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

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

I found this name confusing -- using usize as a variable name was unexpected. Can we call it uusize or something to make it clear it is different than the type usize?

There are a few other similar refactors below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mbrobbel
Copy link
Contributor Author

I double checked and given rand is only a dev dependency this change I think can be merged without impacting backwards compatibility

It's a normal dependency for arrow and object_store (optional):

rand = { version = "0.8", default-features = false, features = ["std", "std_rng"], optional = true }

rand = { version = "0.8", default-features = false, features = ["std", "std_rng"], optional = true }

@alamb
Copy link
Contributor

alamb commented Feb 1, 2025

It's a normal dependency for arrow and object_store (optional):

In order to merge this into main before the next breaking release I think we need to ensure it doesn't appear in any of the public APIs. I can double check in a bit

@alamb
Copy link
Contributor

alamb commented Feb 2, 2025

It's a normal dependency for arrow and object_store (optional):

In order to merge this into main before the next breaking release I think we need to ensure it doesn't appear in any of the public APIs. I can double check in a bit

I double checked

the dependency for arrow is for the test_utils mod which doesn't appear to have rand in any of the public APIs (though I didn't analyze them all to be honest)
https://github.com/alamb/arrow-rs/blob/53c1f5fef08dfe01a95e34ed9df4216aaeb583f5/arrow/Cargo.toml#L74-L73

Since we haven't made a new breaking object store release yet I don't think that is a problem

@alamb alamb merged commit 69eeee3 into apache:main Feb 2, 2025
34 checks passed
@alamb
Copy link
Contributor

alamb commented Feb 2, 2025

Thanks again @mbrobbel ❤️

@mbrobbel mbrobbel deleted the dependabot/cargo/main/rand-0.9 branch February 2, 2025 12:31
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 object-store Object Store Interface parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants