koute / cargo-web

A Cargo subcommand for the client-side Web
Apache License 2.0
1.1k stars 80 forks source link

cargo web deploy fails only when run from justfile? #123

Open Boscop opened 6 years ago

Boscop commented 6 years ago

https://github.com/casey/just/issues/334

Why does cargo web deploy fail, but only when run from my justfile in powershell? http://pastebin.centos.org/1064996/23211891/

In cmd.exe it works:

> cargo web deploy
warning: debug builds on the wasm32-unknown-unknown are currently totally broken
         forcing a release build
    Finished release [optimized] target(s) in 0.60s
    Garbage collecting "frontend.wasm"...
    Processing "frontend.wasm"...
    Finished processing of "frontend.wasm"!
The `frontend` was deployed to "D:\\projects\\myproject\\target\\deploy"!

Btw: Why does it print so much verbose rustc stuff only when run from justfile? I don't have RUST_LOG set:

> Get-ChildItem Env:RUST_LOG
Get-ChildItem : Cannot find path 'RUST_LOG' because it does not exist.
At line:1 char:1
+ Get-ChildItem Env:RUST_LOG
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (RUST_LOG:String) [Get-ChildItem], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
koute commented 6 years ago

Why does it print so much verbose rustc stuff only when run from justfile?

It looks like either something is setting RUST_LOG, or perhaps env_logger turns the logging on by itself when it detects that it's running in that environment? Have you tried to look through env_logger sources and/or asking env_logger folks if they have any idea?

Why does cargo web deploy fail, but only when run from my justfile in powershell?

Well, unfortunately these logs are extremely hard to read due to the fact that they have a gazillion of random INFO messages and they're wordwrapped so it's not exactly trivias to filter those out.

From what I can see a bunch of crates did fail to compile for some reason:

error: Could not compile `cfg-if`.
error: Could not compile `fnv`.
error: Could not compile `iovec`.
error: Could not compile `itoa`.
error: Could not compile `dtoa`.
error: Could not compile `byteorder`.
error: Could not compile `rustc-demangle`.
error: Could not compile `serde`.

I'd suggest to try to reproduce this issue without the logging soup. (Maybe explicitly set RUST_LOG=error or something like that so that it only prints errors?)