Commit graph

5626 commits

Author SHA1 Message Date
Jonathan Kelley
5e1b1cfecd
Merge pull request #2002 from ealmloff/fix-signal-leak
Fix signals leaking memory
2024-03-04 14:18:33 -08:00
Evan Almloff
568631e331 test signal drops 2024-03-04 16:02:19 -06:00
Evan Almloff
8322b508a7 fix signals leaking memory 2024-03-04 15:51:14 -06:00
Jeremy Arnold
9ae3d14e67
Add tracing to virtual_dom (#1949)
Address #1161; Add tracing to virtual dom:

- Added a dependency on [tracing-fluent-assertions](https://github.com/tobz/tracing-fluent-assertions) for test cases
- Added a test case showing tracing


example log
```
2024-02-28T21:52:25.266474Z TRACE dioxus_core::scope_context: providing context alloc::rc::Rc<dioxus_core::error_boundary::ErrorBoundary> (TypeId { t: 86211292795840746005296084033382154959 }) in app
    at packages/core/src/scope_context.rs:189
    in dioxus_core::virtual_dom::VirtualDom::new

  2024-02-28T21:52:25.266651Z TRACE dioxus_core::scope_context: looking for context generational_box::Owner<generational_box::sync::SyncStorage> (TypeId { t: 16187079142358387300491255137481079601 }) in app
    at packages/core/src/scope_context.rs:106
    in dioxus_core::scope_arena::render with scope: app
    in dioxus_core::virtual_dom::VirtualDom::rebuild

  2024-02-28T21:52:25.266662Z TRACE dioxus_core::scope_context: context generational_box::Owner<generational_box::sync::SyncStorage> (TypeId { t: 16187079142358387300491255137481079601 }) not found
    at packages/core/src/scope_context.rs:140
    in dioxus_core::scope_arena::render with scope: app
    in dioxus_core::virtual_dom::VirtualDom::rebuild

  2024-02-28T21:52:25.266671Z TRACE dioxus_core::scope_context: providing context generational_box::Owner<generational_box::sync::SyncStorage> (TypeId { t: 16187079142358387300491255137481079601 }) in app
    at packages/core/src/scope_context.rs:189
    in dioxus_core::scope_arena::render with scope: app
    in dioxus_core::virtual_dom::VirtualDom::rebuild

  2024-02-28T21:52:25.266713Z TRACE dioxus_core::scope_context: providing context dioxus_signals::reactive_context::ReactiveContext (TypeId { t: 86476382904980360086558195405008306005 }) in app
    at packages/core/src/scope_context.rs:189
    in dioxus_core::scope_arena::render with scope: app
    in dioxus_core::virtual_dom::VirtualDom::rebuild

  2024-02-28T21:52:25.266723Z TRACE dioxus_core::scope_context: looking for context generational_box::Owner (TypeId { t: 87785542931436862771411509553978749471 }) in app
    at packages/core/src/scope_context.rs:106
    in dioxus_core::scope_arena::render with scope: app
    in dioxus_core::virtual_dom::VirtualDom::rebuild

  2024-02-28T21:52:25.266730Z TRACE dioxus_core::scope_context: context generational_box::Owner (TypeId { t: 87785542931436862771411509553978749471 }) not found
    at packages/core/src/scope_context.rs:140
    in dioxus_core::scope_arena::render with scope: app
    in dioxus_core::virtual_dom::VirtualDom::rebuild

  2024-02-28T21:52:25.266769Z TRACE dioxus_core::scope_context: providing context generational_box::Owner (TypeId { t: 87785542931436862771411509553978749471 }) in app
    at packages/core/src/scope_context.rs:189
    in dioxus_core::scope_arena::render with scope: app
    in dioxus_core::virtual_dom::VirtualDom::rebuild

  2024-02-28T21:52:25.266828Z  INFO dioxus_core::diff::node: creating template, self: VNode { vnode: VNodeInner { key: None, template: Cell { value: Template { name: "packages/core/tests/tracing.rs:60:5:1728", roots: [Element { tag: "div", namespace: None, attrs: [], children: [Element { tag: "button", namespace: None, attrs: [Dynamic { id: 0 }], children: [Text { text: "+" }] }, Element { tag: "button", namespace: None, attrs: [Dynamic { id: 1 }], children: [Text { text: "-" }] }, Element { tag: "ul", namespace: None, attrs: [], children: [Dynamic { id: 0 }] }] }], node_paths: [[0, 2, 0]], attr_paths: [[0, 0], [0, 1]] } }, dynamic_nodes: [Placeholder(VPlaceholder)], dynamic_attrs: [[Attribute { name: "onclick", value: Listener, namespace: None, volatile: false }], [Attribute { name: "onclick", value: Listener, namespace: None, volatile: false }]] }, mount: Cell { value: MountId(0) } }, mount: MountId(0)
    at packages/core/src/diff/node.rs:547
    in dioxus_core::virtual_dom::VirtualDom::rebuild

  2024-02-28T21:52:25.266896Z TRACE dioxus_core::virtual_dom: Calling 1 listeners
    at packages/core/src/virtual_dom.rs:695
    in dioxus_core::virtual_dom::VirtualDom::handle_bubbling_event with parent: Some(ElementRef { path: ElementPath { path: [0, 0] }, mount: MountId(0) }), name: "click"
    in dioxus_core::virtual_dom::VirtualDom::handle_event with name: "click", data: Any { .. }, element: ElementId(2), bubbles: true

  2024-02-28T21:52:25.266934Z TRACE dioxus_core::virtual_dom: Marking scope ScopeId(0) (app) as dirty
    at packages/core/src/virtual_dom.rs:379
    in dioxus_core::virtual_dom::VirtualDom::process_events

  2024-02-28T21:52:25.266997Z  INFO dioxus_core::diff::node: creating template, self: VNode { vnode: VNodeInner { key: None, template: Cell { value: Template { name: "packages/core/tests/tracing.rs:71:37:2059", roots: [Dynamic { id: 0 }], node_paths: [[0]], attr_paths: [] } }, dynamic_nodes: [Component(VComponent { name: "ChildExample" })], dynamic_attrs: [] }, mount: Cell { value: MountId(1) } }, mount: MountId(1)
    at packages/core/src/diff/node.rs:547
    in dioxus_core::virtual_dom::VirtualDom::render_immediate

  2024-02-28T21:52:25.267026Z  INFO dioxus_core::diff::node: creating template, self: VNode { vnode: VNodeInner { key: None, template: Cell { value: Template { name: "packages/core/tests/tracing.rs:81:5:2238", roots: [Element { tag: "li", namespace: None, attrs: [Dynamic { id: 0 }], children: [DynamicText { id: 0 }] }], node_paths: [[0, 0]], attr_paths: [[0]] } }, dynamic_nodes: [Text(VText { value: "0" })], dynamic_attrs: [[Attribute { name: "onmouseover", value: Listener, namespace: None, volatile: false }]] }, mount: Cell { value: MountId(2) } }, mount: MountId(2)
    at packages/core/src/diff/node.rs:547
    in dioxus_core::virtual_dom::VirtualDom::render_immediate

  2024-02-28T21:52:25.267061Z TRACE dioxus_core::virtual_dom: Calling 1 listeners
    at packages/core/src/virtual_dom.rs:695
    in dioxus_core::virtual_dom::VirtualDom::handle_bubbling_event with parent: Some(ElementRef { path: ElementPath { path: [0, 0] }, mount: MountId(0) }), name: "click"
    in dioxus_core::virtual_dom::VirtualDom::handle_event with name: "click", data: Any { .. }, element: ElementId(2), bubbles: true

  2024-02-28T21:52:25.267084Z TRACE dioxus_core::virtual_dom: Marking scope ScopeId(0) (app) as dirty
    at packages/core/src/virtual_dom.rs:379
    in dioxus_core::virtual_dom::VirtualDom::process_events

  2024-02-28T21:52:25.267131Z  INFO dioxus_core::diff::node: creating template, self: VNode { vnode: VNodeInner { key: None, template: Cell { value: Template { name: "packages/core/tests/tracing.rs:71:37:2059", roots: [Dynamic { id: 0 }], node_paths: [[0]], attr_paths: [] } }, dynamic_nodes: [Component(VComponent { name: "ChildExample" })], dynamic_attrs: [] }, mount: Cell { value: MountId(3) } }, mount: MountId(3)
    at packages/core/src/diff/node.rs:547
    in dioxus_core::virtual_dom::VirtualDom::render_immediate

  2024-02-28T21:52:25.267157Z  INFO dioxus_core::diff::node: creating template, self: VNode { vnode: VNodeInner { key: None, template: Cell { value: Template { name: "packages/core/tests/tracing.rs:81:5:2238", roots: [Element { tag: "li", namespace: None, attrs: [Dynamic { id: 0 }], children: [DynamicText { id: 0 }] }], node_paths: [[0, 0]], attr_paths: [[0]] } }, dynamic_nodes: [Text(VText { value: "1" })], dynamic_attrs: [[Attribute { name: "onmouseover", value: Listener, namespace: None, volatile: false }]] }, mount: Cell { value: MountId(4) } }, mount: MountId(4)
    at packages/core/src/diff/node.rs:547
    in dioxus_core::virtual_dom::VirtualDom::render_immediate

  2024-02-28T21:52:25.267206Z TRACE dioxus_core::virtual_dom: Calling 1 listeners
    at packages/core/src/virtual_dom.rs:695
    in dioxus_core::virtual_dom::VirtualDom::handle_bubbling_event with parent: Some(ElementRef { path: ElementPath { path: [0, 0] }, mount: MountId(0) }), name: "click"
    in dioxus_core::virtual_dom::VirtualDom::handle_event with name: "click", data: Any { .. }, element: ElementId(2), bubbles: true

  2024-02-28T21:52:25.267229Z TRACE dioxus_core::virtual_dom: Marking scope ScopeId(0) (app) as dirty
    at packages/core/src/virtual_dom.rs:379
    in dioxus_core::virtual_dom::VirtualDom::process_events

  2024-02-28T21:52:25.267274Z  INFO dioxus_core::diff::node: creating template, self: VNode { vnode: VNodeInner { key: None, template: Cell { value: Template { name: "packages/core/tests/tracing.rs:71:37:2059", roots: [Dynamic { id: 0 }], node_paths: [[0]], attr_paths: [] } }, dynamic_nodes: [Component(VComponent { name: "ChildExample" })], dynamic_attrs: [] }, mount: Cell { value: MountId(5) } }, mount: MountId(5)
    at packages/core/src/diff/node.rs:547
    in dioxus_core::virtual_dom::VirtualDom::render_immediate

  2024-02-28T21:52:25.267297Z  INFO dioxus_core::diff::node: creating template, self: VNode { vnode: VNodeInner { key: None, template: Cell { value: Template { name: "packages/core/tests/tracing.rs:81:5:2238", roots: [Element { tag: "li", namespace: None, attrs: [Dynamic { id: 0 }], children: [DynamicText { id: 0 }] }], node_paths: [[0, 0]], attr_paths: [[0]] } }, dynamic_nodes: [Text(VText { value: "2" })], dynamic_attrs: [[Attribute { name: "onmouseover", value: Listener, namespace: None, volatile: false }]] }, mount: Cell { value: MountId(6) } }, mount: MountId(6)
    at packages/core/src/diff/node.rs:547
    in dioxus_core::virtual_dom::VirtualDom::render_immediate
```
2024-02-29 17:49:35 -06:00
Jonathan Kelley
d9cb6dd1ec
Merge pull request #1985 from fdgStilla/fix-svg-image
Restore image element under svg element
2024-02-29 12:31:59 -08:00
Jonathan Kelley
b266f5d811
Merge pull request #1982 from ealmloff/debug-subscriptions
Add debug information for signal subscriptions
2024-02-29 12:30:33 -08:00
Jonathan Kelley
d61c3fab20
Merge branch 'main' into debug-subscriptions 2024-02-29 12:30:27 -08:00
Evan Almloff
b58a3bb759
Merge pull request #1984 from agreyyy/main
Add better documentation to use_future, use_resource, use_effect and use_context
2024-02-28 08:55:38 -06:00
Andrey
1404009edc
touchups 2024-02-28 03:48:52 +00:00
andrey
c9f04ac3d0 remove things that werent meant to be in last commit 2024-02-28 11:45:08 +08:00
andrey
70136b22ea Fix error in examples/future.rs comments, use_futures inline docs comments, also added clarification that Signal<T>.read() and Singal<T>() are the same thing 2024-02-28 11:42:04 +08:00
Evan Almloff
fe839ab347 Move some global variables in the interpreter into locals in the interpreter 2024-02-27 15:15:12 -06:00
Jonathan Kelley
0c4c0e70e5
Merge pull request #1986 from ealmloff/bump-sledgehammer-bindgen
Bump the sledgehammer bindgen version
2024-02-27 12:33:10 -08:00
Evan Almloff
acbc1f6a47 fix headless tests on desktop 2024-02-27 12:19:34 -06:00
Evan Almloff
271b53e866 Update the liveview renderer to the new sledgehammer version 2024-02-27 11:46:40 -06:00
Evan Almloff
f7209e123f
restore the docs for the image element 2024-02-27 10:36:45 -06:00
Evan Almloff
93ee53454f bump the sledgehammer bindgen version 2024-02-27 10:35:16 -06:00
Florian de Gaulejac
5dad13ac74 Restore image element under svg element 2024-02-27 09:18:18 +01:00
andrey
5a73147d69 added better documentation and code snipppets for the use_resource, use_future, use_effect and use_context hooks 2024-02-27 10:36:05 +08:00
andrey
24ebc1e628 added better documentation and code snipppets for the use_resource, use_future, use_effect and use_context hooks 2024-02-27 10:32:55 +08:00
andrey
df0d45be48 added better documentation and code snipppets for the use_resource, use_future, use_effect and use_context hooks 2024-02-27 10:15:38 +08:00
Evan Almloff
277e4677e9 fix clippy 2024-02-26 11:49:05 -06:00
Evan Almloff
f539698963 add debug information for signal subscriptions 2024-02-26 11:46:01 -06:00
Evan Almloff
451a8f231e
Merge pull request #1975 from tigerros/fix-routable-clippy-warning
Fix Clippy warning in `Routable` macro
2024-02-24 11:22:04 -06:00
tigerros
e217a957dc fix 2024-02-24 14:36:02 +01:00
tigerros
24e8ac2ad3 fix warning 2024-02-24 13:30:50 +01:00
Jonathan Kelley
e0b0afc0a9
remove unsafe from tests in core 2024-02-22 17:46:51 -08:00
Jonathan Kelley
8219b117b0
Release 0.5.0-alpha.0
dioxus@0.5.0-alpha.0
dioxus-autofmt@0.5.0-alpha.0
dioxus-check@0.5.0-alpha.0
dioxus-cli@0.5.0-alpha.0
dioxus-cli-config@0.5.0-alpha.0
dioxus-config-macro@0.5.0-alpha.0
dioxus-core@0.5.0-alpha.0
dioxus-core-macro@0.5.0-alpha.0
dioxus-desktop@0.5.0-alpha.0
dioxus-fullstack@0.5.0-alpha.0
dioxus-hooks@0.5.0-alpha.0
dioxus-hot-reload@0.5.0-alpha.0
dioxus-html@0.5.0-alpha.0
dioxus-html-internal-macro@0.5.0-alpha.0
dioxus-interpreter-js@0.5.0-alpha.0
dioxus-lib@0.5.0-alpha.0
dioxus-liveview@0.5.0-alpha.0
dioxus-mobile@0.5.0-alpha.0
dioxus-native-core@0.5.0-alpha.0
dioxus-native-core-macro@0.5.0-alpha.0
dioxus-router@0.5.0-alpha.0
dioxus-router-macro@0.5.0-alpha.0
dioxus-rsx@0.5.0-alpha.0
dioxus-signals@0.5.0-alpha.0
dioxus-ssr@0.5.0-alpha.0
dioxus-tui@0.5.0-alpha.0
dioxus-web@0.5.0-alpha.0
dioxus_server_macro@0.5.0-alpha.0
generational-box@0.5.0-alpha.0
plasmo@0.5.0-alpha.0
rsx-rosetta@0.5.0-alpha.0

Generated by cargo-workspaces
2024-02-22 16:44:29 -08:00
Jonathan Kelley
a0f5fff47a
adjust promote workflow, give it a name 2024-02-22 16:25:23 -08:00
Jonathan Kelley
7c2229eb1b
Merge pull request #1960 from DioxusLabs/jk/05-pre
autorelease workflow
2024-02-22 13:55:40 -08:00
Jonathan Kelley
48d6a9acbb
Add logging to event checker 2024-02-22 13:55:29 -08:00
Jonathan Kelley
2ead6c6074
give longer window for events 2024-02-22 12:33:58 -08:00
Jonathan Kelley
9bb820ca39
fix syntax for publish 2024-02-22 10:10:23 -08:00
Jonathan Kelley
cf8c378b31
bump manganis 2024-02-22 10:04:55 -08:00
Jonathan Kelley
c5096ff5bc
add gitignore to tailwind 2024-02-22 08:53:37 -08:00
Jonathan Kelley
34f4647594
add name to publish flow 2024-02-21 22:57:34 -08:00
Jonathan Kelley
04cd98fffa
add backport 2024-02-21 22:52:31 -08:00
Jonathan Kelley
72408115c4
temp disable semver checks 2024-02-21 22:29:48 -08:00
Jonathan Kelley
19c0007cb7
semver checks fix 2024-02-21 22:26:51 -08:00
Jonathan Kelley
52be1d7e98
semver checks fix 2024-02-21 22:17:14 -08:00
Jonathan Kelley
52f07de015
ignore description 2024-02-21 22:11:33 -08:00
Jonathan Kelley
76929071b3
combine checks for semver 2024-02-21 22:11:03 -08:00
Jonathan Kelley
862d2ea6f4
Fix syntax error in main 2024-02-21 22:10:01 -08:00
Jonathan Kelley
6cc66b5d11
Add promote workflow 2024-02-21 22:08:01 -08:00
Jonathan Kelley
319eb29ff4
wip: clean up workflows 2024-02-21 21:08:46 -08:00
Jonathan Kelley
112b4f9afb
wip: release yaml 2024-02-21 19:50:39 -08:00
Jonathan Kelley
8f70f8936f
wip: consolidate release 2024-02-21 19:36:33 -08:00
Jonathan Kelley
37b8fd0135
Merge branch 'main' into jk/05-pre 2024-02-21 16:15:33 -08:00
Jonathan Kelley
380f1429ae
master -> main 2024-02-21 16:15:19 -08:00
Jonathan Kelley
98ef7c829b
wip: add some workflows for backporting, semver, and publishing 2024-02-21 16:13:33 -08:00