Skip to content

Commit 7eb00d5

Browse files
authored
refactor: Bump MSRV to 1.84 for preparing next release (#1185)
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> None ## What changes are included in this PR? Bump MSRV to 1.84 to get our community ready for the next release. Rust 1.84 is released on 9 January, 2025 which is 3 months ago. We need this PR in advance since we still need time to play well with rust 1.84 like using new deps or better APIs and so so. ## Are these changes tested? <!-- Specify what test covers (unit test, integration test, etc.). If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> --------- Signed-off-by: Xuanwo <[email protected]>
1 parent 687d857 commit 7eb00d5

File tree

22 files changed

+59
-53
lines changed

22 files changed

+59
-53
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ concurrency:
3030
cancel-in-progress: true
3131

3232
env:
33-
rust_msrv: "1.77.1"
33+
rust_msrv: "1.84.0"
3434

3535
jobs:
3636
check:

Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ homepage = "https://rust.iceberg.apache.org/"
3636
repository = "https://github.com/apache/iceberg-rust"
3737
license = "Apache-2.0"
3838
# Check the MSRV policy in README.md before changing this
39-
rust-version = "1.77.1"
39+
rust-version = "1.84"
4040

4141
[workspace.dependencies]
4242
anyhow = "1.0.72"
@@ -92,13 +92,14 @@ serde_json = "1.0.138"
9292
serde_repr = "0.1.16"
9393
serde_with = "3.4"
9494
tempfile = "3.18"
95-
thrift = "0.17.0"
95+
thrift = "0.17.0"
9696
tokio = { version = "1.44", default-features = false }
9797
typed-builder = "0.20"
9898
url = "2.5.4"
99-
uuid = { version = "1.13.1", features = ["v7"] }
99+
uuid = { version = "1.14", features = ["v7"] }
100100
volo-thrift = "0.10"
101101
hive_metastore = "0.1"
102102
tera = "1"
103103
zstd = "0.13.2"
104104
expect-test = "1"
105+
http = "1.1"

bindings/python/Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindings/python/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ name = "pyiceberg_core_rust"
2020
version = "0.4.0"
2121
edition = "2021"
2222
homepage = "https://rust.iceberg.apache.org"
23-
rust-version = "1.77.1"
23+
rust-version = "1.84"
2424
# This crate is used to build python bindings, we don't want to publish it
2525
publish = false
2626

crates/catalog/rest/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ keywords = ["iceberg", "rest", "catalog"]
3232
# async-trait = { workspace = true }
3333
async-trait = { workspace = true }
3434
chrono = { workspace = true }
35-
http = "1.1.0"
35+
http = { workspace = true }
3636
iceberg = { workspace = true }
3737
itertools = { workspace = true }
3838
log = { workspace = true }

crates/catalog/rest/src/types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,14 @@ pub(super) struct ListNamespaceResponse {
129129
pub(super) next_page_token: Option<String>,
130130
}
131131

132+
#[allow(dead_code)]
132133
#[derive(Debug, Serialize, Deserialize)]
133134
pub(super) struct UpdateNamespacePropsRequest {
134135
removals: Option<Vec<String>>,
135136
updates: Option<HashMap<String, String>>,
136137
}
137138

139+
#[allow(dead_code)]
138140
#[derive(Debug, Serialize, Deserialize)]
139141
pub(super) struct UpdateNamespacePropsResponse {
140142
updated: Vec<String>,

crates/catalog/s3tables/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ name = "iceberg-catalog-s3tables"
2020
version = { workspace = true }
2121
edition = { workspace = true }
2222
homepage = { workspace = true }
23-
rust-version = "1.81.0"
23+
rust-version = { workspace = true }
2424

2525
categories = ["database"]
2626
description = "Apache Iceberg Rust S3Tables Catalog"

crates/catalog/s3tables/src/catalog.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl S3TablesCatalog {
8282
)
8383
})?;
8484

85-
let file_io = FileIO::from_path(&format!("s3://{}", bucket_name))?
85+
let file_io = FileIO::from_path(format!("s3://{}", bucket_name))?
8686
.with_props(&config.properties)
8787
.build()?;
8888

