Skip to content

Commit eef9b42

Browse files
authored
chore(ci): omit blanket/auto-trait/auto-derived impls from public API (#2542)
#2525 introduced public-api files but after writing https://github.com/apache/iceberg-rust/pull/2541/changes I realised this might be a little too noisy since it incudes all auto-trait like `Send` `Sync` etc. Options are: * -s Omits blanket impls (From<T>, Into<U>, Borrow, Any, etc.) * -ss Also omits auto-trait impls (Send, Sync, Unpin, Freeze, etc.) * -sss Also omits auto-derived impls (Clone, Debug, Eq) I think -sss is enough for reviewers to be made aware of public API changes without it being so noisy that we don't pay attention to the actual changes. Downside is it's less "accurate" in the sense that a PR might introduce a change to the public API that wouldn't be caught in these tests so there's some sort of balance we need to strike here. Interested to know what the community thinks. ## 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. --> - Closes #. ## What changes are included in this PR? Pass -sss to cargo-public-api to reduce noise in public-api.txt files. This removes ~13k lines of auto-generated blanket impls, auto-trait impls, and auto-derived impls that obscure actual API surface changes in diffs. <!-- Provide a summary of the modifications in this PR. List the main changes such as new features, bug fixes, refactoring, or any other updates. --> ## 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)? -->
1 parent 0ce3069 commit eef9b42

11 files changed

Lines changed: 2 additions & 12197 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ generate-public-api: install-cargo-public-api
6565
manifest=$${entry##*:}; \
6666
crate_dir=$$(dirname "$$manifest"); \
6767
echo "Generating public API for $$crate..."; \
68-
cargo public-api -p "$$crate" --all-features > "$$crate_dir/public-api.txt"; \
68+
cargo public-api -p "$$crate" --all-features -ss > "$$crate_dir/public-api.txt"; \
6969
done
7070

7171
check-public-api: install-cargo-public-api
@@ -75,7 +75,7 @@ check-public-api: install-cargo-public-api
7575
manifest=$${entry##*:}; \
7676
crate_dir=$$(dirname "$$manifest"); \
7777
echo "Checking public API for $$crate..."; \
78-
cargo public-api -p "$$crate" --all-features | diff - "$$crate_dir/public-api.txt" || { \
78+
cargo public-api -p "$$crate" --all-features -ss | diff - "$$crate_dir/public-api.txt" || { \
7979
echo "ERROR: Public API for $$crate has changed. Run 'make generate-public-api' to update."; \
8080
fail=1; \
8181
}; \

crates/catalog/glue/public-api.txt

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -21,56 +21,6 @@ pub fn iceberg_catalog_glue::GlueCatalog::rename_table<'life0, 'life1, 'life2, '
2121
pub fn iceberg_catalog_glue::GlueCatalog::table_exists<'life0, 'life1, 'async_trait>(&'life0 self, table: &'life1 iceberg::catalog::TableIdent) -> core::pin::Pin<alloc::boxed::Box<(dyn core::future::future::Future<Output = iceberg::error::Result<bool>> + core::marker::Send + 'async_trait)>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait
2222
pub fn iceberg_catalog_glue::GlueCatalog::update_namespace<'life0, 'life1, 'async_trait>(&'life0 self, namespace: &'life1 iceberg::catalog::NamespaceIdent, properties: std::collections::hash::map::HashMap<alloc::string::String, alloc::string::String>) -> core::pin::Pin<alloc::boxed::Box<(dyn core::future::future::Future<Output = iceberg::error::Result<()>> + core::marker::Send + 'async_trait)>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait
2323
pub fn iceberg_catalog_glue::GlueCatalog::update_table<'life0, 'async_trait>(&'life0 self, commit: iceberg::catalog::TableCommit) -> core::pin::Pin<alloc::boxed::Box<(dyn core::future::future::Future<Output = iceberg::error::Result<iceberg::table::Table>> + core::marker::Send + 'async_trait)>> where Self: 'async_trait, 'life0: 'async_trait
24-
impl core::marker::Freeze for iceberg_catalog_glue::GlueCatalog
25-
impl core::marker::Send for iceberg_catalog_glue::GlueCatalog
26-
impl core::marker::Sync for iceberg_catalog_glue::GlueCatalog
27-
impl core::marker::Unpin for iceberg_catalog_glue::GlueCatalog
28-
impl !core::panic::unwind_safe::RefUnwindSafe for iceberg_catalog_glue::GlueCatalog
29-
impl !core::panic::unwind_safe::UnwindSafe for iceberg_catalog_glue::GlueCatalog
30-
impl<T, U> core::convert::Into<U> for iceberg_catalog_glue::GlueCatalog where U: core::convert::From<T>
31-
pub fn iceberg_catalog_glue::GlueCatalog::into(self) -> U
32-
impl<T, U> core::convert::TryFrom<U> for iceberg_catalog_glue::GlueCatalog where U: core::convert::Into<T>
33-
pub type iceberg_catalog_glue::GlueCatalog::Error = core::convert::Infallible
34-
pub fn iceberg_catalog_glue::GlueCatalog::try_from(value: U) -> core::result::Result<T, <T as core::convert::TryFrom<U>>::Error>
35-
impl<T, U> core::convert::TryInto<U> for iceberg_catalog_glue::GlueCatalog where U: core::convert::TryFrom<T>
36-
pub type iceberg_catalog_glue::GlueCatalog::Error = <U as core::convert::TryFrom<T>>::Error
37-
pub fn iceberg_catalog_glue::GlueCatalog::try_into(self) -> core::result::Result<U, <U as core::convert::TryFrom<T>>::Error>
38-
impl<T> as_any::AsAny for iceberg_catalog_glue::GlueCatalog where T: core::any::Any
39-
pub fn iceberg_catalog_glue::GlueCatalog::as_any(&self) -> &(dyn core::any::Any + 'static)
40-
pub fn iceberg_catalog_glue::GlueCatalog::as_any_mut(&mut self) -> &mut (dyn core::any::Any + 'static)
41-
pub fn iceberg_catalog_glue::GlueCatalog::type_name(&self) -> &'static str
42-
impl<T> as_any::Downcast for iceberg_catalog_glue::GlueCatalog where T: as_any::AsAny + ?core::marker::Sized
43-
impl<T> core::any::Any for iceberg_catalog_glue::GlueCatalog where T: 'static + ?core::marker::Sized
44-
pub fn iceberg_catalog_glue::GlueCatalog::type_id(&self) -> core::any::TypeId
45-
impl<T> core::borrow::Borrow<T> for iceberg_catalog_glue::GlueCatalog where T: ?core::marker::Sized
46-
pub fn iceberg_catalog_glue::GlueCatalog::borrow(&self) -> &T
47-
impl<T> core::borrow::BorrowMut<T> for iceberg_catalog_glue::GlueCatalog where T: ?core::marker::Sized
48-
pub fn iceberg_catalog_glue::GlueCatalog::borrow_mut(&mut self) -> &mut T
49-
impl<T> core::convert::From<T> for iceberg_catalog_glue::GlueCatalog
50-
pub fn iceberg_catalog_glue::GlueCatalog::from(t: T) -> T
51-
impl<T> crossbeam_epoch::atomic::Pointable for iceberg_catalog_glue::GlueCatalog
52-
pub type iceberg_catalog_glue::GlueCatalog::Init = T
53-
pub const iceberg_catalog_glue::GlueCatalog::ALIGN: usize
54-
pub unsafe fn iceberg_catalog_glue::GlueCatalog::deref<'a>(ptr: usize) -> &'a T
55-
pub unsafe fn iceberg_catalog_glue::GlueCatalog::deref_mut<'a>(ptr: usize) -> &'a mut T
56-
pub unsafe fn iceberg_catalog_glue::GlueCatalog::drop(ptr: usize)
57-
pub unsafe fn iceberg_catalog_glue::GlueCatalog::init(init: <T as crossbeam_epoch::atomic::Pointable>::Init) -> usize
58-
impl<T> either::into_either::IntoEither for iceberg_catalog_glue::GlueCatalog
59-
impl<T> opendal_core::raw::futures_util::MaybeSend for iceberg_catalog_glue::GlueCatalog where T: core::marker::Send
60-
impl<T> reqsign_core::futures_util::MaybeSend for iceberg_catalog_glue::GlueCatalog where T: core::marker::Send
61-
impl<T> tower_http::follow_redirect::policy::PolicyExt for iceberg_catalog_glue::GlueCatalog where T: ?core::marker::Sized
62-
pub fn iceberg_catalog_glue::GlueCatalog::and<P, B, E>(self, other: P) -> tower_http::follow_redirect::policy::and::And<T, P> where T: tower_http::follow_redirect::policy::Policy<B, E>, P: tower_http::follow_redirect::policy::Policy<B, E>
63-
pub fn iceberg_catalog_glue::GlueCatalog::or<P, B, E>(self, other: P) -> tower_http::follow_redirect::policy::or::Or<T, P> where T: tower_http::follow_redirect::policy::Policy<B, E>, P: tower_http::follow_redirect::policy::Policy<B, E>
64-
impl<T> tracing::instrument::Instrument for iceberg_catalog_glue::GlueCatalog
65-
impl<T> tracing::instrument::WithSubscriber for iceberg_catalog_glue::GlueCatalog
66-
impl<T> typenum::type_operators::Same for iceberg_catalog_glue::GlueCatalog
67-
pub type iceberg_catalog_glue::GlueCatalog::Output = T
68-
impl<U> bnum::cast::As for iceberg_catalog_glue::GlueCatalog
69-
pub fn iceberg_catalog_glue::GlueCatalog::as_<T>(self) -> T where T: bnum::cast::CastFrom<U>
70-
impl<Unshared, Shared> aws_smithy_runtime_api::shared::IntoShared<Shared> for iceberg_catalog_glue::GlueCatalog where Shared: aws_smithy_runtime_api::shared::FromUnshared<Unshared>
71-
pub fn iceberg_catalog_glue::GlueCatalog::into_shared(self) -> Shared
72-
impl<V, T> ppv_lite86::types::VZip<V> for iceberg_catalog_glue::GlueCatalog where V: ppv_lite86::types::MultiLane<T>
73-
pub fn iceberg_catalog_glue::GlueCatalog::vzip(self) -> V
7424
pub struct iceberg_catalog_glue::GlueCatalogBuilder
7525
impl core::default::Default for iceberg_catalog_glue::GlueCatalogBuilder
7626
pub fn iceberg_catalog_glue::GlueCatalogBuilder::default() -> Self
@@ -81,56 +31,6 @@ pub type iceberg_catalog_glue::GlueCatalogBuilder::C = iceberg_catalog_glue::Glu
8131
pub fn iceberg_catalog_glue::GlueCatalogBuilder::load(self, name: impl core::convert::Into<alloc::string::String>, props: std::collections::hash::map::HashMap<alloc::string::String, alloc::string::String>) -> impl core::future::future::Future<Output = iceberg::error::Result<Self::C>> + core::marker::Send
8232
pub fn iceberg_catalog_glue::GlueCatalogBuilder::with_runtime(self, runtime: iceberg::runtime::Runtime) -> Self
8333
pub fn iceberg_catalog_glue::GlueCatalogBuilder::with_storage_factory(self, storage_factory: alloc::sync::Arc<dyn iceberg::io::storage::StorageFactory>) -> Self
84-
impl core::marker::Freeze for iceberg_catalog_glue::GlueCatalogBuilder
85-
impl core::marker::Send for iceberg_catalog_glue::GlueCatalogBuilder
86-
impl core::marker::Sync for iceberg_catalog_glue::GlueCatalogBuilder
87-
impl core::marker::Unpin for iceberg_catalog_glue::GlueCatalogBuilder
88-
impl !core::panic::unwind_safe::RefUnwindSafe for iceberg_catalog_glue::GlueCatalogBuilder
89-
impl !core::panic::unwind_safe::UnwindSafe for iceberg_catalog_glue::GlueCatalogBuilder
90-
impl<T, U> core::convert::Into<U> for iceberg_catalog_glue::GlueCatalogBuilder where U: core::convert::From<T>
91-
pub fn iceberg_catalog_glue::GlueCatalogBuilder::into(self) -> U
92-
impl<T, U> core::convert::TryFrom<U> for iceberg_catalog_glue::GlueCatalogBuilder where U: core::convert::Into<T>
93-
pub type iceberg_catalog_glue::GlueCatalogBuilder::Error = core::convert::Infallible
94-
pub fn iceberg_catalog_glue::GlueCatalogBuilder::try_from(value: U) -> core::result::Result<T, <T as core::convert::TryFrom<U>>::Error>
95-
impl<T, U> core::convert::TryInto<U> for iceberg_catalog_glue::GlueCatalogBuilder where U: core::convert::TryFrom<T>
96-
pub type iceberg_catalog_glue::GlueCatalogBuilder::Error = <U as core::convert::TryFrom<T>>::Error
97-
pub fn iceberg_catalog_glue::GlueCatalogBuilder::try_into(self) -> core::result::Result<U, <U as core::convert::TryFrom<T>>::Error>
98-
impl<T> as_any::AsAny for iceberg_catalog_glue::GlueCatalogBuilder where T: core::any::Any
99-
pub fn iceberg_catalog_glue::GlueCatalogBuilder::as_any(&self) -> &(dyn core::any::Any + 'static)
100-
pub fn iceberg_catalog_glue::GlueCatalogBuilder::as_any_mut(&mut self) -> &mut (dyn core::any::Any + 'static)
101-
pub fn iceberg_catalog_glue::GlueCatalogBuilder::type_name(&self) -> &'static str
102-
impl<T> as_any::Downcast for iceberg_catalog_glue::GlueCatalogBuilder where T: as_any::AsAny + ?core::marker::Sized
103-
impl<T> core::any::Any for iceberg_catalog_glue::GlueCatalogBuilder where T: 'static + ?core::marker::Sized
104-
pub fn iceberg_catalog_glue::GlueCatalogBuilder::type_id(&self) -> core::any::TypeId
105-
impl<T> core::borrow::Borrow<T> for iceberg_catalog_glue::GlueCatalogBuilder where T: ?core::marker::Sized
106-
pub fn iceberg_catalog_glue::GlueCatalogBuilder::borrow(&self) -> &T
107-
impl<T> core::borrow::BorrowMut<T> for iceberg_catalog_glue::GlueCatalogBuilder where T: ?core::marker::Sized
108-
pub fn iceberg_catalog_glue::GlueCatalogBuilder::borrow_mut(&mut self) -> &mut T
109-
impl<T> core::convert::From<T> for iceberg_catalog_glue::GlueCatalogBuilder
110-
pub fn iceberg_catalog_glue::GlueCatalogBuilder::from(t: T) -> T
111-
impl<T> crossbeam_epoch::atomic::Pointable for iceberg_catalog_glue::GlueCatalogBuilder
112-
pub type iceberg_catalog_glue::GlueCatalogBuilder::Init = T
113-
pub const iceberg_catalog_glue::GlueCatalogBuilder::ALIGN: usize
114-
pub unsafe fn iceberg_catalog_glue::GlueCatalogBuilder::deref<'a>(ptr: usize) -> &'a T
115-
pub unsafe fn iceberg_catalog_glue::GlueCatalogBuilder::deref_mut<'a>(ptr: usize) -> &'a mut T
116-
pub unsafe fn iceberg_catalog_glue::GlueCatalogBuilder::drop(ptr: usize)
117-
pub unsafe fn iceberg_catalog_glue::GlueCatalogBuilder::init(init: <T as crossbeam_epoch::atomic::Pointable>::Init) -> usize
118-
impl<T> either::into_either::IntoEither for iceberg_catalog_glue::GlueCatalogBuilder
119-
impl<T> opendal_core::raw::futures_util::MaybeSend for iceberg_catalog_glue::GlueCatalogBuilder where T: core::marker::Send
120-
impl<T> reqsign_core::futures_util::MaybeSend for iceberg_catalog_glue::GlueCatalogBuilder where T: core::marker::Send
121-
impl<T> tower_http::follow_redirect::policy::PolicyExt for iceberg_catalog_glue::GlueCatalogBuilder where T: ?core::marker::Sized
122-
pub fn iceberg_catalog_glue::GlueCatalogBuilder::and<P, B, E>(self, other: P) -> tower_http::follow_redirect::policy::and::And<T, P> where T: tower_http::follow_redirect::policy::Policy<B, E>, P: tower_http::follow_redirect::policy::Policy<B, E>
123-
pub fn iceberg_catalog_glue::GlueCatalogBuilder::or<P, B, E>(self, other: P) -> tower_http::follow_redirect::policy::or::Or<T, P> where T: tower_http::follow_redirect::policy::Policy<B, E>, P: tower_http::follow_redirect::policy::Policy<B, E>
124-
impl<T> tracing::instrument::Instrument for iceberg_catalog_glue::GlueCatalogBuilder
125-
impl<T> tracing::instrument::WithSubscriber for iceberg_catalog_glue::GlueCatalogBuilder
126-
impl<T> typenum::type_operators::Same for iceberg_catalog_glue::GlueCatalogBuilder
127-
pub type iceberg_catalog_glue::GlueCatalogBuilder::Output = T
128-
impl<U> bnum::cast::As for iceberg_catalog_glue::GlueCatalogBuilder
129-
pub fn iceberg_catalog_glue::GlueCatalogBuilder::as_<T>(self) -> T where T: bnum::cast::CastFrom<U>
130-
impl<Unshared, Shared> aws_smithy_runtime_api::shared::IntoShared<Shared> for iceberg_catalog_glue::GlueCatalogBuilder where Shared: aws_smithy_runtime_api::shared::FromUnshared<Unshared>
131-
pub fn iceberg_catalog_glue::GlueCatalogBuilder::into_shared(self) -> Shared
132-
impl<V, T> ppv_lite86::types::VZip<V> for iceberg_catalog_glue::GlueCatalogBuilder where V: ppv_lite86::types::MultiLane<T>
133-
pub fn iceberg_catalog_glue::GlueCatalogBuilder::vzip(self) -> V
13434
pub const iceberg_catalog_glue::AWS_ACCESS_KEY_ID: &str
13535
pub const iceberg_catalog_glue::AWS_PROFILE_NAME: &str
13636
pub const iceberg_catalog_glue::AWS_REGION_NAME: &str

0 commit comments

Comments
 (0)