From 2a5a92f23ad27c3e3e7bb8d4f7a778f60d0489ac Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Sat, 20 Jun 2020 01:42:11 -0400 Subject: [PATCH 01/10] Fix hygiene issues in `declare_program!` and `declare_loader!` The `declare_program!` and `declare_loader!` macros both expand to new macro definitions (based on the `$name` argument). These 'inner' macros make use of the special `$crate` metavariable to access items in the crate where the 'inner' macros is defined. However, this only works due to a bug in rustc. When a macro is expanded, all `$crate` tokens in its output are 'marked' as being resolved in the defining crate of that macro. An inner macro (including the body of its arms) is 'just' another set of tokens that appears in the body of the outer macro, so any `$crate` identifiers used there are resolved relative to the 'outer' macro. For example, consider the following code: ```rust macro_rules! outer { () => { macro_rules! inner { () => { $crate::Foo } } } } ``` The path `$crate::Foo` will be resolved relative to the crate that defines `outer`, **not** the crate which defines `inner`. However, rustc currently loses this extra resolution information (referred to as 'hygiene' information) when a crate is serialized. In the above example, this means that the macro `inner` (which gets defined in whatever crate invokes `outer!`) will behave differently depending on which crate it is invoked from: When `inner` is invoked from the same crate in which it is defined, the hygiene information will still be available, which will cause `$crate::Foo` to be resolved in the crate which defines 'outer'. When `inner` is invoked from a different crate, it will be loaded from the metadata of the crate which defines 'inner'. Since the hygiene information is currently lost, rust will 'forget' that `$crate::Foo` is supposed to be resolved in the context of 'outer'. Instead, it will be resolved relative to the crate which defines 'inner', which can cause incorrect code to compile. This bug will soon be fixed in rust (see https://github.com/rust-lang/rust/pull/72121), which will break `declare_program!` and `declare_loader!`. Fortunately, it's possible to obtain the desired behavior (`$crate` resolving in the context of the 'inner' macro) by use of a procedural macro. This commit adds a `respan!` proc-macro to the `sdk/macro` crate. Using the newly-stabilized (on Nightly) `Span::resolved_at` method, the `$crate` identifier can be made to be resolved in the context of the proper crate. Since `Span::resolved_at` is only stable on the latest nightly, referencing it on an earlier version of Rust will cause a compilation error. This requires the `rustversion` crate to be used, which allows conditionally compiling code epending on the Rust compiler version in use. Since this method is already stabilized in the latest nightly, there will never be a situation where the hygiene bug is fixed (e.g. https://github.com/rust-lang/rust/pull/72121) is merged but we are unable to call `Span::resolved_at`. (cherry picked from commit 05445c718e6dda2f166a0ce1d2c7e1f85eddd83b) # Conflicts: # Cargo.lock # sdk/Cargo.toml --- Cargo.lock | 27 +++++++++++++ programs/bpf_loader/Cargo.toml | 1 + programs/bpf_loader/src/lib.rs | 8 ++++ sdk/Cargo.toml | 8 ++++ sdk/macro/Cargo.toml | 1 + sdk/macro/src/lib.rs | 73 +++++++++++++++++++++++++++++++++- sdk/src/entrypoint_native.rs | 70 ++++++++++++++++++++++++++------ sdk/src/lib.rs | 2 + 8 files changed, 175 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ce72a8bf02afcb..aa68d6963f3bf7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3295,6 +3295,17 @@ dependencies = [ "webpki", ] +[[package]] +name = "rustversion" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9bdc5e856e51e685846fb6c13a1f5e5432946c2c90501bdc76a1319f19e29da" +dependencies = [ + "proc-macro2 1.0.17", + "quote 1.0.6", + "syn 1.0.27", +] + [[package]] name = "rusty-fork" version = "0.2.2" @@ -3824,7 +3835,11 @@ dependencies = [ "num-derive 0.3.0", "num-traits", "rand 0.7.3", +<<<<<<< HEAD "solana-logger", +======= + "rustversion", +>>>>>>> 05445c718... Fix hygiene issues in `declare_program!` and `declare_loader!` "solana-runtime", "solana-sdk 1.2.11", "solana_rbpf", @@ -4667,6 +4682,11 @@ dependencies = [ "pbkdf2", "rand 0.7.3", "rand_chacha 0.2.2", +<<<<<<< HEAD +======= + "rustc_version", + "rustversion", +>>>>>>> 05445c718... Fix hygiene issues in `declare_program!` and `declare_loader!` "serde", "serde_bytes", "serde_derive", @@ -4692,9 +4712,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da5f311e7735323eb0ad348c68170c2503a2c56cfa1a261646d8182b373fa670" dependencies = [ "bs58 0.3.1", +<<<<<<< HEAD "proc-macro2 1.0.18", "quote 1.0.7", "syn 1.0.33", +======= + "proc-macro2 1.0.17", + "quote 1.0.6", + "rustversion", + "syn 1.0.27", +>>>>>>> 05445c718... Fix hygiene issues in `declare_program!` and `declare_loader!` ] [[package]] diff --git a/programs/bpf_loader/Cargo.toml b/programs/bpf_loader/Cargo.toml index bf3d65e7f2211a..31d5c937a6877a 100644 --- a/programs/bpf_loader/Cargo.toml +++ b/programs/bpf_loader/Cargo.toml @@ -23,6 +23,7 @@ thiserror = "1.0" [dev-dependencies] rand = "0.7.3" +rustversion = "1.0.3" [lib] crate-type = ["lib", "cdylib"] diff --git a/programs/bpf_loader/src/lib.rs b/programs/bpf_loader/src/lib.rs index 905abf0a411314..3f445b7f5c7638 100644 --- a/programs/bpf_loader/src/lib.rs +++ b/programs/bpf_loader/src/lib.rs @@ -297,6 +297,14 @@ mod tests { } } + #[rustversion::since(1.46.0)] + #[test] + fn test_bpf_loader_same_crate() { + // Ensure that we can invoke this macro from the same crate + // where it is defined. + solana_bpf_loader_program!(); + } + #[test] #[should_panic(expected = "ExceededMaxInstructions(10)")] fn test_bpf_loader_non_terminating_program() { diff --git a/sdk/Cargo.toml b/sdk/Cargo.toml index 2d91e808f577d7..191eb01846aa4a 100644 --- a/sdk/Cargo.toml +++ b/sdk/Cargo.toml @@ -51,9 +51,17 @@ serde_json = { version = "1.0.53", optional = true } sha2 = "0.8.2" thiserror = "1.0" ed25519-dalek = { version = "=1.0.0-pre.3", optional = true } +<<<<<<< HEAD solana-crate-features = { path = "../crate-features", version = "1.2.11", optional = true } solana-logger = { path = "../logger", version = "1.2.11", optional = true } solana-sdk-macro = { path = "macro", version = "1.2.11" } +======= +solana-crate-features = { path = "../crate-features", version = "1.3.0", optional = true } +solana-logger = { path = "../logger", version = "1.3.0", optional = true } +solana-sdk-macro = { path = "macro", version = "1.3.0" } +solana-sdk-macro-frozen-abi = { path = "macro-frozen-abi", version = "1.3.0" } +rustversion = "1.0.3" +>>>>>>> 05445c718... Fix hygiene issues in `declare_program!` and `declare_loader!` [dev-dependencies] tiny-bip39 = "0.7.0" diff --git a/sdk/macro/Cargo.toml b/sdk/macro/Cargo.toml index 036c653e3abfbf..15d6419dc294a1 100644 --- a/sdk/macro/Cargo.toml +++ b/sdk/macro/Cargo.toml @@ -16,6 +16,7 @@ bs58 = "0.3.0" proc-macro2 = "1.0" quote = "1.0" syn = { version = "1.0", features = ["full", "extra-traits"] } +rustversion = "1.0.3" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/sdk/macro/src/lib.rs b/sdk/macro/src/lib.rs index e58d9b4319f679..f130a53055c76b 100644 --- a/sdk/macro/src/lib.rs +++ b/sdk/macro/src/lib.rs @@ -5,7 +5,7 @@ extern crate proc_macro; use proc_macro::TokenStream; -use proc_macro2::Span; +use proc_macro2::{Delimiter, Span, TokenTree}; use quote::{quote, ToTokens}; use std::convert::TryFrom; use syn::{ @@ -14,7 +14,7 @@ use syn::{ parse_macro_input, punctuated::Punctuated, token::Bracket, - Expr, Ident, LitByte, LitStr, Token, + Expr, Ident, LitByte, LitStr, Path, Token, }; struct Id(proc_macro2::TokenStream); @@ -63,6 +63,75 @@ impl ToTokens for Id { } } +#[allow(dead_code)] // `respan` may be compiled out +struct RespanInput { + to_respan: Path, + respan_using: Span, +} + +impl Parse for RespanInput { + fn parse(input: ParseStream) -> Result { + let to_respan: Path = input.parse()?; + let _comma: Token![,] = input.parse()?; + let respan_tree: TokenTree = input.parse()?; + match respan_tree { + TokenTree::Group(g) if g.delimiter() == Delimiter::None => { + let ident: Ident = syn::parse2(g.stream())?; + Ok(RespanInput { + to_respan, + respan_using: ident.span(), + }) + } + val @ _ => Err(syn::Error::new_spanned( + val, + "expected None-delimited group", + )), + } + } +} + +/// A proc-macro which respans the tokens in its first argument (a `Path`) +/// to be resolved at the tokens of its second argument. +/// For internal use only. +/// +/// There must be exactly one comma in the input, +/// which is used to separate the two arguments. +/// The second argument should be exactly one token. +/// +/// For example, `respan!($crate::foo, with_span)` +/// produces the tokens `$crate::foo`, but resolved +/// at the span of `with_span`. +/// +/// The input to this function should be very short - +/// its only purpose is to override the span of a token +/// sequence containing `$crate`. For all other purposes, +/// a more general proc-macro should be used. +#[rustversion::since(1.46.0)] // `Span::resolved_at` is stable in 1.46.0 and above +#[proc_macro] +pub fn respan(input: TokenStream) -> TokenStream { + // Obtain the `Path` we are going to respan, and the ident + // whose span we will be using. + let RespanInput { + to_respan, + respan_using, + } = parse_macro_input!(input as RespanInput); + // Respan all of the tokens in the `Path` + let to_respan: proc_macro2::TokenStream = to_respan + .into_token_stream() + .into_iter() + .map(|mut t| { + // Combine the location of the token with the resolution behavior of `respan_using` + // Note: `proc_macro2::Span::resolved_at` is currently gated with cfg(procmacro2_semver_exempt) + // Once this gate is removed, we will no longer need to use 'unwrap()' to call + // the underling `proc_macro::Span::resolved_at` method. + let new_span: Span = t.span().unwrap().resolved_at(respan_using.unwrap()).into(); + t.set_span(new_span); + t + }) + .collect(); + return TokenStream::from(to_respan); +} + #[proc_macro] pub fn declare_id(input: TokenStream) -> TokenStream { let id = parse_macro_input!(input as Id); diff --git a/sdk/src/entrypoint_native.rs b/sdk/src/entrypoint_native.rs index 278a5214f8fe6a..aa37340adf40a8 100644 --- a/sdk/src/entrypoint_native.rs +++ b/sdk/src/entrypoint_native.rs @@ -30,6 +30,60 @@ pub type LoaderEntrypoint = unsafe extern "C" fn( invoke_context: &dyn InvokeContext, ) -> Result<(), InstructionError>; +#[rustversion::since(1.46.0)] +#[macro_export] +macro_rules! declare_name { + ($name:ident) => { + #[macro_export] + macro_rules! $name { + () => { + // Subtle: + // The outer `declare_name!` macro may be expanded in another + // crate, causing the macro `$name!` to be defined in that + // crate. We want to emit a call to `$crate::id()`, and have + // `$crate` be resolved in the crate where `$name!` gets defined, + // *not* in this crate (where `declare_name! is defined). + // + // When a macro_rules! macro gets expanded, any $crate tokens + // in its output will be 'marked' with the crate they were expanded + // from. This includes nested macros like our macro `$name` - even + // though it looks like a separate macro, Rust considers it to be + // just another part of the output of `declare_program!`. + // + // We pass `$name` as the second argument to tell `respan!` to + // apply use the `Span` of `$name` when resolving `$crate::id`. + // This causes `$crate` to behave as though it was written + // at the same location as the `$name` value passed + // to `declare_name!` (e.g. the 'foo' in + // `declare_name(foo)` + // + // See the `respan!` macro for more details. + // FIXME: Use `crate::respan!` once https://github.com/rust-lang/rust/pull/72121 + // is merged. + // `respan!` respans the path `$crate::id`, which we then call (hence the extra + // parens) + ( + stringify!($name).to_string(), + ::solana_sdk::respan!($crate::id, $name)(), + ) + }; + } + }; +} + +#[rustversion::not(since(1.46.0))] +#[macro_export] +macro_rules! declare_name { + ($name:ident) => { + #[macro_export] + macro_rules! $name { + () => { + (stringify!($name).to_string(), $crate::id()) + }; + } + }; +} + /// Convenience macro to declare a native program /// /// bs58_string: bs58 string representation the program's id @@ -102,13 +156,7 @@ pub type LoaderEntrypoint = unsafe extern "C" fn( macro_rules! declare_program( ($bs58_string:expr, $name:ident, $entrypoint:expr) => ( $crate::declare_id!($bs58_string); - - #[macro_export] - macro_rules! $name { - () => { - (stringify!($name).to_string(), $crate::id()) - }; - } + $crate::declare_name!($name); #[no_mangle] pub extern "C" fn $name( @@ -126,13 +174,9 @@ macro_rules! declare_program( macro_rules! declare_loader( ($bs58_string:expr, $name:ident, $entrypoint:expr) => ( $crate::declare_id!($bs58_string); + $crate::declare_name!($name); + - #[macro_export] - macro_rules! $name { - () => { - (stringify!($name).to_string(), $crate::id()) - }; - } #[no_mangle] pub extern "C" fn $name( diff --git a/sdk/src/lib.rs b/sdk/src/lib.rs index 292ec51092f504..b54e6a07a78b41 100644 --- a/sdk/src/lib.rs +++ b/sdk/src/lib.rs @@ -60,6 +60,8 @@ pub mod timing; /// ``` pub use solana_sdk_macro::declare_id; pub use solana_sdk_macro::pubkeys; +#[rustversion::since(1.46.0)] +pub use solana_sdk_macro::respan; // On-chain program specific modules pub mod account_info; From 40388445911b83e5693f76f1144b68092725f94b Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Mon, 6 Jul 2020 19:19:48 -0400 Subject: [PATCH 02/10] Replace FIXME with an issue link (cherry picked from commit b0cb2b01065e5c4b349941264f606074ba1c4be8) --- sdk/src/entrypoint_native.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/src/entrypoint_native.rs b/sdk/src/entrypoint_native.rs index aa37340adf40a8..39abb0a8d22cca 100644 --- a/sdk/src/entrypoint_native.rs +++ b/sdk/src/entrypoint_native.rs @@ -58,8 +58,10 @@ macro_rules! declare_name { // `declare_name(foo)` // // See the `respan!` macro for more details. - // FIXME: Use `crate::respan!` once https://github.com/rust-lang/rust/pull/72121 - // is merged. + // This should use `crate::respan!` once https://github.com/rust-lang/rust/pull/72121 + // is merged: see https://github.com/solana-labs/solana/issues/10933. + // For now, we need to use `::solana_sdk` + // // `respan!` respans the path `$crate::id`, which we then call (hence the extra // parens) ( From 795e639c5c5df5995306f3d5158385637eee5537 Mon Sep 17 00:00:00 2001 From: Jack May Date: Tue, 7 Jul 2020 09:42:26 -0700 Subject: [PATCH 03/10] Update lock files (cherry picked from commit 42f88484f43564ebcf22bfd84554b28b8c9d1b6c) # Conflicts: # programs/bpf/Cargo.lock # programs/librapay/Cargo.lock # programs/move_loader/Cargo.lock --- programs/bpf/Cargo.lock | 42 +++++++++++++++++++++++++++++++++ programs/librapay/Cargo.lock | 38 +++++++++++++++++++++++++++++ programs/move_loader/Cargo.lock | 34 ++++++++++++++++++++++++++ 3 files changed, 114 insertions(+) diff --git a/programs/bpf/Cargo.lock b/programs/bpf/Cargo.lock index 56151ae013f583..085b5fe6f0188c 100644 --- a/programs/bpf/Cargo.lock +++ b/programs/bpf/Cargo.lock @@ -1235,6 +1235,16 @@ dependencies = [ "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rustversion" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ryu" version = "1.0.5" @@ -1670,10 +1680,19 @@ dependencies = [ "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +<<<<<<< HEAD "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", "serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)", +======= + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.112 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_bytes 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.112 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)", +>>>>>>> 42f88484f... Update lock files "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "solana-crate-features 1.2.11", "solana-logger 1.2.11", @@ -1686,9 +1705,27 @@ name = "solana-sdk-macro" version = "1.2.11" dependencies = [ "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +<<<<<<< HEAD "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", +======= + "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-sdk-macro-frozen-abi" +version = "1.3.0" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", +>>>>>>> 42f88484f... Update lock files ] [[package]] @@ -2444,7 +2481,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum rustls 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0d4a31f5d68413404705d6982529b0e11a9aacd4839d1d6222ee3b8cb4015e1" +<<<<<<< HEAD "checksum ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +======= +"checksum rustversion 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b9bdc5e856e51e685846fb6c13a1f5e5432946c2c90501bdc76a1319f19e29da" +"checksum ryu 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1" +>>>>>>> 42f88484f... Update lock files "checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" "checksum scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" "checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" diff --git a/programs/librapay/Cargo.lock b/programs/librapay/Cargo.lock index d9f35a7b48261f..9cea51e923d71d 100644 --- a/programs/librapay/Cargo.lock +++ b/programs/librapay/Cargo.lock @@ -2095,6 +2095,16 @@ dependencies = [ "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rustversion" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rusty-fork" version = "0.2.2" @@ -2489,10 +2499,19 @@ dependencies = [ "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +<<<<<<< HEAD "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", "serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)", +======= + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.112 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_bytes 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.112 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)", +>>>>>>> 42f88484f... Update lock files "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "solana-crate-features 1.2.11", "solana-logger 1.2.11", @@ -2505,9 +2524,27 @@ name = "solana-sdk-macro" version = "1.2.11" dependencies = [ "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +<<<<<<< HEAD "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", +======= + "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-sdk-macro-frozen-abi" +version = "1.3.0" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", +>>>>>>> 42f88484f... Update lock files ] [[package]] @@ -3909,6 +3946,7 @@ dependencies = [ "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum rustls 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0d4a31f5d68413404705d6982529b0e11a9aacd4839d1d6222ee3b8cb4015e1" +"checksum rustversion 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b9bdc5e856e51e685846fb6c13a1f5e5432946c2c90501bdc76a1319f19e29da" "checksum rusty-fork 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3dd93264e10c577503e926bd1430193eeb5d21b059148910082245309b424fae" "checksum ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" "checksum scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" diff --git a/programs/move_loader/Cargo.lock b/programs/move_loader/Cargo.lock index 2b28fb6b2daa05..d140e548e6f219 100644 --- a/programs/move_loader/Cargo.lock +++ b/programs/move_loader/Cargo.lock @@ -2257,6 +2257,17 @@ dependencies = [ "webpki", ] +[[package]] +name = "rustversion" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9bdc5e856e51e685846fb6c13a1f5e5432946c2c90501bdc76a1319f19e29da" +dependencies = [ + "proc-macro2 1.0.17", + "quote 1.0.6", + "syn 1.0.27", +] + [[package]] name = "rusty-fork" version = "0.2.2" @@ -2586,6 +2597,11 @@ dependencies = [ "pbkdf2", "rand 0.7.3", "rand_chacha 0.2.2", +<<<<<<< HEAD +======= + "rustc_version", + "rustversion", +>>>>>>> 42f88484f... Update lock files "serde", "serde_bytes", "serde_derive", @@ -2602,9 +2618,27 @@ name = "solana-sdk-macro" version = "1.2.11" dependencies = [ "bs58 0.3.1", +<<<<<<< HEAD "proc-macro2 1.0.18", "quote 1.0.7", "syn 1.0.33", +======= + "proc-macro2 1.0.17", + "quote 1.0.6", + "rustversion", + "syn 1.0.27", +] + +[[package]] +name = "solana-sdk-macro-frozen-abi" +version = "1.3.0" +dependencies = [ + "lazy_static", + "proc-macro2 1.0.17", + "quote 1.0.6", + "rustc_version", + "syn 1.0.27", +>>>>>>> 42f88484f... Update lock files ] [[package]] From 9bacfb746c5d0e11431315eb388d20c3c3864206 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Mon, 13 Jul 2020 20:55:29 -0400 Subject: [PATCH 04/10] Split comment over multiple lines Due to https://github.com/rust-lang/rustfmt/issues/4325, leaving this as one line causes rustfmt to add extra indentation to the surrounding code. (cherry picked from commit fed69e96a96485d1eda68c82f5c6085b0e4feae2) --- sdk/src/entrypoint_native.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sdk/src/entrypoint_native.rs b/sdk/src/entrypoint_native.rs index 39abb0a8d22cca..4e0c63e722e2e4 100644 --- a/sdk/src/entrypoint_native.rs +++ b/sdk/src/entrypoint_native.rs @@ -58,8 +58,9 @@ macro_rules! declare_name { // `declare_name(foo)` // // See the `respan!` macro for more details. - // This should use `crate::respan!` once https://github.com/rust-lang/rust/pull/72121 - // is merged: see https://github.com/solana-labs/solana/issues/10933. + // This should use `crate::respan!` once + // https://github.com/rust-lang/rust/pull/72121 is merged: + // see https://github.com/solana-labs/solana/issues/10933. // For now, we need to use `::solana_sdk` // // `respan!` respans the path `$crate::id`, which we then call (hence the extra From b64a82f095e59c224cd705e52077e4122dfca279 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Mon, 13 Jul 2020 21:16:57 -0400 Subject: [PATCH 05/10] Fix clippy lints (cherry picked from commit e7387f60a7cf68e1d630d3e96dbe7ff8606a4ac6) --- sdk/macro/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/macro/src/lib.rs b/sdk/macro/src/lib.rs index f130a53055c76b..5146f3ed301484 100644 --- a/sdk/macro/src/lib.rs +++ b/sdk/macro/src/lib.rs @@ -82,7 +82,7 @@ impl Parse for RespanInput { respan_using: ident.span(), }) } - val @ _ => Err(syn::Error::new_spanned( + val => Err(syn::Error::new_spanned( val, "expected None-delimited group", )), @@ -129,7 +129,7 @@ pub fn respan(input: TokenStream) -> TokenStream { t }) .collect(); - return TokenStream::from(to_respan); + TokenStream::from(to_respan) } #[proc_macro] From c692481e067e06fdfe87bda35d5e406f373ad81e Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Tue, 14 Jul 2020 14:06:01 -0400 Subject: [PATCH 06/10] Apply #![feature(proc_macro_hygiene)] when needed This allows the rust-bpf-builder toolchain to build the sdk (cherry picked from commit 95490ff56eb274f8dea58c79a2d33e4f2713d8c8) # Conflicts: # sdk/build.rs # sdk/src/lib.rs --- sdk/build.rs | 27 +++++++++++++++++++++++++++ sdk/src/lib.rs | 6 ++++++ 2 files changed, 33 insertions(+) create mode 100644 sdk/build.rs diff --git a/sdk/build.rs b/sdk/build.rs new file mode 100644 index 00000000000000..c9550c1c5c4f22 --- /dev/null +++ b/sdk/build.rs @@ -0,0 +1,27 @@ +extern crate rustc_version; +use rustc_version::{version_meta, Channel}; + +fn main() { + // Copied and adapted from + // https://github.com/Kimundi/rustc-version-rs/blob/1d692a965f4e48a8cb72e82cda953107c0d22f47/README.md#example + // Licensed under Apache-2.0 + MIT + match version_meta().unwrap().channel { + Channel::Stable => { + println!("cargo:rustc-cfg=RUSTC_WITHOUT_SPECIALIZATION"); + } + Channel::Beta => { + println!("cargo:rustc-cfg=RUSTC_WITHOUT_SPECIALIZATION"); + } + Channel::Nightly => { + println!("cargo:rustc-cfg=RUSTC_WITH_SPECIALIZATION"); + } + Channel::Dev => { + println!("cargo:rustc-cfg=RUSTC_WITH_SPECIALIZATION"); + // See https://github.com/solana-labs/solana/issues/11055 + // We may be running the custom `rust-bpf-builder` toolchain, + // which currently needs `#![feature(proc_macro_hygiene)]` to + // be applied. + println!("cargo:rustc-cfg=RUSTC_NEEDS_PROC_MACRO_HYGIENE"); + } + } +} diff --git a/sdk/src/lib.rs b/sdk/src/lib.rs index b54e6a07a78b41..6cd7aa7c7dcfe3 100644 --- a/sdk/src/lib.rs +++ b/sdk/src/lib.rs @@ -1,3 +1,9 @@ +<<<<<<< HEAD +======= +#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(specialization))] +#![cfg_attr(RUSTC_NEEDS_PROC_MACRO_HYGIENE, feature(proc_macro_hygiene))] + +>>>>>>> 95490ff56... Apply #![feature(proc_macro_hygiene)] when needed // Allows macro expansion of `use ::solana_sdk::*` to work within this crate extern crate self as solana_sdk; From b393a6e9204eb404e1d95142f1d3a4a95dedd013 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 14 Jul 2020 18:07:21 -0700 Subject: [PATCH 07/10] Update Cargo.toml --- sdk/Cargo.toml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sdk/Cargo.toml b/sdk/Cargo.toml index 191eb01846aa4a..fe84ab655a6d68 100644 --- a/sdk/Cargo.toml +++ b/sdk/Cargo.toml @@ -51,17 +51,10 @@ serde_json = { version = "1.0.53", optional = true } sha2 = "0.8.2" thiserror = "1.0" ed25519-dalek = { version = "=1.0.0-pre.3", optional = true } -<<<<<<< HEAD solana-crate-features = { path = "../crate-features", version = "1.2.11", optional = true } solana-logger = { path = "../logger", version = "1.2.11", optional = true } solana-sdk-macro = { path = "macro", version = "1.2.11" } -======= -solana-crate-features = { path = "../crate-features", version = "1.3.0", optional = true } -solana-logger = { path = "../logger", version = "1.3.0", optional = true } -solana-sdk-macro = { path = "macro", version = "1.3.0" } -solana-sdk-macro-frozen-abi = { path = "macro-frozen-abi", version = "1.3.0" } rustversion = "1.0.3" ->>>>>>> 05445c718... Fix hygiene issues in `declare_program!` and `declare_loader!` [dev-dependencies] tiny-bip39 = "0.7.0" From 73f41ccae0297e68daf92049ce08151e386c51ef Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 14 Jul 2020 18:07:44 -0700 Subject: [PATCH 08/10] Update lib.rs --- sdk/src/lib.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sdk/src/lib.rs b/sdk/src/lib.rs index 6cd7aa7c7dcfe3..6b4cbda66db4e4 100644 --- a/sdk/src/lib.rs +++ b/sdk/src/lib.rs @@ -1,9 +1,5 @@ -<<<<<<< HEAD -======= -#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(specialization))] #![cfg_attr(RUSTC_NEEDS_PROC_MACRO_HYGIENE, feature(proc_macro_hygiene))] ->>>>>>> 95490ff56... Apply #![feature(proc_macro_hygiene)] when needed // Allows macro expansion of `use ::solana_sdk::*` to work within this crate extern crate self as solana_sdk; From ff121cfa6b766752a9ed68944f6b53ce7bf20c43 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 14 Jul 2020 18:11:45 -0700 Subject: [PATCH 09/10] Add rustc_version --- Cargo.lock | 22 +++++----------------- sdk/Cargo.toml | 3 +++ 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aa68d6963f3bf7..dc2fbb0c8a611f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3301,9 +3301,9 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9bdc5e856e51e685846fb6c13a1f5e5432946c2c90501bdc76a1319f19e29da" dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.6", - "syn 1.0.27", + "proc-macro2 1.0.18", + "quote 1.0.7", + "syn 1.0.33", ] [[package]] @@ -3835,11 +3835,8 @@ dependencies = [ "num-derive 0.3.0", "num-traits", "rand 0.7.3", -<<<<<<< HEAD - "solana-logger", -======= "rustversion", ->>>>>>> 05445c718... Fix hygiene issues in `declare_program!` and `declare_loader!` + "solana-logger", "solana-runtime", "solana-sdk 1.2.11", "solana_rbpf", @@ -4682,11 +4679,8 @@ dependencies = [ "pbkdf2", "rand 0.7.3", "rand_chacha 0.2.2", -<<<<<<< HEAD -======= "rustc_version", "rustversion", ->>>>>>> 05445c718... Fix hygiene issues in `declare_program!` and `declare_loader!` "serde", "serde_bytes", "serde_derive", @@ -4712,16 +4706,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da5f311e7735323eb0ad348c68170c2503a2c56cfa1a261646d8182b373fa670" dependencies = [ "bs58 0.3.1", -<<<<<<< HEAD "proc-macro2 1.0.18", "quote 1.0.7", "syn 1.0.33", -======= - "proc-macro2 1.0.17", - "quote 1.0.6", - "rustversion", - "syn 1.0.27", ->>>>>>> 05445c718... Fix hygiene issues in `declare_program!` and `declare_loader!` ] [[package]] @@ -4731,6 +4718,7 @@ dependencies = [ "bs58 0.3.1", "proc-macro2 1.0.18", "quote 1.0.7", + "rustversion", "syn 1.0.33", ] diff --git a/sdk/Cargo.toml b/sdk/Cargo.toml index fe84ab655a6d68..7b8622145c6afc 100644 --- a/sdk/Cargo.toml +++ b/sdk/Cargo.toml @@ -61,3 +61,6 @@ tiny-bip39 = "0.7.0" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] + +[build-dependencies] +rustc_version = "0.2" From 60a33f1c8ed33c91b3fd58c60a5a74cca4c23da9 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 14 Jul 2020 18:14:36 -0700 Subject: [PATCH 10/10] lock file updates --- programs/bpf/Cargo.lock | 34 +++------------------------------ programs/librapay/Cargo.lock | 30 +++-------------------------- programs/move_loader/Cargo.lock | 22 +-------------------- 3 files changed, 7 insertions(+), 79 deletions(-) diff --git a/programs/bpf/Cargo.lock b/programs/bpf/Cargo.lock index 085b5fe6f0188c..aa6c724aa29fa9 100644 --- a/programs/bpf/Cargo.lock +++ b/programs/bpf/Cargo.lock @@ -1680,19 +1680,12 @@ dependencies = [ "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -<<<<<<< HEAD + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", "serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)", -======= - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.112 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_bytes 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.112 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)", ->>>>>>> 42f88484f... Update lock files "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "solana-crate-features 1.2.11", "solana-logger 1.2.11", @@ -1705,27 +1698,10 @@ name = "solana-sdk-macro" version = "1.2.11" dependencies = [ "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -<<<<<<< HEAD "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", -======= - "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustversion 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "solana-sdk-macro-frozen-abi" -version = "1.3.0" -dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", ->>>>>>> 42f88484f... Update lock files + "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2481,12 +2457,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum rustls 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0d4a31f5d68413404705d6982529b0e11a9aacd4839d1d6222ee3b8cb4015e1" -<<<<<<< HEAD "checksum ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" -======= "checksum rustversion 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b9bdc5e856e51e685846fb6c13a1f5e5432946c2c90501bdc76a1319f19e29da" -"checksum ryu 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1" ->>>>>>> 42f88484f... Update lock files "checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" "checksum scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" "checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" diff --git a/programs/librapay/Cargo.lock b/programs/librapay/Cargo.lock index 9cea51e923d71d..fb77f118a4bfb0 100644 --- a/programs/librapay/Cargo.lock +++ b/programs/librapay/Cargo.lock @@ -2499,19 +2499,12 @@ dependencies = [ "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -<<<<<<< HEAD + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", "serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)", -======= - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.112 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_bytes 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.112 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)", ->>>>>>> 42f88484f... Update lock files "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "solana-crate-features 1.2.11", "solana-logger 1.2.11", @@ -2524,27 +2517,10 @@ name = "solana-sdk-macro" version = "1.2.11" dependencies = [ "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -<<<<<<< HEAD "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", -======= - "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustversion 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "solana-sdk-macro-frozen-abi" -version = "1.3.0" -dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", ->>>>>>> 42f88484f... Update lock files + "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] diff --git a/programs/move_loader/Cargo.lock b/programs/move_loader/Cargo.lock index d140e548e6f219..e795a2983eb9e0 100644 --- a/programs/move_loader/Cargo.lock +++ b/programs/move_loader/Cargo.lock @@ -2597,11 +2597,8 @@ dependencies = [ "pbkdf2", "rand 0.7.3", "rand_chacha 0.2.2", -<<<<<<< HEAD -======= "rustc_version", "rustversion", ->>>>>>> 42f88484f... Update lock files "serde", "serde_bytes", "serde_derive", @@ -2618,27 +2615,10 @@ name = "solana-sdk-macro" version = "1.2.11" dependencies = [ "bs58 0.3.1", -<<<<<<< HEAD "proc-macro2 1.0.18", "quote 1.0.7", - "syn 1.0.33", -======= - "proc-macro2 1.0.17", - "quote 1.0.6", "rustversion", - "syn 1.0.27", -] - -[[package]] -name = "solana-sdk-macro-frozen-abi" -version = "1.3.0" -dependencies = [ - "lazy_static", - "proc-macro2 1.0.17", - "quote 1.0.6", - "rustc_version", - "syn 1.0.27", ->>>>>>> 42f88484f... Update lock files + "syn 1.0.33", ] [[package]]