use-ink / ink-playground

Browser Based Playground for editing, sharing & compiling ink! Smart Contracts
https://ink-playground.substrate.io
Apache License 2.0
26 stars 17 forks source link

`make backend-run` fails #728

Closed JoshOrndorff closed 1 year ago

JoshOrndorff commented 1 year ago

The make backend-run` command in the readme fails for me on latest master.

$ make backend-run

cargo run -p backend -- --frontend_folder packages/playground/dist --port 4000
    Finished dev [unoptimized + debuginfo] target(s) in 0.15s
     Running `target/debug/backend --frontend_folder packages/playground/dist --port 4000`
thread 'main' panicked at 'Command backend: Short option names must be unique for each argument, but '-h' is in use by both 'host' and 'help' (call `cmd.disable_help_flag(true)` to remove the auto-generated `--help`)', /home/joshy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.3.0/src/builder/debug_asserts.rs:115:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
make: *** [Makefile:133: backend-run] Error 101
JoshOrndorff commented 1 year ago

The issue seems similar to this one https://github.com/mozilla/rust-code-analysis/issues/997 Both about clashing -h options. I notice there is no Cargo.lock file committed, so maybe this happens because of changing dependencies.

Let me try to fix it the same way.

achimcc commented 1 year ago

Great, thanks! Indeed, this happened somehow because of a recent Clap update, thanks!

achimcc commented 1 year ago

https://github.com/paritytech/ink-playground/pull/732 fixed this and the new CI config provided by https://github.com/paritytech/ink-playground/pull/734 and https://github.com/paritytech/ink-playground/pull/735 should prevent these types of problems in the future.