Skip to content

Commit 0a9cfc7

Browse files
committed
Reintroduce public reexports as deprecated replacement modules & types.
Due to limitations described in rust-lang/rust#30827, we can't just deprecate the `pub use` stanzas; instead, we have to replace reexports with new (deprecated) modules and public types which then internally reexport the module internals or alias the reexported types, respectively.
1 parent 9a175cf commit 0a9cfc7

File tree

11 files changed

+172
-135
lines changed

11 files changed

+172
-135
lines changed

components/zcash_address/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this library adheres to Rust's notion of
77

88
## [Unreleased]
99

10+
### Deprecated
11+
- `zcash_address::Network` (use `zcash_protocol::consensus::NetworkType` instead).
12+
1013
## [0.6.2] - 2024-12-13
1114
### Fixed
1215
- Migrated to `f4jumble 0.1.1` to fix `no-std` support.

components/zcash_address/src/lib.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ extern crate alloc;
137137
#[cfg(feature = "std")]
138138
extern crate std;
139139

140-
use alloc::string::String;
141-
142140
mod convert;
143141
mod encoding;
144142
mod kind;
@@ -151,8 +149,14 @@ pub use convert::{
151149
};
152150
pub use encoding::ParseError;
153151
pub use kind::unified;
152+
153+
use alloc::string::String;
154+
154155
use kind::unified::Receiver;
155-
//pub use zcash_protocol::consensus::NetworkType as Network;
156+
157+
#[deprecated(note = "use ::zcash_protocol::consensus::NetworkType instead")]
158+
pub type Network = zcash_protocol::consensus::NetworkType;
159+
156160
use zcash_protocol::{consensus::NetworkType, PoolType};
157161

158162
/// A Zcash address.

zcash_client_backend/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ and this library adheres to Rust's notion of
1010
### Changed
1111
- Migrated to `nonempty 0.11`
1212

13+
### Deprecated
14+
- `zcash_client_backend::address` (use `zcash_keys::address` instead)
15+
- `zcash_client_backend::encoding` (use `zcash_keys::encoding` instead)
16+
- `zcash_client_backend::keys` (use `zcash_keys::keys` instead)
17+
- `zcash_client_backend::zip321` (use the `zip321` crate instead)
18+
- `zcash_client_backend::PoolType` (use `zcash_protocol::PoolType` instead)
19+
- `zcash_client_backend::ShieldedProtocol` (use `zcash_protocol::ShieldedProtocol` instead)
20+
1321
## [0.16.0] - 2024-12-16
1422

1523
### Added

zcash_client_backend/src/lib.rs

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,14 @@
6161
// Temporary until we have addressed all Result<T, ()> cases.
6262
#![allow(clippy::result_unit_err)]
6363

64-
//pub use zcash_keys::address;
6564
pub mod data_api;
6665
mod decrypt;
67-
//pub use zcash_keys::encoding;
6866
pub mod fees;
69-
//pub use zcash_keys::keys;
7067
pub mod proposal;
7168
pub mod proto;
7269
pub mod scan;
7370
pub mod scanning;
7471
pub mod wallet;
75-
//pub use zip321;
7672

7773
#[cfg(feature = "sync")]
7874
pub mod sync;
@@ -84,7 +80,27 @@ pub mod serialization;
8480
pub mod tor;
8581

8682
pub use decrypt::{decrypt_transaction, DecryptedOutput, TransferType};
87-
//pub use zcash_protocol::{PoolType, ShieldedProtocol};
83+
84+
#[deprecated(note = "This module is deprecated; use `::zcash_keys::address` instead.")]
85+
pub mod address {
86+
pub use zcash_keys::address::*;
87+
}
88+
#[deprecated(note = "This module is deprecated; use `::zcash_keys::encoding` instead.")]
89+
pub mod encoding {
90+
pub use zcash_keys::encoding::*;
91+
}
92+
#[deprecated(note = "This module is deprecated; use `::zcash_keys::keys` instead.")]
93+
pub mod keys {
94+
pub use zcash_keys::keys::*;
95+
}
96+
#[deprecated(note = "use ::zcash_protocol::PoolType instead")]
97+
pub type PoolType = zcash_protocol::PoolType;
98+
#[deprecated(note = "use ::zcash_protocol::ShieldedProtocol instead")]
99+
pub type ShieldedProtocol = zcash_protocol::ShieldedProtocol;
100+
#[deprecated(note = "This module is deprecated; use the `zip321` crate instead.")]
101+
pub mod zip321 {
102+
pub use zip321::*;
103+
}
88104

89105
#[cfg(test)]
90106
#[macro_use]

zcash_client_backend/src/proto/compact_formats.rs

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

zcash_client_backend/src/proto/proposal.rs

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

0 commit comments

Comments
 (0)