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

grin_wallet compilation error - impl Trait in return position is experimental (see issue #34511) #1076

Closed
Thireus opened this issue May 21, 2018 · 6 comments

Comments

@Thireus
Copy link

Thireus commented May 21, 2018

   Compiling grin_wallet v0.2.0 (file:///home/thireus/grin/wallet)
error[E0658]: `impl Trait` in return position is experimental (see issue #34511)
  --> wallet/src/grinwallet/selection.rs:39:34
   |
39 | ) -> Result<(transaction::Slate, impl FnOnce() -> Result<(), Error>), Error> {
   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0658]: `impl Trait` in return position is experimental (see issue #34511)
   --> wallet/src/grinwallet/selection.rs:110:26
    |
110 | ) -> Result<(Identifier, impl FnOnce() -> Result<(), Error>), Error> {
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `rand::thread_rng`
  --> wallet/src/grinwallet/keys.rs:16:5
   |
16 | use rand::thread_rng;
   |     ^^^^^^^^^^^^^^^^
   |
   = note: #[warn(unused_imports)] on by default

warning: unused import: `uuid::Uuid`
  --> wallet/src/grinwallet/keys.rs:17:5
   |
17 | use uuid::Uuid;
   |     ^^^^^^^^^^

warning: unused imports: `Committed`, `Transaction`, `amount_to_hr_string`
  --> wallet/src/grinwallet/keys.rs:19:18
   |
19 | use core::core::{amount_to_hr_string, Committed, Transaction};
   |                  ^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^  ^^^^^^^^^^^

warning: unused import: `failure::ResultExt`
  --> wallet/src/grinwallet/keys.rs:20:5
   |
20 | use failure::ResultExt;
   |     ^^^^^^^^^^^^^^^^^^

warning: unused imports: `BlindSum`, `BlindingFactor`
  --> wallet/src/grinwallet/keys.rs:21:16
   |
21 | use keychain::{BlindSum, BlindingFactor, Identifier, Keychain};
   |                ^^^^^^^^  ^^^^^^^^^^^^^^

warning: unused imports: `aggsig`, `build`
  --> wallet/src/grinwallet/keys.rs:22:17
   |
22 | use libwallet::{aggsig, build};
   |                 ^^^^^^  ^^^^^

warning: unused import: `util::secp::Signature`
  --> wallet/src/grinwallet/keys.rs:24:5
   |
24 | use util::secp::Signature;
   |     ^^^^^^^^^^^^^^^^^^^^^

warning: unused imports: `PublicKey`, `SecretKey`
  --> wallet/src/grinwallet/keys.rs:25:23
   |
25 | use util::secp::key::{PublicKey, SecretKey};
   |                       ^^^^^^^^^  ^^^^^^^^^

warning: unused imports: `LOGGER`, `secp`
  --> wallet/src/grinwallet/keys.rs:26:12
   |
26 | use util::{secp, LOGGER};
   |            ^^^^  ^^^^^^

warning: use of deprecated item 'util::<unnamed>::aggsig::sign_single': underlying aggsig api still subject to review and change
   --> wallet/src/libwallet/aggsig.rs:293:12
    |
293 |     let sig = aggsig::sign_single(secp, &msg, &skey, None, None, None)?;
    |               ^^^^^^^^^^^^^^^^^^^
    |
    = note: #[warn(deprecated)] on by default

warning: use of deprecated item 'util::<unnamed>::aggsig::verify_single': underlying aggsig api still subject to review and change
   --> wallet/src/libwallet/aggsig.rs:307:2
    |
307 |     aggsig::verify_single(secp, &sig, &msg, None, &pubkey, false)
    |     ^^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item 'util::<unnamed>::aggsig::verify_single': underlying aggsig api still subject to review and change
   --> wallet/src/libwallet/aggsig.rs:331:2
    |
331 |     aggsig::verify_single(secp, sig, msg, pubnonce, pubkey, is_partial)
    |     ^^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item 'util::<unnamed>::aggsig::add_signatures_single': underlying aggsig api still subject to review and change
   --> wallet/src/libwallet/aggsig.rs:341:12
    |
341 |     let sig = aggsig::add_signatures_single(&secp, part_sigs, &nonce_sum)?;
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item 'util::<unnamed>::aggsig::sign_single': underlying aggsig api still subject to review and change
   --> wallet/src/libwallet/aggsig.rs:352:12
    |
352 |     let sig = aggsig::sign_single(secp, &msg, skey, None, None, None)?;
    |               ^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item 'util::<unnamed>::aggsig::export_secnonce_single': underlying aggsig api still subject to review and change
  --> wallet/src/libwallet/aggsig.rs:95:17
   |
95 |                     sec_nonce: aggsig::export_secnonce_single(secp).unwrap(),
   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item 'util::<unnamed>::aggsig::sign_single': underlying aggsig api still subject to review and change
   --> wallet/src/libwallet/aggsig.rs:165:13
    |
165 |         let sig = aggsig::sign_single(secp, msg, &self.sec_key, secnonce, pubnonce, nonce_sum)?;
    |                   ^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item 'util::<unnamed>::aggsig::add_signatures_single': underlying aggsig api still subject to review and change
   --> wallet/src/libwallet/aggsig.rs:253:13
    |
253 |         let sig = aggsig::add_signatures_single(&secp, part_sigs, &nonce_sum)?;
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item 'util::<unnamed>::pedersen::<impl util::<unnamed>::Secp256k1>::bullet_proof': Experimental - underlying code unreviewed and subject to change
  --> wallet/src/libwallet/proof.rs:53:22
   |
53 |         return Ok(k.secp().bullet_proof(amount, skey, nonce, extra_data, None));
   |                            ^^^^^^^^^^^^

warning: use of deprecated item 'util::<unnamed>::pedersen::<impl util::<unnamed>::Secp256k1>::bullet_proof': Experimental - underlying code unreviewed and subject to change
  --> wallet/src/libwallet/proof.rs:63:4
   |
63 |         .bullet_proof(amount, skey, nonce, extra_data, Some(msg)));
   |          ^^^^^^^^^^^^

warning: use of deprecated item 'util::<unnamed>::pedersen::<impl util::<unnamed>::Secp256k1>::verify_bullet_proof': Experimental - underlying code unreviewed and subject to change
  --> wallet/src/libwallet/proof.rs:72:20
   |
72 |     let result = secp.verify_bullet_proof(commit, proof, extra_data);
   |                       ^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item 'util::<unnamed>::pedersen::<impl util::<unnamed>::Secp256k1>::unwind_bullet_proof': Experimental - underlying code unreviewed and subject to change
  --> wallet/src/libwallet/proof.rs:89:4
   |
89 |         .unwind_bullet_proof(commit, skey, nonce, extra_data, proof);
   |          ^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

error: Could not compile `grin_wallet`.

For reference:

rustc --version
rustc 1.25.0 (84203cac6 2018-03-25)
@hashmap
Copy link
Contributor

hashmap commented May 22, 2018

@Thireus you need 1.26, please run rustup update to get it.

@Thireus
Copy link
Author

Thireus commented May 22, 2018

I know, but:

@sesam
Copy link
Contributor

sesam commented May 22, 2018

TL;DR of rust-lang/rustup#1410 is

There are nice features in 1.26 - aka latest stable - mentioned as OK to use before ARM rustc troubles were known.

Solution seem to be to wait for 1.27, then hardcode rustc to 1.27 and hope everything works everywhere.

Then do some testing each time we want to raise rustc version. I.e. more work.

I think this would be a great topic to debate today at 22.00 UTC in https://gitter.im/grin_community/dev

@hashmap
Copy link
Contributor

hashmap commented May 22, 2018

I'd also test nightly on ARM

@clefru
Copy link

clefru commented May 24, 2018

Rust 1.26 is 14 days old and hasn't even hit the bleeding edge branch of my distro[1]. rustup might work for individual installations but doesn't for packaging. As a general rule, I would welcome a softer requirement on being up-to-date.

[1] NixOS/nixpkgs#40356 was opened around 24h after 1.26 was released, so my distro isn't really slacking on this.

@ignopeverell
Copy link
Contributor

We'll definitely soften that requirement when we get closer to release, and as you mention, packaging. But at this stage aggressive update is actually good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants