rustyscreeps / cargo-screeps

Build tool for deploying Rust WASM code to Screeps game servers
MIT License
25 stars 13 forks source link

Usage of --profile requires -Z unstable-options #30

Open smessmer opened 3 years ago

smessmer commented 3 years ago

Trying to run "cargo screeps build", I'm getting:

~/screeps (master) [1]> cargo screeps build
cargo_screeps::run: compiling...
error: usage of `--profile` requires `-Z unstable-options`
error: cargo-web build failed: build failed

Adding -Z unstable-options doesn't help either:

~/screeps (master) [1]> cargo +nightly -Z unstable-options screeps build
cargo_screeps::run: compiling...
error: usage of `--profile` requires `-Z unstable-options`
error: cargo-web build failed: build failed

Rust version:

~/screeps (master) [1]> rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/user/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu (default)
1.52-x86_64-unknown-linux-gnu

installed targets for active toolchain
--------------------------------------

wasm32-unknown-unknown
x86_64-unknown-linux-gnu

active toolchain
----------------

nightly-x86_64-unknown-linux-gnu (default)
rustc 1.56.0-nightly (0035d9dce 2021-08-16)

screeps.toml:

default_deploy_mode = "upload"
[upload]
auth_token = "[...]"
branch = "default"
smessmer commented 3 years ago

When I add a .cargo/config.toml with

[unstable]
unstable-options = true

then the error message changes to:

~/screeps (master)> cargo screeps build
cargo_screeps::run: compiling...
error: conflicting usage of --profile=dev and --release
The `--release` flag is the same as `--profile=release`.
Remove one flag or the other to continue.
error: cargo-web build failed: build failed
smessmer commented 3 years ago

It works if I remove the --release from https://github.com/rustyscreeps/cargo-screeps/blob/master/src/build.rs#L41, but I imagine that I'm getting a debug build then and I'd prefer a release build.

Also, I'm not actually getting a working debug build but I'm running into https://github.com/rustyscreeps/cargo-screeps/issues/29 then

korman commented 1 year ago

Me too