Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(more) Syn 2.0 updates #3738

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 72 additions & 33 deletions Cargo.lock

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

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ test_network = { version = "=2.0.0-pre-rc.16", path = "core/test_network" }

proc-macro-error = "1.0.4"
proc-macro2 = "1.0.49"
syn = { version = "1.0.107", default-features = false }
syn = { package = "syn", version = "1.0.109", default-features = false }
syn2 = { package = "syn", version = "2.0.25", default-features = false }
quote = "1.0.23"
manyhow = { version = "0.5.1", features = ["darling"] }
darling = "0.20.1"

futures = { version = "0.3.25", default-features = false }
async-stream = "0.3.3"
Expand Down
8 changes: 4 additions & 4 deletions cli/derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ license.workspace = true
proc-macro = true

[dependencies]
syn = { version = "1.0.107", features = ["parsing", "printing", "extra-traits"] }
quote = "1.0.23"
proc-macro2 = "1.0.49"
syn = { workspace = true, features = ["parsing", "printing", "extra-traits"] }
quote = { workspace = true }
proc-macro2 = { workspace = true }

[dev-dependencies]
warp = "0.3.3"
warp = { workspace = true }
2 changes: 1 addition & 1 deletion core/src/block_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ pub mod message {
}

/// Message's variants that are used by peers to communicate in the process of consensus.
#[version_with_scale(n = 1, versioned = "VersionedMessage")]
#[version_with_scale(version = 1, versioned_alias = "VersionedMessage")]
#[derive(Debug, Clone, Decode, Encode, FromVariant)]
pub enum Message {
/// Request for blocks after the block with `Hash` for the peer with `PeerId`.
Expand Down
2 changes: 1 addition & 1 deletion core/src/sumeragi/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl VersionedPacket {
}

/// Helper structure, wrapping messages and view change proofs.
#[version_with_scale(n = 1, versioned = "VersionedPacket")]
#[version_with_scale(version = 1, versioned_alias = "VersionedPacket")]
#[derive(Debug, Clone, Decode, Encode)]
pub struct MessagePacket {
/// Proof of view change. As part of this message handling, all
Expand Down
6 changes: 3 additions & 3 deletions data_model/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ mod committed {
}

/// The `CommittedBlock` struct represents a block accepted by consensus
#[version_with_scale(n = 1, versioned = "VersionedCommittedBlock")]
#[version_with_scale(version = 1, versioned_alias = "VersionedCommittedBlock")]
#[derive(
Debug,
Display,
Expand Down Expand Up @@ -395,14 +395,14 @@ pub mod stream {
use super::*;

/// Request sent to subscribe to blocks stream starting from the given height.
#[version_with_scale(n = 1, versioned = "VersionedBlockSubscriptionRequest")]
#[version_with_scale(version = 1, versioned_alias = "VersionedBlockSubscriptionRequest")]
#[derive(Debug, Clone, Copy, Constructor, Decode, Encode, IntoSchema)]
#[repr(transparent)]
pub struct BlockSubscriptionRequest(pub NonZeroU64);

/// Message sent by the stream producer
/// Block sent by the peer.
#[version_with_scale(n = 1, versioned = "VersionedBlockMessage")]
#[version_with_scale(version = 1, versioned_alias = "VersionedBlockMessage")]
#[derive(Debug, Clone, Decode, Encode, IntoSchema)]
#[repr(transparent)]
pub struct BlockMessage(pub VersionedCommittedBlock);
Expand Down
Loading