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 Rust to 1.74.0 #4390

Merged
merged 6 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
10 changes: 5 additions & 5 deletions .github/workflows/contrib_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
name: Check if running codegen would produce any changes
runs-on: ubuntu-latest-16-cores
container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0
steps:
# Note: We explicitly don't override `ref` here. We need to see if changes would be made
# in a context where we have merged with main. Otherwise we might miss changes such as one
Expand All @@ -109,7 +109,7 @@ jobs:
name: Rust lints (fmt, check, cranky, tests, doc)
runs-on: ubuntu-latest-16-cores
container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
name: Check Rust web build (wasm32 + wasm-bindgen)
runs-on: ubuntu-latest-16-cores
container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -267,7 +267,7 @@ jobs:
name: Cargo Deny
runs-on: ubuntu-latest
container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0
steps:
- uses: actions/checkout@v4

Expand All @@ -293,7 +293,7 @@ jobs:
name: C++ tests
runs-on: ubuntu-latest
container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/contrib_rerun_py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
name: Build Wheels
runs-on: ubuntu-latest-16-cores
container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on_push_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.72.1
toolchain: 1.74.0

- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
runs-on: ubuntu-latest-16-cores

container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_and_upload_rerun_c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
linux)
runner="ubuntu-latest-16-cores"
target="x86_64-unknown-linux-gnu"
container="{'image': 'rerunio/ci_docker:0.10.0'}"
container="{'image': 'rerunio/ci_docker:0.11.0'}"
lib_name="librerun_c.a"
;;
windows)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_and_upload_rerun_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
linux)
runner="ubuntu-latest-16-cores"
target="x86_64-unknown-linux-gnu"
container="{'image': 'rerunio/ci_docker:0.10.0'}"
container="{'image': 'rerunio/ci_docker:0.11.0'}"
bin_name="rerun"
;;
windows)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest-16-cores

container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
runs-on: ubuntu-latest-16-cores

container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_web_demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest-16-cores

container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
linux)
runner="ubuntu-latest-16-cores"
target="x86_64-unknown-linux-gnu"
container="{'image': 'rerunio/ci_docker:0.10.0'}"
container="{'image': 'rerunio/ci_docker:0.11.0'}"
;;
windows)
runner="windows-latest-8-cores"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_bundle_and_upload_rerun_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
# Need container for arrow dependency.
container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0

steps:
- name: Checkout repository
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/reusable_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
name: Check if running codegen would produce any changes
runs-on: ubuntu-latest-16-cores
container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0
env:
RUSTC_WRAPPER: "sccache"
steps:
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
name: Rust lints (fmt, check, cranky, tests, doc)
runs-on: ubuntu-latest-16-cores
container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0
env:
RUSTC_WRAPPER: "sccache"
steps:
Expand Down Expand Up @@ -236,7 +236,7 @@ jobs:
name: Check Rust web build (wasm32 + wasm-bindgen)
runs-on: ubuntu-latest-16-cores
container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0
env:
RUSTC_WRAPPER: "sccache"
steps:
Expand Down Expand Up @@ -356,7 +356,7 @@ jobs:
name: Cargo Deny
runs-on: ubuntu-latest
container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
needs: [py-deploy-docs]
runs-on: ubuntu-latest-16-cores
container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0
steps:
- name: Show context
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_run_notebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_test_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
linux)
runner="ubuntu-latest-16-cores"
target="x86_64-unknown-linux-gnu"
container="{'image': 'rerunio/ci_docker:0.10.0'}"
container="{'image': 'rerunio/ci_docker:0.11.0'}"
;;
windows)
runner="windows-latest-8-cores"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_upload_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: rerunio/ci_docker:0.10.0
image: rerunio/ci_docker:0.11.0

