dioxus/packages
Brian Donovan 9cef71b6b9
fix(cli): improve error message for invalid config (#1200)
Previously an invalid `Dioxus.toml` file would yield this error when running e.g. `dx serve`:

```
Error: Failed to load `Dioxus.toml` because: Dioxus.toml parse failed
```

This doesn't give any indication why it failed to parse. This commit updates it to include why the parsing failed, e.g.:

```
Error: Failed to load Dioxus config because: Dioxus.toml missing field `name` for key `application` at line 38 column 1
```

I initially had it format the message to include `Dioxus.toml:38:1` to be clickable in some terminals, but the location specified didn't always seem particularly relevant to the actual problem so I left it as-is.

This also fixes what I believe would be an issue on case-sensitive file systems where if `dioxus.toml` existed it would try to read `Dioxus.toml`.

I'm still fairly new to Rust, so the `.as_path()` calls may not be the best way to deal with the fact that the borrow checker wouldn't let me re-use `crate_dir` and `dioxus_conf_file`. I'm open to suggestions!
2023-07-15 11:13:22 -05:00
..
autofmt Merge pull request #1170 from DioxusLabs/jk/move-vscode-extension 2023-07-08 20:43:34 -07:00
cli fix(cli): improve error message for invalid config (#1200) 2023-07-15 11:13:22 -05:00
core Add lazy contexts to signals 2023-07-14 12:52:49 -07:00
core-macro Fix clippy lint 2023-07-14 13:22:08 -07:00
desktop fix: Remove duplicated doc links and improved some descriptions (#1167) 2023-07-08 11:04:27 -05:00
dioxus fix: Remove duplicated doc links and improved some descriptions (#1167) 2023-07-08 11:04:27 -05:00
dioxus-tui Merge pull request #940 from Demonthos/make-widgets-cross-framework 2023-07-11 20:47:01 -07:00
extension Bump version and make clippy happy 2023-07-08 19:44:33 -07:00
fermi Merge branch 'master' into master 2023-07-14 15:36:28 -07:00
fullstack fix: Remove duplicated doc links and improved some descriptions (#1167) 2023-07-08 11:04:27 -05:00
hooks Merge pull request #1128 from marc2332/feat/improved-docs 2023-07-14 15:20:40 -07:00
hot-reload fix: Remove duplicated doc links and improved some descriptions (#1167) 2023-07-08 11:04:27 -05:00
html fix: Remove duplicated doc links and improved some descriptions (#1167) 2023-07-08 11:04:27 -05:00
interpreter fix: Remove duplicated doc links and improved some descriptions (#1167) 2023-07-08 11:04:27 -05:00
liveview fix: Remove duplicated doc links and improved some descriptions (#1167) 2023-07-08 11:04:27 -05:00
mobile fix: Remove duplicated doc links and improved some descriptions (#1167) 2023-07-08 11:04:27 -05:00
native-core Merge pull request #940 from Demonthos/make-widgets-cross-framework 2023-07-11 20:47:01 -07:00
native-core-macro Merge pull request #940 from Demonthos/make-widgets-cross-framework 2023-07-11 20:47:01 -07:00
rink Merge pull request #940 from Demonthos/make-widgets-cross-framework 2023-07-11 20:47:01 -07:00
router fix: Remove duplicated doc links and improved some descriptions (#1167) 2023-07-08 11:04:27 -05:00
rsx Change missing trailing comma span to point to span where comma is missing from 2023-07-02 15:19:03 +02:00
rsx-rosetta Get wasm bundling working 2023-07-08 14:24:01 -07:00
signals Add lazy contexts to signals 2023-07-14 12:52:49 -07:00
ssr fix: Remove duplicated doc links and improved some descriptions (#1167) 2023-07-08 11:04:27 -05:00
web Merge branch 'master' into timeout-count 2023-07-12 13:41:36 -07:00