Commit graph

363 commits

Author SHA1 Message Date
Jonathan Kelley
bca5335f31
fix: hotreloading files with multiple templates, asset hotreloading 2024-03-13 02:13:37 -07:00
Jonathan Kelley
05476cad76
Merge branch 'main' into jk/fix-hotreloading-issues 2024-03-12 14:38:36 -07:00
Evan Almloff
82ab212414 don't quit serving early if builds fail 2024-03-12 16:37:20 -05:00
Jonathan Kelley
ad7a350d2e
fix hotreloading issues in the CLI 2024-03-12 13:39:42 -07:00
Evan Almloff
6b84f284c9 fix manganis assets overlapping between examples 2024-03-11 17:11:52 -05:00
JeremyChen
70f97ec787
enhance: avoid failed hot-reload if backup file like .rs~ generate (#2048)
(cherry picked from commit 8565bca11b)

Co-authored-by: Jeremy Chen <jeremychen@djeremychen.com>
2024-03-11 09:30:25 -05:00
Robin Tretter
8eda67ecb2
added hot-reload as config option with default to true (#2024) 2024-03-08 14:54:03 -06:00
rtretter
3ffb1facf3 search for first valid platform in features 2024-03-06 21:38:11 +01:00
rtretter
f62c81ea0d added automatic platform detection to cli if none is passed 2024-03-06 21:16:51 +01:00
Jonathan Kelley
be29c1fdaa
chore: move all packages onto workspace versions 2024-02-21 14:30:13 -08:00
Evan Almloff
c4a4a31eec Merge branch 'master' into pr/atty303/1948 2024-02-19 08:35:31 -06:00
Jonathan Kelley
ebdb98bff2
Make clippy happy, pass tests 2024-02-18 21:08:48 -08:00
Jonathan Kelley
d732269b8f
backend proxy tests almost work! 2024-02-18 09:45:27 -08:00
Evan Almloff
e7d8a25d17 get the dioxus CLI compiling 2024-02-16 14:55:44 -06:00
Koji AGAWA
1f0e03ca19 feat(fullstack): support wasm target 2024-02-17 05:12:33 +09:00
Evan Almloff
194d90e66f fix a few CLI errors 2024-02-16 12:39:36 -06:00
Jonathan Kelley
2763adb2d3
clean up workflow, fix some more axum stuff 2024-02-15 19:03:46 -08:00
Jonathan Kelley
64a321eacc
Get more axum stuff upgraded to 0.7 2024-02-15 18:59:57 -08:00
Jonathan Kelley
214a907adc
Upgrade to axum 0.7, drop 3rd party adapters 2024-02-15 18:05:30 -08:00
Evan Almloff
f4651cecb8
Merge pull request #1916 from DogeDark/master
Add Prerelease Doc Generation
2024-02-09 12:45:59 -06:00
Evan Almloff
b4d17abfc1 document all features 2024-02-09 12:15:59 -06:00
Evan Almloff
d1ed15c2ac fix autofmt tests 2024-02-08 10:13:57 -06:00
Evan Almloff
23e15ee9c8 change rustfmt flag to all_code now that we don't use rustfmt 2024-02-08 10:03:52 -06:00
Evan Almloff
b88c66d8df report syn parse errors to the user 2024-02-08 10:00:25 -06:00
Evan Almloff
65d4f922b4 Merge branch 'master' into pr/Dangerised/1902 2024-02-08 09:41:08 -06:00
Dangerise
c89a4b37dc remove the link in comment and unused error variant 2024-02-07 22:35:55 +08:00
Evan Almloff
3270f7341a fix manganis support for dioxus desktop 2024-02-06 11:39:30 -06:00
Evan Almloff
1909b05412 Merge branch 'master' into pr/Andrew15-5/1903 2024-02-06 10:28:49 -06:00
Evan Almloff
7f32809a96 use out_dir in a few more places 2024-02-06 10:27:26 -06:00
Dangerise
82fc7acaa5 remove debug print 2024-02-06 21:04:37 +08:00
Dangerise
71125c22e0 remove unused import 2024-02-06 21:03:04 +08:00
Dangerise
d170304a59 remove dead code 2024-02-06 21:01:33 +08:00
Dangerise
192fa3471b clippy fix 2024-02-06 20:56:12 +08:00
Dangerise
f40e2f3cef replace gitignore with ignore 2024-02-06 20:53:28 +08:00
Jonathan Kelley
4f8868d43d
Merge pull request #1791 from ealmloff/breaking
Remove scope, use_state, use_ref, bump allocator and make everything 'static
2024-02-05 14:19:47 -08:00
Andrew Voynov
ea9622a75c
fix(serve): fixed long rebuilds with dx serve 2024-02-06 00:27:45 +03:00
Evan Almloff
417cea7569
Merge pull request #1898 from Andrew15-5/fix-fullstack-cli-build
Now fullstack client uses correct config via `dx build`
2024-02-05 09:28:45 -06:00
Dangerise
2eec2bc673 add rustfmt support 2024-02-05 21:51:49 +08:00
Andrew Voynov
009238b068
feat(cli): added short release build option
Same as `cargo build` has `-r` now `dx build` and `dx bundle` also have
it. Since user probably wants to use these commands for production-ready
artifacts, the `--release` option is probably used often, same as with
`cargo build`. This allow users to use the same `build -r` "pattern".
2024-02-04 23:36:43 +03:00
Andrew Voynov
62b0f876f2
fix(build): now fullstack client uses correct config 2024-02-04 18:56:59 +03:00
Jonathan Kelley
0bd9692e45
Fix cargo test and a number of little cleanup bugs 2024-01-30 17:33:14 -08:00
Jonathan Kelley
eff1dd6c90
Merge branch 'master' into breaking 2024-01-30 16:20:19 -08:00
ealmloff
d5c17af13c
Merge pull request #1882 from Andrew15-5/refactor-crateconfig-struct
Converted `out_dir` and `asset_dir` fields to methods in `CrateConfig` (cli-config refactor)
2024-01-30 16:24:14 -06:00
Andrew Voynov
48957b11d8
refactor(cli-config): modified CrateConfig struct
`out_dir` and `asset_dir` are now methods, because they derive from
`crate_dir` and `dioxus_config`.
2024-01-30 23:23:00 +03:00
Andrew Voynov
c22014571e
refactor(cli): added multiple nested errors support
Before the top-level error message would print the dependent error
message. Now multiple nested errors can be shown (with anyhow context).
2024-01-30 18:09:21 +03:00
YuKun Liu
37e5f53f9e
Merge branch 'master' into master 2024-01-28 11:57:38 -08:00
YuKun Liu
492f49700a fix: cargo fmt 2024-01-28 11:52:42 -08:00
YuKun Liu
a0508861bc fix: upgrade crates & fixed repeat build error 2024-01-28 11:51:02 -08:00
ealmloff
df74e4c2fc
Merge pull request #1874 from marc2332/feat/reduce-cli-deps
feat: Reduce cli deps
2024-01-27 20:22:22 -06:00
ealmloff
d83a6d683f
use the workspace version of futures utils 2024-01-27 20:07:16 -06:00
marc2332
63b82b279b
ok 2024-01-27 22:29:28 +01:00
marc2332
fad0607667
feat: Reduce CLI deps 2024-01-27 22:27:23 +01:00
Andrew Voynov
f7041b118d
chore(deps): bump cargo-generate from 0.18 to 0.19
When building the `dx` CLI there is 1 less dependency (from 710 to 709).
2024-01-27 21:52:52 +03:00
Evan Almloff
636aeb4b90 integrate liveview with the launch builder 2024-01-22 11:56:34 -06:00
Ege Gungordu
91e378fc5e mark hot-reload flag incompatible with release 2024-01-20 20:49:45 +03:00
Jonathan Kelley
6ed3aafb2f
Get cargo check --all working 2024-01-18 19:27:55 -08:00
Jonathan Kelley
d8af9b7ed1
Fix compile checks on numerous packages using --all --all-features 2024-01-18 16:27:43 -08:00
Granville Schmidt
b372701d30
fix wording in CLI building waiting message 2024-01-17 18:13:58 -07:00
Evan Almloff
611f0d3b5f Merge branch 'maybe-sync-signal' into breaking 2024-01-16 13:49:53 -06:00
Evan Almloff
d44b0b34c8 Merge branch 'master' into breaking 2024-01-16 10:38:55 -06:00
hem1t
c6e1b0f728
init subcommand (#1840)
* `init` subcommand

* clippy
2024-01-16 10:25:07 -06:00
hem1t
1db8bd7edd
Minor fixes in cli (#1837)
* not using bin, until needed

also removes an unnecessary warning!

* removed redundant line

maybe, it was readability?

* using same `if let` pattern as below

* to `get_bin(args.bin)?` with `Ok(())` at last

* unreachable!
2024-01-16 07:21:01 -06:00
Evan Almloff
d17a04931b Merge branch 'master' into breaking 2024-01-15 12:01:09 -06:00
Jonathan Kelley
1dde044697
remove cx.render 2024-01-13 21:12:21 -08:00
Jonathan Kelley
fae0b08e61
Fix the router and stub out a number of crates to get compiling 2024-01-13 20:51:37 -08:00
Hampus Lidin
011116b83d
Fix panic when using dev profile (#1824) 2024-01-13 13:07:38 -06:00
Jonathan Kelley
f7bf156422
Merge pull request #1810 from DioxusLabs/jk/disambiguate-exprs-in-rsx
Disambiguate if expressions in rsx by requiring curlies, allow shorthand component/element initialization
2024-01-11 12:25:59 -08:00
Jonathan Kelley
3ef15577eb
Merge pull request #1807 from ealmloff/assets-optional
Only support manganis in the CLI
2024-01-11 12:18:24 -08:00
hem1t
8be9a7192b
using cargo.toml version (#1813)
- Replaced `CFG_RELEASE` with `CARGO_PKG_VERSION`
- No rerun on `CFG_RELEASE`
2024-01-11 13:50:23 -06:00
Jonathan Kelley
c5dfbd7913
fix test 2024-01-10 22:52:41 -08:00
Evan Almloff
e004c1722f set the required environment variable for manganis support 2024-01-10 11:19:51 -06:00
ealmloff
e1e29d1404
Merge branch 'master' into maybe-sync-signal 2024-01-09 15:31:31 -06:00
Evan Almloff
663296ae45 make collect-assets not optional in dioxus fullstack 2024-01-09 13:58:28 -06:00
TKirishima
48e413a4f3
fix: no project-name in argument of dx create (#1803) 2024-01-09 13:22:38 -06:00
Jonathan Kelley
2876a7deb2
Merge branch 'master' into feat/inline-attributes-fmt 2024-01-08 20:00:14 -08:00
Jonathan Kelley
28a9dc6805
Pin assets sha to keep CI in check 2024-01-08 14:54:02 -08:00
ealmloff
c7e104c0f0
Merge branch 'master' into maybe-sync-signal 2024-01-08 16:27:11 -06:00
Evan Almloff
2cc6f2f51f fix merge and reorganize the CLI a bit 2024-01-08 13:39:12 -06:00
Evan Almloff
23509ada9f Merge branch 'master' into cli-config-library 2024-01-08 13:24:16 -06:00
Jonathan Kelley
fb40e72520
Merge pull request #1603 from divinerapier/master
Bump tauri bundler for using proxy to fetch resources
2024-01-08 10:38:05 -08:00
ealmloff
f54ee1c361
Merge branch 'master' into map-signal 2024-01-05 18:30:31 -06:00
Jonathan Kelley
785b61a05e
Merge branch 'master' into intigrate-collect-assets 2024-01-05 12:13:31 -08:00
Evan Almloff
4f654d61b7 fix cargo check 2024-01-04 19:05:36 -06:00
Evan Almloff
b1de7d850c Merge branch 'master' into intigrate-collect-assets 2024-01-04 18:44:29 -06:00
Teague Lasser
334e7e6f22
Updated packages and comments referencing old CLI location (#1786) 2024-01-04 18:41:05 -06:00
ealmloff
f913b2ce53
don't cache assets in the CLI (#1742) 2024-01-04 09:06:57 -06:00
Bennett-Petzold
80a8e1f512
Add Cargo Arguments and Cross-Architecture Support (#1777)
* Add passthrough to cargo build

* Add platform_triple flag

* Add handling to bundle and serve commands

* Show full stacked error from Tauri in bundling

Previously only the top-level error was shown, giving only vague data
for debugging the build process

* Adjust bundle platform triple when cross compiling

* Rename --platform-triple to --target

* restore some deleted docs on CLI commands

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2024-01-02 15:19:29 -06:00
Evan Almloff
cddcd69200 Merge branch 'maybe-sync-signal' into map-signal 2024-01-02 14:17:01 -06:00
Evan Almloff
15dff7ad55 delete a leftover dioxusin file on all unix operating systems, not just mac 2023-12-30 11:58:09 -06:00
Evan Almloff
ab79c00cd8 kill the fullstack server before starting another one 2023-12-29 16:07:44 -06:00
Evan Almloff
49be972507 make dx clean clean the new .dioxus directory 2023-12-29 15:20:30 -06:00
Evan Almloff
1683ec8a72 introduce RAIIChild to drop the child process for desktop even when the exit is not planned 2023-12-29 14:36:18 -06:00
Evan Almloff
d88a662877 Rename --debug to --force-debug and improve docs 2023-12-29 11:11:39 -06:00
Evan Almloff
1acfd46b0b fix formatting 2023-12-29 10:08:10 -06:00
Evan Almloff
f7881aa1f0 fix some merge conflicts 2023-12-29 09:46:58 -06:00
Evan Almloff
601c63b67f manually apply debug assertions flag for fullstack debug mode 2023-12-22 09:25:35 -06:00
Evan Almloff
0914298bea Merge branch 'intigrate-collect-assets' of https://github.com/Demonthos/dioxus into intigrate-collect-assets 2023-12-21 18:05:02 -06:00
Evan Almloff
8b125231f0 make backend and frontend builds happen in parallel 2023-12-21 18:04:35 -06:00
ealmloff
2853b16cd6
Merge branch 'DioxusLabs:master' into intigrate-collect-assets 2023-12-21 14:00:35 -06:00
Evan Almloff
5ab0c48ddd fix clippy 2023-12-17 17:55:02 -06:00
Evan Almloff
2a764aaf6a remove some unused CLI imports 2023-12-17 15:42:58 -06:00
Evan Almloff
e7515d18c1 show multiple different error messages in hot reloading 2023-12-17 15:39:48 -06:00
Exotik850
cf413780c1
Make hot reload error only show once (#1725) 2023-12-17 15:26:40 -06:00
Evan Almloff
f646f68b60 Merge branch 'master' into maybe-sync-signal 2023-12-15 18:38:06 -06:00
Evan Almloff
70c3abb8df Merge branch 'master' into maybe-sync-signal 2023-12-14 12:29:32 -06:00
Exotik850
1ec230ae29
Autoformat ignores files in .gitignore (#1704)
* Make autofmt ignore gitignored files

* don't panic if it can't get the git ignore files

* replace some with ok

* Filter rs files from gitignore

* fmt

* remove early return

* only ignore paths that start with target

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-12-13 09:44:01 -06:00
xfalcon
0cb13942da
fix: command error with dx build --verbose (#1715)
error msg: cannot set both --verbose and --quiet
2023-12-13 08:30:40 -06:00
YuKun Liu
695bf009d1
fix: dx create not work (#1709) 2023-12-11 13:27:55 -06:00
Benjamin Manns
972235bd6f
Fix doc tests by adding formatting to CLI README (#1706)
The README for cli gets included in lib.rs via `include_str!`. The code snippets then get assumed to be Rust, which fails if running `cargo test --doc`. This is not a huge problem, but was brought to my attention because Nix's `buildRustPackage` runs `cargo test` including doc tests (unlike what get run for this project on CI). This means I can't update the Nix package to 0.4.3 without changing the test flags (which I think I'll see about doing anyways, as that's how Dioxus runs CI).
2023-12-10 12:16:59 -06:00
marc2332
ce5d7bd11b
rename to split-line-attributes 2023-12-09 16:51:41 +01:00
marc2332
52cb5ff951
feat: --inline-attributes option for autofmt 2023-12-09 11:16:26 +01:00
Evan Almloff
66e2c02bf7 Merge branch 'master' into intigrate-collect-assets 2023-12-08 08:49:17 -06:00
Exotik850
fc31876a57
Wasm target check before build (#1689)
* Add `rustup show` check for wasm32 target

* better place for check

* fmt

* clippy fmt
2023-12-07 12:35:16 -06:00
Jonathan Kelley
fe7df0c6a5
Merge pull request #1697 from ealmloff/hot-reload-temp-dir 2023-12-07 09:18:10 -08:00
Evan Almloff
9a13df2c73 move hot reload socket into the target directory 2023-12-07 07:00:59 -06:00
Jonathan Kelley
8f1791c039
Merge pull request #1597 from ColonelThirtyTwo/fmt-indent
Use indentation settings in dx fmt and vscode extension
2023-12-06 22:06:16 -08:00
Jonathan Kelley
edebe5be4a
Merge pull request #1653 from ealmloff/fix-hot-reload-missing-items
Fix missing items in hot reloading diffing
2023-12-06 21:38:36 -08:00
Jonathan Kelley
ea15c6a2eb
Merge branch 'master' into cli-config-library 2023-12-06 21:30:14 -08:00
Jonathan Kelley
d3f6ff703c
Release 0.4.3
dioxus@0.4.3
dioxus-autofmt@0.4.3
dioxus-check@0.4.3
dioxus-cli@0.4.3
dioxus-core@0.4.3
dioxus-core-macro@0.4.3
dioxus-desktop@0.4.3
dioxus-fullstack@0.4.3
dioxus-hooks@0.4.3
dioxus-hot-reload@0.4.3
dioxus-html@0.4.3
dioxus-interpreter-js@0.4.3
dioxus-liveview@0.4.3
dioxus-mobile@0.4.3
dioxus-native-core@0.4.3
dioxus-native-core-macro@0.4.3
dioxus-router@0.4.3
dioxus-router-macro@0.4.3
dioxus-rsx@0.4.3
dioxus-signals@0.4.3
dioxus-ssr@0.4.3
dioxus-tui@0.4.3
dioxus-web@0.4.3
dioxus_server_macro@0.4.3
fermi@0.4.3
generational-box@0.4.3
plasmo@0.4.3
rsx-rosetta@0.4.3

Generated by cargo-workspaces
2023-12-06 16:56:35 -08:00
Evan Almloff
b965fc23e9 use a temp directory for the hot reloading pipe on desktop, fullstack and liveview 2023-12-06 17:01:51 -06:00
Raul Cesar Teixeira
8149868ebc
Fixed conflict of "--verbose" and "--quiet" flags (#1686)
Co-authored-by: Raul Cesar <raul@zideco.dev>
2023-12-04 18:11:02 -06:00
Felix F Xu
d404ddfccf
fix false notification/rebuild for dx hot-reload (#1684)
* fix false notification/rebuild for dx hot-reload

* Make sure we have permissions and the changed file exists before reading the metadata

---------

Co-authored-by: ealmloff <evanalmloff@gmail.com>
2023-12-03 20:02:30 -06:00
Felix F Xu
a2ca1760c9
Set local_socket_stream to blocking (default) (#1682) 2023-12-02 19:25:27 -06:00
Evan Almloff
532ffaa614 fix merge 2023-11-20 18:36:18 -06:00
Evan Almloff
557630c419 Merge branch 'master' into cli-config-library 2023-11-20 18:35:24 -06:00
Evan Almloff
8cf8f66c27 add more logging to desktop hot reloading 2023-11-20 09:47:03 -06:00
Evan Almloff
0ee21dff1e fix missing item in hot reloading diffing 2023-11-20 09:33:39 -06:00
HJin.me
ff6c7efb41
fix: tailwind.css use absolute path (#1649) 2023-11-19 11:22:54 -06:00
Raman Hafiyatulin
098689083d
Related to #1547: use dioxus-cli within a workspace (wildcard-members, real package names) (#1642)
* Related to #1547: use `dioxus-cli` within a workspace

Although the `dx` CLI allows to specify a package name to chose from workspace members,
it does not support workspace members specified as glob-wildcards.
Neither it respects the effective package name, specified in the crate's `Cargo.toml`.

This PR addresses that issue:
- upon `dx build ...`, if the `--bin` CLI-argument is provided, treat the current dir as a workspace;
- search through the workspace's `members`: resolve each of them with `glob`;
- assume that any workspace member has a `Cargo.toml` in it (cargo does it, so it's okay);
- read said manifest, and check the package name in it;
- if found — there we have our sought package.

* Use cargo-metadata to find out the workspace structure

* glob is unused
2023-11-15 15:14:16 -06:00
Evan Almloff
e11f3fdc48 fix clippy 2023-11-15 09:30:15 -06:00
Evan Almloff
9bb464dd7d fix cli tests 2023-11-15 09:29:15 -06:00
Evan Almloff
cd48b3b7f9 allow base_path in the CLI 2023-11-15 08:23:12 -06:00
Evan Almloff
1ed66a54cc fix cli configuration environment variable 2023-11-14 15:50:04 -06:00
Evan Almloff
06be18a591 export lazy current config 2023-11-14 15:34:06 -06:00
Evan Almloff
5dc3486c53 Merge branch 'cli-serde-default' into cli-config-library 2023-11-10 16:26:58 -06:00
ealmloff
79e3fe677f
Merge branch 'master' into cli-serde-default 2023-11-10 16:22:53 -06:00
Evan Almloff
1b7017f67b fix formatting 2023-11-09 08:36:14 -06:00
Evan Almloff
8a2d170d96 pull out the CLI config data into a separate library 2023-11-08 12:48:25 -06:00
xTeKc
ca556ea9cb
update readme (#1615)
* Fix wasm-bindgen version mismatch

* fixes #1613
2023-11-06 13:32:42 -06:00
Evan Almloff
4215e2b247 fix cargo.toml/lock path capitalization for linux 2023-11-03 13:09:33 -05:00
divinerapier
f372144fd7
Bump tauri bundler for using proxy to fetch resources
Signed-off-by: divinerapier <sihao.fang@outlook.com>
2023-11-03 11:01:00 +08:00
Alex Parrill
52fb080193 Use indentation settings in dx fmt and vscode extension
Adds the ability to specify an indent string to public autofmt methods - either
a sequence of spaces or a tab character.

Get the indentation style and size from rustfmt for dx fmt, or from the editor
settings for the vscode extension.

Closes #1595
2023-11-01 17:24:18 -04:00
Evan Almloff
51f342417a add examples to the default watch path 2023-10-30 14:41:41 -05:00
Falco Hirschenberger
d4e6876ff6
Silence desktop build outputs from cargo (#1584)
Silence additional disturbing output from cargo in desktop builds
2023-10-27 08:29:43 -05:00
Evan Almloff
9d19f4d204 fix clippy 2023-10-16 10:44:08 -05:00
Evan Almloff
9f729dd6de fix clippy 2023-10-14 14:32:08 -05:00
ealmloff
a7736284c8
Merge branch 'master' into intigrate-collect-assets 2023-10-12 08:46:27 -05:00
Evan Almloff
b26985ea6c make debug build of fullstack applications load faster by default 2023-10-10 14:23:58 -05:00
Leonard
2d1234c3d1
Include README and Dioxus logo in package docs (#1536)
* Include README in docs.rs and add Dioxus logo

* Update README.md
2023-10-10 10:52:48 -05:00
Evan Almloff
b76f129083 Merge branch 'master' into intigrate-collect-assets 2023-10-10 09:57:16 -05:00