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

build: bump toolchain to 2023-09-09 #11809

Merged
merged 33 commits into from
Sep 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9d3e587
bump toolchain
TennyZhuang Jul 28, 2023
605bb56
Merge branch 'main' into tygg-bump-toolchain-20230728
xxchan Aug 20, 2023
ade0d7e
remove dup resolver = 2
xxchan Aug 20, 2023
5a7bcbb
bump to 08-21, fixing TAIT bug
xxchan Aug 21, 2023
1059d1e
rustfmt: fmt let-else, disable wrap_comments
xxchan Aug 21, 2023
09af429
Merge branch 'main' into tygg-bump-toolchain-20230728
xxchan Aug 21, 2023
bf19bda
revert changes about TAIT
xxchan Aug 21, 2023
cf32041
Merge branch 'main' into tygg-bump-toolchain-20230728
MrCroxx Aug 28, 2023
74331f2
fix some clippy reports
MrCroxx Aug 28, 2023
6f78e2a
fix some clippy report
MrCroxx Aug 28, 2023
4004aa0
fix all clippy reports
MrCroxx Aug 28, 2023
722f8f6
fix bugs
MrCroxx Aug 28, 2023
fd087d6
Merge branch 'main' into tygg-bump-toolchain-20230728
MrCroxx Aug 28, 2023
bf3bbe7
update docker version
MrCroxx Aug 29, 2023
5f2fcff
Merge branch 'main' into tygg-bump-toolchain-20230728
MrCroxx Aug 29, 2023
cc5d116
install sccache with binstall
MrCroxx Aug 29, 2023
7e6e7c3
update docker build
MrCroxx Aug 29, 2023
cc55bac
use expect insteal of allow
MrCroxx Aug 29, 2023
06c6a59
fix lifetime
MrCroxx Aug 29, 2023
ed3a75a
fix state store stream compile
wenym1 Aug 29, 2023
5ab88a8
Merge remote-tracking branch 'origin/main' into tygg-bump-toolchain-2…
xxchan Sep 9, 2023
ab8c61c
fix thiserror/anyhow, fmt, some clippy
xxchan Sep 9, 2023
3d3f863
fix clippy
xxchan Sep 9, 2023
ae36c29
prefer `error::request_ref`
xxchan Sep 9, 2023
6325dbd
fix sqlsmith clippy
xxchan Sep 9, 2023
3c399e9
bump to 2023-09-09, use [lints] table
xxchan Sep 9, 2023
7a21774
update ci image
xxchan Sep 9, 2023
1dc58b5
Fix "cargo-hakari"
xxchan Sep 9, 2023
ca8b696
use [lints]
xxchan Sep 9, 2023
620e5c4
fix
xxchan Sep 9, 2023
200c771
update gen-flamegraph.sh
xxchan Sep 9, 2023
26413b8
fix reschedule bug
xxchan Sep 9, 2023
69f2e71
Merge branch 'main' into tygg-bump-toolchain-20230728
xxchan Sep 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 4 additions & 19 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,8 @@ rustflags = [
# uncomment the following two lines to enable `TaskLocalAlloc`
# "--cfg",
# "enable_task_local_alloc",
# lints
# TODO: use lint configuration in cargo https://github.com/rust-lang/cargo/issues/5034
"-Funused_must_use",
"-Aclippy::uninlined_format_args",
"-Wclippy::dbg_macro",
"-Wclippy::disallowed_methods",
"-Wclippy::disallowed_types",
"-Wclippy::doc_markdown",
"-Wclippy::explicit_into_iter_loop",
"-Wclippy::explicit_iter_loop",
"-Wclippy::inconsistent_struct_constructor",
"-Wclippy::unused_async",
"-Wclippy::map_flatten",
"-Wclippy::no_effect_underscore_binding",
"-Wclippy::await_holding_lock",
"-Wrustdoc::broken_intra_doc_links",
"-Wfuture_incompatible",
"-Wnonstandard_style",
"-Wrust_2018_idioms",

]

[unstable]
lints = true
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 61 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,48 @@ repository = "https://github.com/risingwavelabs/risingwave"

[workspace.dependencies]
await-tree = "0.1.1"
aws-config = { version = "0.55", default-features = false, features = ["rt-tokio", "native-tls"] }
aws-credential-types = { version = "0.55", default-features = false, features = ["hardcoded-credentials"] }
aws-sdk-kinesis = { version = "0.28", default-features = false, features = ["rt-tokio", "native-tls"] }
aws-sdk-s3 = { version = "0.28", default-features = false, features = ["rt-tokio","native-tls"] }
aws-sdk-ec2 = { version = "0.28", default-features = false, features = ["rt-tokio","native-tls"] }
aws-sdk-sqs = { version = "0.28", default-features = false, features = ["rt-tokio", "native-tls"] }
aws-smithy-client = { version = "0.55", default-features = false, features = ["rt-tokio", "native-tls"] }
aws-config = { version = "0.55", default-features = false, features = [
"rt-tokio",
"native-tls",
] }
aws-credential-types = { version = "0.55", default-features = false, features = [
"hardcoded-credentials",
] }
aws-sdk-kinesis = { version = "0.28", default-features = false, features = [
"rt-tokio",
"native-tls",
] }
aws-sdk-s3 = { version = "0.28", default-features = false, features = [
"rt-tokio",
"native-tls",
] }
aws-sdk-ec2 = { version = "0.28", default-features = false, features = [
"rt-tokio",
"native-tls",
] }
aws-sdk-sqs = { version = "0.28", default-features = false, features = [
"rt-tokio",
"native-tls",
] }
aws-smithy-client = { version = "0.55", default-features = false, features = [
"rt-tokio",
"native-tls",
] }
aws-smithy-http = "0.55"
aws-smithy-types = "0.55"
aws-endpoint = "0.55"
aws-types = "0.55"
etcd-client = { package = "madsim-etcd-client", version = "0.3" }
futures-async-stream = "0.2"
hytra = "0.1"
rdkafka = { package = "madsim-rdkafka", git = "https://github.com/madsim-rs/madsim.git", rev = "bb8f063", features = ["cmake-build"] }
hashbrown = { version = "0.14.0", features = ["ahash", "inline-more", "nightly"] }
rdkafka = { package = "madsim-rdkafka", git = "https://github.com/madsim-rs/madsim.git", rev = "bb8f063", features = [
"cmake-build",
] }
hashbrown = { version = "0.14.0", features = [
"ahash",
"inline-more",
"nightly",
] }
criterion = { version = "0.5", features = ["async_futures"] }
tonic = { package = "madsim-tonic", version = "0.3.1" }
tonic-build = { package = "madsim-tonic-build", version = "0.3.1" }
Expand Down Expand Up @@ -117,6 +143,32 @@ risingwave_variables = { path = "./src/utils/variables" }
risingwave_java_binding = { path = "./src/java_binding" }
risingwave_jni_core = { path = "src/jni_core" }

[workspace.lints.rust]
# `forbid` will also prevent the misuse of `#[allow(unused)]`
unused_must_use = "forbid"
future_incompatible = "warn"
nonstandard_style = "warn"
rust_2018_idioms = "warn"

[workspace.lints.clippy]
uninlined_format_args = "allow"
dbg_macro = "warn"
disallowed_methods = "warn"
disallowed_types = "warn"
doc_markdown = "warn"
explicit_into_iter_loop = "warn"
explicit_iter_loop = "warn"
inconsistent_struct_constructor = "warn"
unused_async = "warn"
map_flatten = "warn"
no_effect_underscore_binding = "warn"
await_holding_lock = "warn"

[workspace.lints.rustdoc]
private_intra_doc_links = "allow"
# Explicit lints don't hurt, and sometimes rust-analyzer works better with explicit links.
redundant_explicit_links = "allow"

[profile.dev]
lto = 'off'

Expand Down
2 changes: 1 addition & 1 deletion ci/build-ci-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cat ../rust-toolchain
# !!! CHANGE THIS WHEN YOU WANT TO BUMP CI IMAGE !!! #
# AND ALSO docker-compose.yml #
######################################################
export BUILD_ENV_VERSION=v20230821
export BUILD_ENV_VERSION=v20230909

