rust-shell-script / rust_cmd_lib

Common rust command-line macros and utilities, to write shell-script like tasks in a clean, natural and rusty way
https://docs.rs/cmd_lib/
Apache License 2.0
1.05k stars 37 forks source link

Does not work on stable anymore? #13

Closed Jokler closed 3 years ago

Jokler commented 4 years ago
error[E0554]: `#![feature]` may not be used on the stable release channel
 --> /home/jokler/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/cmd_lib_macros-0.1.0/src/lib.rs:1:1
  |
1 | #![feature(proc_macro_span)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0554`.
error: could not compile `cmd_lib_macros`.
gkourgkoutas commented 4 years ago

I get the same error. Compiling with nightly works.

rust-shell-script commented 3 years ago

see #12 and https://github.com/rust-lang/rust/issues/54725.

joseluis commented 3 years ago

The latest version that works for me on stable is v8.4 from 25th aug if referencing the github commit directly like this:

cmd_lib = {git = "https://github.com/rust-shell-script/rust_cmd_lib/", rev = "88eaa7988d27f517251be35fe8a7b21274d04837"}

Or version 0.7.8 when using crates.io: cmd_lib = "0.7.8"

I don't know why versions 0.8.0 to 0.8.4 don't work through crates.io on stable.

rust-shell-script commented 3 years ago

Version 0.10 can be built with stable rust toolchain, and it also includes other improvements. Just let me know if it works for you.

Jokler commented 3 years ago

Seems to work fine for me now. Thank you! :)

hendrikmaus commented 3 years ago

I am still facing an error in my (single) usage when trying to run on stable, while nightly still works.

error[E0277]: the trait bound `proc_macro2::Span: From<proc_macro::Span>` is not satisfied
   --> /home/hmaus/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro-error-1.0.4/src/lib.rs:549:37
    |
549 |                 first: self.clone().into(),
    |                                     ^^^^ the trait `From<proc_macro::Span>` is not implemented for `proc_macro2::Span`
    |
    = note: required because of the requirements on the impl of `Into<proc_macro2::Span>` for `proc_macro::Span`

error[E0277]: the trait bound `proc_macro2::Span: From<proc_macro::Span>` is not satisfied
   --> /home/hmaus/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro-error-1.0.4/src/lib.rs:550:36
    |
550 |                 last: self.clone().into(),
    |                                    ^^^^ the trait `From<proc_macro::Span>` is not implemented for `proc_macro2::Span`
    |
    = note: required because of the requirements on the impl of `Into<proc_macro2::Span>` for `proc_macro::Span`

I updated all my dependencies; here is my cargo tree:

