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

'cargo leptos serve' does not play well with RUSTFLAGS="-Awarnings" #283

Open
mpalmer opened this issue May 15, 2024 · 0 comments
Open

'cargo leptos serve' does not play well with RUSTFLAGS="-Awarnings" #283

mpalmer opened this issue May 15, 2024 · 0 comments

Comments

@mpalmer
Copy link
Contributor

mpalmer commented May 15, 2024

Describe the bug

This will probably take the award for "weirdest bug of the week" -- at least I hope so...

It appears that cargo leptos serve fails when RUSTFLAGS is set to -Awarnings. It's fine with -Dwarnings, and cargo leptos watch is cool with funky RUSTFLAGS, but the combination of RUSTFLAGS=-Awarnings and cargo leptos serve ends in Confusion and Delay, and also the following error:

error: output of --print=file-names missing when learning about target-specific information from rustc
command was: `/home/mpalmer/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc - --crate-name ___ --print=file-names
 -Awarnings --target wasm32-unknown-unknown --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg`

--- stdout
___.wasm
lib___.rlib
___.wasm
lib___.a
/home/mpalmer/.rustup/toolchains/stable-x86_64-unknown-linux-gnu
off
___
debug_assertions
panic="abort"
proc_macro
target_abi=""
target_arch="wasm32"
target_endian="little"
target_env=""
target_family="wasm"
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_os="unknown"
target_pointer_width="32"
target_vendor="unknown"

Leptos Dependencies

actix-files = { version = "0.6", optional = true }
actix-web = { version = "4", optional = true, features = ["macros"] }
console_error_panic_hook = "0.1"
http = { version = "1.0.0", optional = true }
leptos = { version = "0.6" }
leptos_meta = { version = "0.6" }
leptos_actix = { version = "0.6", optional = true }
leptos_router = { version = "0.6" }
wasm-bindgen = "=0.2.92"

To Reproduce
Steps to reproduce the behavior:

  1. Create a new project with cargo leptos new --git leptos-rs/start (I chose not to use nightly features, if that turns out to matter)
  2. Run cargo leptos serve, note that everything's fine.
  3. Run RUSTFLAGS=-Awarnings cargo leptos serve, note that everything goes pear-shaped.

Expected behavior

Well... not that. 😆 It should probably fail on my code, not rustc...

@gbj gbj transferred this issue from leptos-rs/leptos May 19, 2024
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

1 participant