-
Notifications
You must be signed in to change notification settings - Fork 3.8k
ARROW-10929: [Rust] Change CI to use Stable Rust #8930
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
🤔 the windows CI build is failing when using stable:
|
0493360
to
f3718ff
Compare
Hmm, I ran everything under valgrind locally and it did not detect any errors and the test has passed on windows a subsequent run. However, now I am getting a clippy error. I will fix that. |
I just saw this locally too and it passed on a second run. I filed https://issues.apache.org/jira/browse/ARROW-10943 |
4df2551
to
5788152
Compare
@@ -17,7 +17,6 @@ | |||
#![warn(missing_docs)] | |||
// Clippy lints, some should be disabled incrementally | |||
#![allow( | |||
clippy::field_reassign_with_default, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does not exist in stable clippy
@@ -561,6 +561,7 @@ impl From<&PlanType> for String { | |||
|
|||
/// Represents some sort of execution plan, in String form | |||
#[derive(Debug, Clone, PartialEq)] | |||
#[allow(clippy::rc_buffer)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clippy is complaining about https://rust-lang.github.io/rust-clippy/master/index.html#rc_buffer - but I think in this case using the Arc is really about cheaply copying the String
rather than it being mutable. The same happens for the other places I disabled this lint in this PR
I am not enough of a Rust expert to know if there is some better way to pass around a cheaply cloneable Vec
or String
that would appease Clippy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did it give an alternative in the suggestion?
Looks like Arc<str>
and Arc<[T]>
should be the alternatives
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree @Dandandan . I changed then a couple of times, but since the focus of this PR was the CI in stable, which includes build, tests, etc. I considered clippy to be a minor hassle that we can deal with later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Dandandan -- It did give alternatives but I did not figure out how to apply it.
The actually clippy lint didn't make a whole lot of sense to me as it seems to be focused on the mutability of the Arc/Rc's elements, which doesn't seem to apply here. From my reading of this code and the other callsites, the use case of using Arc<String>
is not mutability of the contained String
but rather cheaply copying it around.
Using Arc<str>
doesn't make sense as the actual String is allocated at runtime (it is the formatted version of an explain plan)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some discussion about why it can make sense to use Arc<str>
over Arc<String>
:
https://users.rust-lang.org/t/arc-string-vs-arc-str/30571
of course, difference is minimal, only saving a bit of indirection/some bytes.
You can use into
to convert a String
or &str
into a Arc<str>
or Rc<str>
https://doc.rust-lang.org/std/sync/struct.Arc.html#impl-From%3CString%3E
Codecov Report
@@ Coverage Diff @@
## master #8930 +/- ##
=======================================
Coverage 83.25% 83.25%
=======================================
Files 196 196
Lines 48116 48116
=======================================
Hits 40059 40059
Misses 8057 8057
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for taking the time to address this. Good stuff!
This is a cherry-pick of https://github.com/jorgecarleitao/arrow/commit/ca66d6d945e265dd2c83464bd80ff1dd7d231f7c by @jorgecarleitao It runs all tests except the simd using `stable` -- The SIMD feature still require nightly rust, but the default features do not (after apache#8698) Update: It also silences a few clippy lints which start complaining on stable -- I'll comment inline Closes apache#8930 from alamb/ARROW-10929-stable-ci Lead-authored-by: Andrew Lamb <andrew@nerdnetworks.org> Co-authored-by: Jorge C. Leitao <jorgecarleitao@gmail.com> Signed-off-by: Jorge C. Leitao <jorgecarleitao@gmail.com>
This is a cherry-pick of https://github.com/jorgecarleitao/arrow/commit/ca66d6d945e265dd2c83464bd80ff1dd7d231f7c by @jorgecarleitao
It runs all tests except the simd using
stable
-- The SIMD feature still require nightly rust, but the default features do not (after #8698)Update: It also silences a few clippy lints which start complaining on stable -- I'll comment inline