Skip to content

Commit

Permalink
Reintroduce public reexports as deprecated replacement modules & types.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nuttycom committed Dec 20, 2024
1 parent f6c0534 commit 094e641
Show file tree
Hide file tree
Showing 11 changed files with 172 additions and 135 deletions.
3 changes: 3 additions & 0 deletions components/zcash_address/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this library adheres to Rust's notion of

## [Unreleased]

### Deprecated
- `zcash_address::Network` (use `zcash_protocol::consensus::NetworkType` instead).

## [0.6.2] - 2024-12-13
### Fixed
- Migrated to `f4jumble 0.1.1` to fix `no-std` support.
Expand Down
10 changes: 7 additions & 3 deletions components/zcash_address/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ extern crate alloc;
#[cfg(feature = "std")]
extern crate std;

use alloc::string::String;

mod convert;
mod encoding;
mod kind;
Expand All @@ -151,8 +149,14 @@ pub use convert::{
};
pub use encoding::ParseError;
pub use kind::unified;

use alloc::string::String;

use kind::unified::Receiver;
//pub use zcash_protocol::consensus::NetworkType as Network;

#[deprecated(note = "use ::zcash_protocol::consensus::NetworkType instead")]
pub type Network = zcash_protocol::consensus::NetworkType;

use zcash_protocol::{consensus::NetworkType, PoolType};

/// A Zcash address.
Expand Down
8 changes: 8 additions & 0 deletions zcash_client_backend/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ and this library adheres to Rust's notion of
### Changed
- Migrated to `nonempty 0.11`

### Deprecated
- `zcash_client_backend::address` (use `zcash_keys::address` instead)
- `zcash_client_backend::encoding` (use `zcash_keys::encoding` instead)
- `zcash_client_backend::keys` (use `zcash_keys::keys` instead)
- `zcash_client_backend::zip321` (use the `zip321` crate instead)
- `zcash_client_backend::PoolType` (use `zcash_protocol::PoolType` instead)
- `zcash_client_backend::ShieldedProtocol` (use `zcash_protocol::ShieldedProtocol` instead)

## [0.16.0] - 2024-12-16

### Added
Expand Down
26 changes: 21 additions & 5 deletions zcash_client_backend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,14 @@
// Temporary until we have addressed all Result<T, ()> cases.
#![allow(clippy::result_unit_err)]

//pub use zcash_keys::address;
pub mod data_api;
mod decrypt;
//pub use zcash_keys::encoding;
pub mod fees;
//pub use zcash_keys::keys;
pub mod proposal;
pub mod proto;
pub mod scan;
pub mod scanning;
pub mod wallet;
//pub use zip321;

#[cfg(feature = "sync")]
pub mod sync;
Expand All @@ -84,7 +80,27 @@ pub mod serialization;
pub mod tor;

pub use decrypt::{decrypt_transaction, DecryptedOutput, TransferType};
//pub use zcash_protocol::{PoolType, ShieldedProtocol};

#[deprecated(note = "This module is deprecated; use `::zcash_keys::address` instead.")]
pub mod address {
pub use zcash_keys::address::*;
}
#[deprecated(note = "This module is deprecated; use `::zcash_keys::encoding` instead.")]
pub mod encoding {
pub use zcash_keys::encoding::*;
}
#[deprecated(note = "This module is deprecated; use `::zcash_keys::keys` instead.")]
pub mod keys {
pub use zcash_keys::keys::*;
}
#[deprecated(note = "use ::zcash_protocol::PoolType instead")]
pub type PoolType = zcash_protocol::PoolType;
#[deprecated(note = "use ::zcash_protocol::ShieldedProtocol instead")]
pub type ShieldedProtocol = zcash_protocol::ShieldedProtocol;
#[deprecated(note = "This module is deprecated; use the `zip321` crate instead.")]
pub mod zip321 {
pub use zip321::*;
}

#[cfg(test)]
#[macro_use]
Expand Down
6 changes: 0 additions & 6 deletions zcash_client_backend/src/proto/compact_formats.rs

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

27 changes: 8 additions & 19 deletions zcash_client_backend/src/proto/proposal.rs

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

Loading

0 comments on commit 094e641

Please sign in to comment.