await-holding-invalid-types = [ { path = "tracing::span::Entered", reason = "use `tracing::instrument`, `tracing::Instrument::instrument`, or `tracing::Span::in_scope` instead" }, { path = "tracing::span::EnteredSpan", reason = "use `tracing::instrument`, `tracing::Instrument::instrument`, or `tracing::Span::in_scope` instead" }, ] disallowed-methods = [ { path = "std::panic::catch_unwind", reason = "use `mz_ore::panic::catch_unwind` instead" }, { path = "futures::FutureExt::catch_unwind", reason = "use `mz_ore::future::FutureExt::catch_unwind` instead" }, { path = "futures_executor::block_on", reason = "use `tokio::runtime::Handle::block_on` instead" }, { path = "futures::executor::block_on", reason = "use `tokio::runtime::Handle::block_on` instead" }, { path = "tokio::spawn", reason = "use the spawn wrappers in `mz_ore::task` instead" }, { path = "tokio::task::spawn", reason = "use the spawn wrappers in `mz_ore::task` instead" }, { path = "tokio::task::spawn_blocking", reason = "use the spawn wrappers in `mz_ore::task` instead" }, { path = "tokio::runtime::Handle::spawn", reason = "use the spawn wrappers in `mz_ore::task` instead" }, { path = "tokio::runtime::Handle::spawn_blocking", reason = "use the spawn wrappers in `mz_ore::task` instead" }, { path = "tokio::runtime::Runtime::spawn", reason = "use the spawn wrappers in `mz_ore::task` instead" }, { path = "tokio::runtime::Runtime::spawn_blocking", reason = "use the spawn wrappers in `mz_ore::task` instead" }, # Note these wrappers aren't implemented yet, as we haven't needed them. { path = "tokio::task::spawn_local", reason = "use the spawn wrappers in `mz_ore::task` instead" }, { path = "tokio::task::LocalSet::spawn_local", reason = "use the spawn wrappers in `mz_ore::task` instead" }, # Note that `spawn_blocking` and the local varieties are not yet implemented, as they haven't been needed yet. { path = "tokio::task::JoinSet::spawn", reason = "use the spawn wrappers in `mz_ore::task` instead" }, { path = "tokio::task::JoinSet::spawn_on", reason = "use the spawn wrappers in `mz_ore::task` instead" }, { path = "tokio::task::JoinSet::spawn_blocking", reason = "use the spawn wrappers in `mz_ore::task` instead" }, { path = "tokio::task::JoinSet::spawn_blocking_on", reason = "use the spawn wrappers in `mz_ore::task` instead" }, { path = "tokio::task::JoinSet::spawn_local", reason = "use the spawn wrappers in `mz_ore::task` instead" }, { path = "tokio::task::JoinSet::spawn_local", reason = "use the spawn wrappers in `mz_ore::task` instead" }, # These are banned because we want to ensure people don't forget to use .name(...), so we require the use of `mz_ore` # We allow invalid because these paths only exist with tokio_unstable and feature tracing. # When these features are disabled, clippy warns about the path not existing. We don't use tokio_unstable in the cloud # repo, so clippy gives erroneous warnings about the path not referring to an existing function. { path = "tokio::task::Builder::spawn", reason = "use the spawn wrappers in `mz_ore::task` instead", allow-invalid = true }, { path = "tokio::task::Builder::spawn_on", reason = "use the spawn wrappers in `mz_ore::task` instead", allow-invalid = true }, { path = "tokio::task::Builder::spawn_blocking", reason = "use the spawn wrappers in `mz_ore::task` instead", allow-invalid = true }, { path = "tokio::task::Builder::spawn_blocking_on", reason = "use the spawn wrappers in `mz_ore::task` instead", allow-invalid = true }, { path = "tokio::task::Builder::spawn_local", reason = "use the spawn wrappers in `mz_ore::task` instead", allow-invalid = true }, { path = "tokio::task::join_set::Builder::spawn_local", reason = "use the spawn wrappers in `mz_ore::task` instead", allow-invalid = true }, { path = "tokio::task::join_set::Builder::spawn", reason = "use the spawn wrappers in `mz_ore::task` instead", allow-invalid = true }, { path = "tokio::task::join_set::Builder::spawn_on", reason = "use the spawn wrappers in `mz_ore::task` instead", allow-invalid = true }, { path = "tokio::task::join_set::Builder::spawn_local", reason = "use the spawn wrappers in `mz_ore::task` instead", allow-invalid = true }, { path = "tokio::task::join_set::Builder::spawn_local", reason = "use the spawn wrappers in `mz_ore::task` instead", allow-invalid = true }, { path = "rdkafka::config::ClientConfig::new", reason = "use the `client::create_new_client_config` wrapper in `kafka_util` instead" }, { path = "aws_config::defaults", reason = "use the `mz_aws_config::defaults` function instead" }, { path = "aws_config::load_defaults", reason = "use the `mz_aws_config::defaults` function instead" }, { path = "aws_config::from_env", reason = "use the `mz_aws_config::defaults` function instead" }, { path = "aws_config::load_from_env", reason = "use the `mz_aws_config::defaults` function instead" }, { path = "aws_sdk_s3::Client::new", reason = "use the `mz_aws_util::s3::new_client` function instead" }, # Prevent access to Differential APIs that want to use the default trace or use a default name, or where we offer # our own wrapper { path = "differential_dataflow::Collection::consolidate", reason = "use the `mz_timely_util::operator::CollectionExt::consolidate_named` function instead" }, { path = "differential_dataflow::Collection::consolidate_named", reason = "use the `mz_timely_util::operator::CollectionExt::consolidate_named` function instead" }, { path = "differential_dataflow::operators::arrange::arrangement::Arrange::arrange", reason = "use the `MzArrange::mz_arrange_named` function instead" }, { path = "differential_dataflow::operators::arrange::arrangement::Arrange::arrange_named", reason = "use the `MzArrange::mz_arrange_named` function instead" }, { path = "differential_dataflow::operators::arrange::arrangement::arrange_core", reason = "use the `MzArrange::mz_arrange_core` function instead" }, { path = "differential_dataflow::operators::arrange::arrangement::Arranged::reduce_abelian", reason = "use the `MzArrange::mz_arrange_core` function instead" }, { path = "differential_dataflow::operators::arrange::arrangement::Arranged::reduce_core", reason = "use the `MzArrange::mz_arrange_core` function instead" }, { path = "differential_dataflow::operators::arrange::arrangement::ArrangeByKey::arrange_by_key", reason = "use the `MzArrange::mz_arrange_named` function instead" }, { path = "differential_dataflow::operators::arrange::arrangement::ArrangeByKey::arrange_by_key_named", reason = "use the `MzArrange::mz_arrange_named` function instead" }, { path = "differential_dataflow::operators::arrange::arrangement::ArrangeBySelf::arrange_by_self", reason = "use the `MzArrange::mz_arrange_named` function instead" }, { path = "differential_dataflow::operators::arrange::arrangement::ArrangeBySelf::arrange_by_self_named", reason = "use the `MzArrange::mz_arrange_named` function instead" }, { path = "differential_dataflow::operators::reduce::Count::count", reason = "use the `differential_dataflow::operators::reduce::ReduceCore::reduce_abelian` function instead" }, { path = "differential_dataflow::operators::reduce::Count::count_core", reason = "use the `differential_dataflow::operators::reduce::ReduceCore::reduce_abelian` function instead" }, { path = "differential_dataflow::operators::reduce::Reduce::reduce", reason = "use the `differential_dataflow::operators::reduce::ReduceCore::reduce_abelian` function instead" }, { path = "differential_dataflow::operators::reduce::Reduce::reduce_named", reason = "use the `differential_dataflow::operators::reduce::ReduceCore::reduce_abelian` function instead" }, { path = "differential_dataflow::operators::reduce::ReduceCore::reduce_abelian", reason = "use the `differential_dataflow::operators::reduce::ReduceCore::reduce_abelian` function instead" }, { path = "differential_dataflow::operators::reduce::ReduceCore::reduce_core", reason = "use the `differential_dataflow::operators::reduce::ReduceCore::reduce_abelian` function instead" }, { path = "differential_dataflow::operators::reduce::Threshold::distinct", reason = "use the `differential_dataflow::operators::reduce::ReduceCore::reduce_abelian` function instead" }, { path = "differential_dataflow::operators::reduce::Threshold::distinct_core", reason = "use the `differential_dataflow::operators::reduce::ReduceCore::reduce_abelian` function instead" }, { path = "differential_dataflow::operators::reduce::Threshold::threshold", reason = "use the `differential_dataflow::operators::reduce::ReduceCore::reduce_abelian` function instead" }, { path = "differential_dataflow::operators::reduce::Threshold::threshold_named", reason = "use the `differential_dataflow::operators::reduce::ReduceCore::reduce_abelian` function instead" }, { path = "differential_dataflow::operators::join::Join::antijoin", reason = "use the `differential_dataflow::operators::join::Join::join_core` function instead" }, { path = "differential_dataflow::operators::join::Join::join_map", reason = "use the `differential_dataflow::operators::join::Join::join_core` function instead" }, { path = "differential_dataflow::operators::join::Join::semijoin", reason = "use the `differential_dataflow::operators::join::Join::join_core` function instead" }, # Panic when formatting the same value more than once, like our tracing macros do. { path = "itertools::Itertools::format", reason = "panics when passed to tracing macros; consider the methods in mz_ore::str instead" }, { path = "itertools::Itertools::format_with", reason = "panics when passed to tracing macros; consider the methods in mz_ore::str instead" }, ] disallowed-macros = [ { path = "proptest::prop_oneof", reason = "use `proptest::strategy::Union::new` instead" }, { path = "log::log", reason = "use the macros provided by `tracing` instead (database-issues#3001)" }, # TODO: Re-enable once is fixed. # { path = "tracing::instrument", reason = "use `mz_ore::instrument` instead" }, ] disallowed-types = [ { path = "std::collections::HashMap", reason = "use `std::collections::BTreeMap` or `mz_ore::collections::HashMap` instead" }, { path = "std::collections::HashSet", reason = "use `std::collections::BTreeSet` or `mz_ore::collections::HashSet` instead" }, ]