Skip to content

Commit

Permalink
Update Bazel-tracked toolchains
Browse files Browse the repository at this point in the history
Includes Rust 1.76.0, Rust nightly, zig-cc and python.

Fixes a bug in `ExistenceItem` where we didn't properly return the
content length.
  • Loading branch information
aaronmondal committed Mar 2, 2024
1 parent b9029bb commit 3126b57
Show file tree
Hide file tree
Showing 21 changed files with 11 additions and 43 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

26 changes: 6 additions & 20 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module(

bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "platforms", version = "0.0.8")
bazel_dep(name = "rules_python", version = "0.29.0")
bazel_dep(name = "rules_python", version = "0.31.0")

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
Expand All @@ -18,41 +18,27 @@ python.toolchain(
)
use_repo(python, python = "python_versions")

bazel_dep(name = "hermetic_cc_toolchain", version = "2.2.1")
bazel_dep(name = "hermetic_cc_toolchain", version = "3.0.1")

zig_toolchains = use_extension(
"@hermetic_cc_toolchain//toolchain:ext.bzl",
"toolchains",
)
use_repo(zig_toolchains, "zig_sdk")

bazel_dep(name = "rules_rust", version = "0.36.2")
git_override(
module_name = "rules_rust",
commit = "4136f6fedd033108294138a657b4ccd8ac57c8ef",
patch_strip = 1,
patches = [
# TODO(aaronmondal): Remove this after:
# https://github.com/bazelbuild/rules_rust/pull/2428
"//tools:rules_rust_deduplicate_sysroot.diff",
# TODO(aaronmondal): Remove this after:
# https://github.com/bazelbuild/rules_rust/pull/2422
"//tools:rules_rust_bindgen_linkopts.diff",
],
remote = "https://github.com/bazelbuild/rules_rust",
)
bazel_dep(name = "rules_rust", version = "0.40.0")

rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
edition = "2021",
versions = [
"1.75.0",
"nightly/2024-01-01",
"1.76.0",
"nightly/2024-03-01",
],
)
rust.host_tools(
edition = "2021",
version = "1.75.0",
version = "1.76.0",
)
use_repo(rust, "rust_toolchains")

Expand Down
2 changes: 0 additions & 2 deletions nativelink-error/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::result::Result;

use prost_types::TimestampError;

#[macro_export]
Expand Down
1 change: 0 additions & 1 deletion nativelink-proto/gen_protos_tool.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::path::PathBuf;
use std::vec::Vec;

use clap::{Arg, ArgAction, Command};
use prost_build::Config;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

use std::collections::HashMap;
use std::iter::FromIterator;
use std::sync::Arc;
use std::time::UNIX_EPOCH;

Expand Down
1 change: 0 additions & 1 deletion nativelink-service/src/ac_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

use std::collections::HashMap;
use std::convert::TryInto;
use std::pin::Pin;
use std::sync::Arc;
use std::time::Instant;
Expand Down
1 change: 0 additions & 1 deletion nativelink-service/src/bytestream_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

use std::collections::hash_map::Entry;
use std::collections::HashMap;
use std::convert::TryFrom;
use std::fmt::{Debug, Formatter};
use std::pin::Pin;
use std::sync::atomic::{AtomicU64, Ordering};
Expand Down
1 change: 0 additions & 1 deletion nativelink-service/src/cas_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

use std::collections::HashMap;
use std::convert::TryFrom;
use std::pin::Pin;
use std::sync::Arc;
use std::time::Instant;
Expand Down
1 change: 0 additions & 1 deletion nativelink-service/tests/bytestream_server_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::convert::TryFrom;
use std::pin::Pin;
use std::sync::Arc;

Expand Down
1 change: 0 additions & 1 deletion nativelink-store/src/ac_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
// THREADSAFETY. FIGURE OUT WHY AND MOVE IT TO UTILS.
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

use std::default::Default;
use std::pin::Pin;

use bytes::{Bytes, BytesMut};
Expand Down
2 changes: 1 addition & 1 deletion nativelink-store/src/compression_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::sync::Arc;

use async_trait::async_trait;
use bincode::config::{FixintEncoding, WithOtherIntEncoding};
use bincode::{self, DefaultOptions, Options};
use bincode::{DefaultOptions, Options};
use byteorder::{ByteOrder, LittleEndian};
use bytes::{Buf, BufMut, BytesMut};
use futures::future::FutureExt;
Expand Down
2 changes: 1 addition & 1 deletion nativelink-store/src/dedup_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::sync::Arc;

use async_trait::async_trait;
use bincode::config::{FixintEncoding, WithOtherIntEncoding};
use bincode::{self, DefaultOptions, Options};
use bincode::{DefaultOptions, Options};
use futures::stream::{self, FuturesOrdered, StreamExt, TryStreamExt};
use nativelink_error::{make_err, Code, Error, ResultExt};
use nativelink_util::buf_channel::{DropCloserReadHalf, DropCloserWriteHalf, StreamReader};
Expand Down
3 changes: 1 addition & 2 deletions nativelink-store/src/existence_cache_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::mem::size_of;
use std::pin::Pin;
use std::sync::Arc;
use std::time::SystemTime;
Expand All @@ -33,7 +32,7 @@ struct ExistanceItem(usize);
impl LenEntry for ExistanceItem {
#[inline]
fn len(&self) -> usize {
size_of::<Self>()
self.0
}

#[inline]
Expand Down
1 change: 0 additions & 1 deletion nativelink-store/src/grpc_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::marker::Send;
use std::pin::Pin;
use std::sync::Arc;
use std::task::{Context, Poll};
Expand Down
1 change: 0 additions & 1 deletion nativelink-store/src/s3_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

use std::borrow::Cow;
use std::future::Future;
use std::marker::Send;
use std::pin::Pin;
use std::sync::Arc;
use std::task::{Context, Poll};
Expand Down
1 change: 0 additions & 1 deletion nativelink-store/src/verify_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::convert::TryFrom;
use std::pin::Pin;
use std::sync::Arc;

Expand Down
1 change: 0 additions & 1 deletion nativelink-util/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

use std::cmp::Ordering;
use std::collections::HashMap;
use std::convert::{TryFrom, TryInto};
use std::fmt;
use std::future::Future;
use std::hash::Hash;
Expand Down
1 change: 0 additions & 1 deletion nativelink-util/src/health_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use std::borrow::Cow;
use std::collections::HashMap;
use std::fmt::Debug;
use std::marker::Send;
use std::pin::Pin;
use std::sync::Arc;

Expand Down
1 change: 0 additions & 1 deletion nativelink-util/src/store_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use std::borrow::Cow;
use std::collections::hash_map::DefaultHasher as StdHasher;
use std::hash::{Hash, Hasher};
use std::marker::Send;
use std::pin::Pin;
use std::sync::{Arc, OnceLock};

Expand Down
1 change: 0 additions & 1 deletion nativelink-util/tests/fastcdc_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

use std::collections::{HashMap, HashSet};
use std::io::Cursor;
use std::marker::Unpin;

use bytes::Bytes;
use futures::stream::StreamExt;
Expand Down
1 change: 0 additions & 1 deletion nativelink-util/tests/health_utils_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

use std::borrow::Cow;
use std::collections::HashSet;
use std::iter::FromIterator;
use std::sync::Arc;

use futures::StreamExt;
Expand Down

0 comments on commit 3126b57

Please sign in to comment.