crates/iceberg/src/arrow/reader.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ impl ArrowReader {
540540
f.metadata()
541541
.get(PARQUET_FIELD_ID_META_KEY)
542542
.and_then(|field_id| i32::from_str(field_id).ok())
543-
.map_or(false, |field_id| {
543+
.is_some_and(|field_id| {
544544
projected_fields.insert((*f).clone(), field_id);
545545
leaf_field_ids.contains(&field_id)
546546
})
@@ -992,7 +992,7 @@ fn project_column(
992992
type PredicateResult =
993993
dyn FnMut(RecordBatch) -> std::result::Result<BooleanArray, ArrowError> + Send + 'static;
994994

995-
impl<'a> BoundPredicateVisitor for PredicateConverter<'a> {
995+
impl BoundPredicateVisitor for PredicateConverter<'_> {
996996
type T = Box<PredicateResult>;
997997

998998
fn always_true(&mut self) -> Result<Box<PredicateResult>> {

crates/iceberg/src/catalog/mod.rs

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ pub enum TableRequirement {
361361
/// TableUpdate represents an update to a table in the catalog.
362362
#[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
363363
#[serde(tag = "action", rename_all = "kebab-case")]
364+
#[allow(clippy::large_enum_variant)]
364365
pub enum TableUpdate {
365366
/// Upgrade table's format version
366367
#[serde(rename_all = "kebab-case")]
@@ -750,6 +751,7 @@ pub struct ViewCreation {
750751
/// ViewUpdate represents an update to a view in the catalog.
751752
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
752753
#[serde(tag = "action", rename_all = "kebab-case")]
754+
#[allow(clippy::large_enum_variant)]
753755
pub enum ViewUpdate {
754756
/// Assign a new UUID to the view
755757
#[serde(rename_all = "kebab-case")]
@@ -1125,7 +1127,7 @@ mod tests {
11251127
{
11261128
"type": "assert-ref-snapshot-id",
11271129
"ref": "snapshot-name",
1128-
"snapshot-id": null
1130+
"snapshot-id": null
11291131
}
11301132
"#,
11311133
TableRequirement::RefSnapshotIdMatch {
@@ -1245,7 +1247,7 @@ mod tests {
12451247
{
12461248
"action": "assign-uuid",
12471249
"uuid": "2cc52516-5e73-41f2-b139-545d41a4e151"
1248-
}
1250+
}
12491251
"#,
12501252
TableUpdate::AssignUuid {
12511253
uuid: uuid!("2cc52516-5e73-41f2-b139-545d41a4e151"),
@@ -1260,7 +1262,7 @@ mod tests {
12601262
{
12611263
"action": "upgrade-format-version",
12621264
"format-version": 2
1263-
}
1265+
}
12641266
"#,
12651267
TableUpdate::UpgradeFormatVersion {
12661268
format_version: FormatVersion::V2,
@@ -1569,7 +1571,7 @@ mod tests {
15691571
1,
15701572
2
15711573
]
1572-
}
1574+
}
15731575
"#;
15741576

15751577
let update = TableUpdate::RemoveSnapshots {
@@ -1629,7 +1631,7 @@ mod tests {
16291631
"min-snapshots-to-keep": 2,
16301632
"max-snapshot-age-ms": 3,
16311633
"max-ref-age-ms": 4
1632-
}
1634+
}
16331635
"#;
16341636

16351637
let update = TableUpdate::SetSnapshotRef {
@@ -1656,7 +1658,7 @@ mod tests {
16561658
"prop1": "v1",
16571659
"prop2": "v2"
16581660
}
1659-
}
1661+
}
16601662
"#;
16611663

16621664
let update = TableUpdate::SetProperties {
@@ -1680,7 +1682,7 @@ mod tests {
16801682
"prop1",
16811683
"prop2"
16821684
]
1683-
}
1685+
}
16841686
"#;
16851687

16861688
let update = TableUpdate::RemoveProperties {
@@ -1742,7 +1744,7 @@ mod tests {
17421744
{
17431745
"action": "assign-uuid",
17441746
"uuid": "2cc52516-5e73-41f2-b139-545d41a4e151"
1745-
}
1747+
}
17461748
"#,
17471749
ViewUpdate::AssignUuid {
17481750
uuid: uuid!("2cc52516-5e73-41f2-b139-545d41a4e151"),
@@ -1757,7 +1759,7 @@ mod tests {
17571759
{
17581760
"action": "upgrade-format-version",
17591761
"format-version": 1
1760-
}
1762+
}
17611763
"#,
17621764
ViewUpdate::UpgradeFormatVersion {
17631765
format_version: ViewFormatVersion::V1,
@@ -1825,7 +1827,7 @@ mod tests {
18251827
{
18261828
"action": "set-location",
18271829
"location": "s3://db/view"
1828-
}
1830+
}
18291831
"#,
18301832
ViewUpdate::SetLocation {
18311833
location: "s3://db/view".to_string(),
@@ -1843,7 +1845,7 @@ mod tests {
18431845
"prop1": "v1",
18441846
"prop2": "v2"
18451847
}
1846-
}
1848+
}
18471849
"#,
18481850
ViewUpdate::SetProperties {
18491851
updates: vec![
@@ -1866,7 +1868,7 @@ mod tests {
18661868
"prop1",
18671869
"prop2"
18681870
]
1869-
}
1871+
}
18701872
"#,
18711873
ViewUpdate::RemoveProperties {
18721874
removals: vec!["prop1".to_string(), "prop2".to_string()],
@@ -1895,7 +1897,7 @@ mod tests {
18951897
"dialect" : "spark"
18961898
} ]
18971899
}
1898-
}
1900+
}
18991901
"#,
19001902
ViewUpdate::AddViewVersion {
19011903
view_version: ViewVersion::builder()
@@ -1925,7 +1927,7 @@ mod tests {
19251927
{
19261928
"action": "set-current-view-version",
19271929
"view-version-id": 1
1928-
}
1930+
}
19291931
"#,
19301932
ViewUpdate::SetCurrentViewVersion { view_version_id: 1 },
19311933
);
@@ -1938,7 +1940,7 @@ mod tests {
19381940
{
19391941
"action": "remove-partition-specs",
19401942
"spec-ids": [1, 2]
1941-
}
1943+
}
19421944
"#,
19431945
TableUpdate::RemovePartitionSpecs {
19441946
spec_ids: vec![1, 2],
@@ -1972,7 +1974,7 @@ mod tests {
19721974
}
19731975
]
19741976
}
1975-
}
1977+
}
19761978
"#,
19771979
TableUpdate::SetStatistics {
19781980
statistics: StatisticsFile {
@@ -2002,7 +2004,7 @@ mod tests {
20022004
{
20032005
"action": "remove-statistics",
20042006
"snapshot-id": 1940541653261589030
2005-
}
2007+
}
20062008
"#,
20072009
TableUpdate::RemoveStatistics {
20082010
snapshot_id: 1940541653261589030,

0 commit comments

Comments
 (0)