dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

`dx`'s help message shows that the hot-reloading is disabled by default, which is false (no pun intended)

Open Andrew15-5 opened this issue 10 months ago • 2 comments

Problem

      --hot-reload
          Build with hot reloading rsx. Will not work with release builds. [default: false]

It should say true. But how would you disable it? Can you pass in true/false? Maybe there should be a --no-hot-reload option instead.

Steps To Reproduce

Steps to reproduce the behavior:

  • dx -h
  • see the thing

Expected behavior

The message should say true.

Environment:

  • Dioxus version: v0.5.4
  • Rust version: 1.79.0, nightly
  • OS info: Pop_!OS
  • App platform: fullstack

Questionnaire

  • [ ] I'm interested in fixing this myself but don't know where to start
  • [ ] I would like to fix and I have a solution
  • [x] I don't have time to fix this right now, but maybe later

Andrew15-5 avatar Apr 03 '24 19:04 Andrew15-5

I find this flag confusing too. When trying to disable hot-reload, it throws an error:

> dx serve --hot-reload false

error: unexpected argument 'false' found

Usage: dx.exe serve [OPTIONS] [-- <CARGO_ARGS>...]

For more information, try '--help'.

It seems impossible to disable hot reload with serve.

Apollo-Roboto avatar Apr 15 '24 04:04 Apollo-Roboto

@ealmloff Hey there! I have recently learnt about rust and would like to contribute to the issue.

Yash-271120 avatar Apr 19 '24 04:04 Yash-271120

clap already adds default value if value can be set and omitted:

image

After compiling:

image

Andrew15-5 avatar Apr 24 '24 13:04 Andrew15-5