permissions:
contents: "read"
Expand Down
4 changes: 2 additions & 2 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ Finally, run the following script to install the dependencies and CLI tools need
./scripts/setup_dev.sh
```

Make sure `cargo --version` prints `1.72.1` once you are done.
Make sure `cargo --version` prints `1.74.0` once you are done.

If you are using an Apple-silicon Mac (M1, M2), make sure `rustc -vV` outputs `host: aarch64-apple-darwin`. If not, this should fix it:

```sh
rustup set default-host aarch64-apple-darwin && rustup install 1.72.1
rustup set default-host aarch64-apple-darwin && rustup install 1.74.0
```

## Building and running the viewer
Expand Down
4 changes: 2 additions & 2 deletions ci_docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ubuntu:20.04
LABEL maintainer="[email protected]"
# Remember to update the version in publish.sh
# TODO(jleibs) use this version in the publish.sh script and below in the CACHE_KEY
LABEL version="0.10.0"
LABEL version="0.11.0"
LABEL description="Docker image used for the CI of https://github.com/rerun-io/rerun"

# Install the ubuntu package dependencies
Expand Down Expand Up @@ -65,7 +65,7 @@ RUN curl -L https://github.com/NixOS/patchelf/releases/download/0.17.2/patchelf-
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=1.72.1 \
RUST_VERSION=1.74.0 \
RUSTUP_VERSION=1.26.0

# Install Rust
Expand Down
2 changes: 1 addition & 1 deletion ci_docker/publish.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -eux

VERSION=0.10.0 # Bump on each new version. Remember to update the version in the Dockerfile too.
VERSION=0.11.0 # Bump on each new version. Remember to update the version in the Dockerfile too.

# The build needs to run from top of repo to access the requirements.txt
cd `git rev-parse --show-toplevel`
Expand Down
2 changes: 1 addition & 1 deletion crates/re_analytics/src/native/sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub(crate) struct PostHogSink {}

impl PostHogSink {
/// Our public telemetry endpoint.
const URL: &str = "https://tel.rerun.io";
const URL: &'static str = "https://tel.rerun.io";

#[allow(clippy::unused_self)]
pub(crate) fn send(
Expand Down
2 changes: 1 addition & 1 deletion crates/re_analytics/src/web/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fn get_local_storage() -> Result<Storage, ConfigError> {
}

impl Config {
const STORAGE_KEY: &str = "rerun_config";
const STORAGE_KEY: &'static str = "rerun_config";

#[allow(clippy::unnecessary_wraps)]
pub fn new() -> Result<Self, ConfigError> {
Expand Down
2 changes: 1 addition & 1 deletion crates/re_analytics/src/web/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub struct Pipeline {

impl Pipeline {
// NOTE: different from the native URL, this one is _specifically_ for web.
const URL: &str = "https://tel.rerun.io/api/pog";
const URL: &'static str = "https://tel.rerun.io/api/pog";

pub(crate) fn new(config: &Config, _tick: Duration) -> Result<Option<Self>, PipelineError> {
Ok(Some(Pipeline {
Expand Down
2 changes: 1 addition & 1 deletion crates/re_build_info/src/build_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ fn crate_version_from_build_info_string() {
patch: 0,
meta: Some(crate::crate_version::Meta::DevAlpha(7)),
},
rustc_version: "1.72.1 (d5c2e9c34 2023-09-13)",
rustc_version: "1.74.0 (d5c2e9c34 2023-09-13)",
llvm_version: "16.0.5",
git_hash: "",
git_branch: "",
Expand Down
2 changes: 1 addition & 1 deletion crates/re_log_types/src/data_row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ impl DataRow {

let data_cells = comp_batches
.into_iter()
.map(|batch| DataCell::from_component_batch(batch))
.map(DataCell::from_component_batch)
.collect::<Result<Vec<DataCell>, _>>()?;

// TODO(emilk): should `DataRow::from_cells` calculate `num_instances` instead?
Expand Down
6 changes: 3 additions & 3 deletions crates/re_log_types/src/data_table_batcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ impl DataTableBatcherConfig {
};

/// Environment variable to configure [`Self::flush_tick`].
pub const ENV_FLUSH_TICK: &str = "RERUN_FLUSH_TICK_SECS";
pub const ENV_FLUSH_TICK: &'static str = "RERUN_FLUSH_TICK_SECS";

/// Environment variable to configure [`Self::flush_num_bytes`].
pub const ENV_FLUSH_NUM_BYTES: &str = "RERUN_FLUSH_NUM_BYTES";
pub const ENV_FLUSH_NUM_BYTES: &'static str = "RERUN_FLUSH_NUM_BYTES";

/// Environment variable to configure [`Self::flush_num_rows`].
pub const ENV_FLUSH_NUM_ROWS: &str = "RERUN_FLUSH_NUM_ROWS";
pub const ENV_FLUSH_NUM_ROWS: &'static str = "RERUN_FLUSH_NUM_ROWS";

/// Creates a new `DataTableBatcherConfig` using the default values, optionally overridden
/// through the environment.
Expand Down
4 changes: 2 additions & 2 deletions crates/re_renderer/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub struct ImportClause {
}

impl ImportClause {
pub const PREFIX: &str = "#import ";
pub const PREFIX: &'static str = "#import ";
}

impl<P: Into<PathBuf>> From<P> for ImportClause {
Expand Down Expand Up @@ -171,7 +171,7 @@ pub fn init() {
"#
.to_owned();

let walker = WalkDir::new(&shader_dir).into_iter();
let walker = WalkDir::new(shader_dir).into_iter();
let entries = {
let mut entries = walker
.filter_entry(is_wgsl_or_dir)
Expand Down
2 changes: 1 addition & 1 deletion crates/re_renderer/src/file_resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ pub struct ImportClause {
}

impl ImportClause {
pub const PREFIX: &str = "#import ";
pub const PREFIX: &'static str = "#import ";
}

impl<P: Into<PathBuf>> From<P> for ImportClause {
Expand Down
3 changes: 1 addition & 2 deletions crates/re_sdk/src/recording_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -803,8 +803,7 @@ impl RecordingStream {
// extension.
use re_log_types::external::arrow2::datatypes::DataType;
let DataType::Extension(fqname, _, _) = field.data_type else {
return Err(SerializationError::missing_extension_metadata(field.name))
.map_err(Into::into);
return Err(SerializationError::missing_extension_metadata(field.name).into());
};
DataCell::try_from_arrow(fqname.into(), array)
})
Expand Down
4 changes: 2 additions & 2 deletions crates/re_space_view/src/data_query_blueprint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ impl DataQueryBlueprint {
}

impl DataQueryBlueprint {
pub const INDIVIDUAL_OVERRIDES_PREFIX: &str = "individual_overrides";
pub const RECURSIVE_OVERRIDES_PREFIX: &str = "recursive_overrides";
pub const INDIVIDUAL_OVERRIDES_PREFIX: &'static str = "individual_overrides";
pub const RECURSIVE_OVERRIDES_PREFIX: &'static str = "recursive_overrides";

pub fn new<'a>(
space_view_class_name: SpaceViewClassName,
Expand Down
4 changes: 2 additions & 2 deletions crates/re_space_view/src/space_view_contents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ pub struct SpaceViewContents {

/// Determine whether this `DataBlueprintTree` has user-edits relative to another `DataBlueprintTree`
impl SpaceViewContents {
pub const INDIVIDUAL_OVERRIDES_PREFIX: &str = "individual_overrides";
pub const GROUP_OVERRIDES_PREFIX: &str = "group_overrides";
pub const INDIVIDUAL_OVERRIDES_PREFIX: &'static str = "individual_overrides";
pub const GROUP_OVERRIDES_PREFIX: &'static str = "group_overrides";

pub fn has_edits(&self, other: &Self) -> bool {
let Self {
Expand Down
2 changes: 1 addition & 1 deletion crates/re_string_interner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl nohash_hasher::IsEnabled for InternedString {}

impl std::cmp::PartialOrd for InternedString {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
Wumpf marked this conversation as resolved.
Show resolved Hide resolved
self.string.partial_cmp(other.string)
Some(self.string.cmp(other.string))
}
}

Expand Down
Loading
Loading