├── anyhow v1.0.38
├── cmd_lib v0.10.1
│   └── cmd_lib_macros v0.6.0 (proc-macro)
│       ├── proc-macro2 v1.0.24
│       │   └── unicode-xid v0.2.1
│       ├── quote v1.0.9
│       │   └── proc-macro2 v1.0.24 (*)
│       └── syn v1.0.60
│           ├── proc-macro2 v1.0.24 (*)
│           ├── quote v1.0.9 (*)
│           └── unicode-xid v0.2.1
├── env_logger v0.8.3
│   ├── atty v0.2.14
│   │   └── libc v0.2.86
│   ├── humantime v2.1.0
│   ├── log v0.4.14
│   │   └── cfg-if v1.0.0
│   ├── regex v1.4.3
│   │   ├── aho-corasick v0.7.15
│   │   │   └── memchr v2.3.4
│   │   ├── memchr v2.3.4
│   │   ├── regex-syntax v0.6.22
│   │   └── thread_local v1.1.3
│   │       └── once_cell v1.6.0
│   └── termcolor v1.1.2
├── glob v0.3.0
├── log v0.4.14 (*)
├── rayon v1.5.0
│   ├── crossbeam-deque v0.8.0
│   │   ├── cfg-if v1.0.0
│   │   ├── crossbeam-epoch v0.9.2
│   │   │   ├── cfg-if v1.0.0
│   │   │   ├── crossbeam-utils v0.8.2
│   │   │   │   ├── cfg-if v1.0.0
│   │   │   │   └── lazy_static v1.4.0
│   │   │   │   [build-dependencies]
│   │   │   │   └── autocfg v1.0.1
│   │   │   ├── lazy_static v1.4.0
│   │   │   ├── memoffset v0.6.1
│   │   │   │   [build-dependencies]
│   │   │   │   └── autocfg v1.0.1
│   │   │   └── scopeguard v1.1.0
│   │   └── crossbeam-utils v0.8.2 (*)
│   ├── either v1.6.1
│   └── rayon-core v1.9.0
│       ├── crossbeam-channel v0.5.0
│       │   ├── cfg-if v1.0.0
│       │   └── crossbeam-utils v0.8.2 (*)
│       ├── crossbeam-deque v0.8.0 (*)
│       ├── crossbeam-utils v0.8.2 (*)
│       ├── lazy_static v1.4.0
│       └── num_cpus v1.13.0
│           └── libc v0.2.86
│   [build-dependencies]
│   └── autocfg v1.0.1
├── structopt v0.3.21
│   ├── clap v2.33.3
│   │   ├── ansi_term v0.11.0
│   │   ├── atty v0.2.14 (*)
│   │   ├── bitflags v1.2.1
│   │   ├── strsim v0.8.0
│   │   ├── textwrap v0.11.0
│   │   │   └── unicode-width v0.1.8
│   │   ├── unicode-width v0.1.8
│   │   └── vec_map v0.8.2
│   ├── lazy_static v1.4.0
│   └── structopt-derive v0.4.14 (proc-macro)
│       ├── heck v0.3.2
│       │   └── unicode-segmentation v1.7.1
│       ├── proc-macro-error v1.0.4
│       │   ├── proc-macro-error-attr v1.0.4 (proc-macro)
│       │   │   ├── proc-macro2 v1.0.24 (*)
│       │   │   └── quote v1.0.9 (*)
│       │   │   [build-dependencies]
│       │   │   └── version_check v0.9.2
│       │   ├── proc-macro2 v1.0.24 (*)
│       │   ├── quote v1.0.9 (*)
│       │   └── syn v1.0.60 (*)
│       │   [build-dependencies]
│       │   └── version_check v0.9.2
│       ├── proc-macro2 v1.0.24 (*)
│       ├── quote v1.0.9 (*)
│       └── syn v1.0.60 (*)
└── structopt-flags v0.3.6
    ├── log v0.4.14 (*)
    └── structopt v0.3.21 (*)
    [build-dependencies]
    └── skeptic v0.13.5
        ├── bytecount v0.6.2
        ├── cargo_metadata v0.10.0
        │   ├── semver v0.9.0
        │   │   ├── semver-parser v0.7.0
        │   │   └── serde v1.0.123
        │   ├── serde v1.0.123
        │   ├── serde_derive v1.0.123 (proc-macro)
        │   │   ├── proc-macro2 v1.0.24 (*)
        │   │   ├── quote v1.0.9 (*)
        │   │   └── syn v1.0.60 (*)
        │   └── serde_json v1.0.62
        │       ├── itoa v0.4.7
        │       ├── ryu v1.0.5
        │       └── serde v1.0.123
        ├── error-chain v0.12.4
        │   [build-dependencies]
        │   └── version_check v0.9.2
        ├── glob v0.3.0
        ├── pulldown-cmark v0.2.0
        │   └── bitflags v1.2.1
        ├── tempfile v3.2.0
        │   ├── cfg-if v1.0.0
        │   ├── libc v0.2.86
        │   ├── rand v0.8.3
        │   │   ├── libc v0.2.86
        │   │   ├── rand_chacha v0.3.0
        │   │   │   ├── ppv-lite86 v0.2.10
        │   │   │   └── rand_core v0.6.2
        │   │   │       └── getrandom v0.2.2
        │   │   │           ├── cfg-if v1.0.0
        │   │   │           └── libc v0.2.86
        │   │   └── rand_core v0.6.2 (*)
        │   └── remove_dir_all v0.5.3
        └── walkdir v2.3.1
            └── same-file v1.0.6

Is it at all related to this crate?

rust-shell-script commented 3 years ago

@hendrikmaus it looks like the errors were from proc-macro-error/structopt-derive/structopt.