export BUILD_TAG="public.ecr.aws/x5u3w5h6/rw-build-env:${BUILD_ENV_VERSION}"

Expand Down
10 changes: 5 additions & 5 deletions ci/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ services:
retries: 5

source-test-env:
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230821
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230909
depends_on:
- mysql
- db
Expand All @@ -81,7 +81,7 @@ services:
- ..:/risingwave

sink-test-env:
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230821
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230909
depends_on:
- mysql
- db
Expand All @@ -91,12 +91,12 @@ services:
- ..:/risingwave

rw-build-env:
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230821
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230909
volumes:
- ..:/risingwave

ci-flamegraph-env:
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230821
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230909
# NOTE(kwannoel): This is used in order to permit
# syscalls for `nperf` (perf_event_open),
# so it can do CPU profiling.
Expand All @@ -107,7 +107,7 @@ services:
- ..:/risingwave

regress-test-env:
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230821
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230909
depends_on:
db:
condition: service_healthy
Expand Down
2 changes: 1 addition & 1 deletion ci/rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2023-05-31"
channel = "nightly-2023-09-09"
2 changes: 1 addition & 1 deletion ci/scripts/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ sccache --show-stats
sccache --zero-stats

echo "--- Build documentation"
RUSTDOCFLAGS="-Dwarnings -Arustdoc::private_intra_doc_links" cargo doc --document-private-items --no-deps
RUSTDOCFLAGS="-Dwarnings" cargo doc --document-private-items --no-deps

echo "--- Show sccache stats"
sccache --show-stats
Expand Down
4 changes: 3 additions & 1 deletion ci/scripts/gen-flamegraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ set -euo pipefail

source ci/scripts/common.sh

RUST_TOOLCHAIN=$(cat rust-toolchain)

QUERY_DIR="/risingwave/ci/scripts/sql/nexmark"

# TODO(kwannoel): This is a workaround since workdir is `/risingwave` in the docker container.
Expand Down Expand Up @@ -79,7 +81,7 @@ install_all() {
git clone https://github.com/gimli-rs/addr2line
pushd addr2line
git checkout 0.20.0
echo "nightly-2023-04-07" > rust-toolchain
echo "$RUST_TOOLCHAIN" > rust-toolchain
cargo b --examples -r
mv ./target/release/examples/addr2line $(which addr2line)
popd
Expand Down
3 changes: 3 additions & 0 deletions integration_tests/feature-store/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ tonic-build = "0.7.1"
[[bin]]
name = "server"
path = "src/main.rs"

[lints]
workspace = true
3 changes: 3 additions & 0 deletions integration_tests/feature-store/simulator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ prost = "0.10"
serde = { version = "1", features = ["derive"] }
futures = "0.3.0"
csv = "1.2.2"

[lints]
workspace = true
5 changes: 4 additions & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ group_imports = "StdExternalCrate"
reorder_impl_items = true
reorder_imports = true
tab_spaces = 4
wrap_comments = true
# TODO: Fix it later. It produces too many unwanted changes related with markdown lists now. e.g.,
# https://github.com/rust-lang/rustfmt/issues/5862
# https://github.com/rust-lang/rustfmt/issues/5836
# wrap_comments = true
3 changes: 3 additions & 0 deletions scripts/source/prepare_ci_pubsub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ tokio = { version = "0.2", package = "madsim-tokio", features = [
"signal",
"fs",
] }

[lints]
workspace = true
3 changes: 3 additions & 0 deletions src/batch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,6 @@ harness = false
[[bench]]
name = "limit"
harness = false

[lints]
workspace = true
2 changes: 1 addition & 1 deletion src/batch/benches/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn bench_expand(c: &mut Criterion) {
let chunk_num = SIZE / chunk_size;
b.to_async(&rt).iter_batched(
|| create_expand_executor(vec![vec![0, 1], vec![2]], chunk_size, chunk_num),
|e| execute_executor(e),
execute_executor,
BatchSize::SmallInput,
);
},
Expand Down
2 changes: 1 addition & 1 deletion src/batch/benches/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn bench_filter(c: &mut Criterion) {
let chunk_num = TOTAL_SIZE / chunk_size;
b.to_async(&rt).iter_batched(
|| create_filter_executor(chunk_size, chunk_num),
|e| execute_executor(e),
execute_executor,
BatchSize::SmallInput,
);
},
Expand Down
2 changes: 1 addition & 1 deletion src/batch/benches/hash_agg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ fn bench_hash_agg(c: &mut Criterion) {
chunk_num,
)
},
|e| execute_executor(e),
execute_executor,
BatchSize::SmallInput,
);
},
Expand Down
2 changes: 1 addition & 1 deletion src/batch/benches/limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fn bench_limit(c: &mut Criterion) {
let chunk_num = SIZE / chunk_size;
b.to_async(&rt).iter_batched(
|| create_limit_executor(chunk_size, chunk_num, 128, 128),
|e| execute_executor(e),
execute_executor,
BatchSize::SmallInput,
);
},
Expand Down
2 changes: 1 addition & 1 deletion src/batch/benches/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fn bench_order_by(c: &mut Criterion) {
let chunk_num = SIZE / chunk_size;
b.to_async(&rt).iter_batched(
|| create_order_by_executor(chunk_size, chunk_num, single_column),
|e| execute_executor(e),
execute_executor,
BatchSize::SmallInput,
);
},
Expand Down
2 changes: 1 addition & 1 deletion src/batch/benches/top_n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ fn bench_top_n(c: &mut Criterion) {
let chunk_num = SIZE / chunk_size;
b.to_async(&rt).iter_batched(
|| create_top_n_executor(chunk_size, chunk_num, single_column, 128, 128),
|e| execute_executor(e),
execute_executor,
BatchSize::SmallInput,
);
},
Expand Down
2 changes: 1 addition & 1 deletion src/batch/benches/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub fn bench_join(
right_chunk_num,
)
},
|e| execute_executor(e),
execute_executor,
BatchSize::SmallInput,
);
},
Expand Down
6 changes: 3 additions & 3 deletions src/batch/src/executor/group_top_n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ impl<K: HashKey> GroupTopNExecutor<K> {
}

let mut chunk_builder = DataChunkBuilder::new(self.schema.data_types(), self.chunk_size);
for (_, h) in groups.iter_mut() {
for (_, h) in &mut groups {
let mut heap = TopNHeap::empty();
swap(&mut heap, h);
for ele in heap.dump() {
Expand Down Expand Up @@ -308,7 +308,7 @@ mod tests {
let mut stream = top_n_executor.execute();
let res = stream.next().await;

assert!(matches!(res, Some(_)));
assert!(res.is_some());
if let Some(res) = res {
let res = res.unwrap();
assert!(
Expand Down Expand Up @@ -338,7 +338,7 @@ mod tests {
}

let res = stream.next().await;
assert!(matches!(res, None));
assert!(res.is_none());
}

assert_eq!(0, parent_mem.get_bytes_used());
Expand Down
2 changes: 1 addition & 1 deletion src/batch/src/executor/merge_sort_exchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ mod tests {

let mut stream = executor.execute();
let res = stream.next().await;
assert!(matches!(res, Some(_)));
assert!(res.is_some());
if let Some(res) = res {
let res = res.unwrap();
assert_eq!(res.capacity(), 3 * num_sources);
Expand Down
6 changes: 3 additions & 3 deletions src/batch/src/executor/order_by.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ mod tests {

let mut stream = order_by_executor.execute();
let res = stream.next().await;
assert!(matches!(res, Some(_)));
assert!(res.is_some());
if let Some(res) = res {
let res = res.unwrap();
let col0 = res.column_at(0);
Expand Down Expand Up @@ -246,7 +246,7 @@ mod tests {

let mut stream = order_by_executor.execute();
let res = stream.next().await;
assert!(matches!(res, Some(_)));
assert!(res.is_some());
if let Some(res) = res {
let res = res.unwrap();
let col0 = res.column_at(0);
Expand Down Expand Up @@ -296,7 +296,7 @@ mod tests {

let mut stream = order_by_executor.execute();
let res = stream.next().await;
assert!(matches!(res, Some(_)));
assert!(res.is_some());
if let Some(res) = res {
let res = res.unwrap();
let col0 = res.column_at(0);
Expand Down
Loading
Loading