Skip to content

Renderers are now packages, not features. #387

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

Merged
merged 3 commits into from
Jul 9, 2022
Merged

Conversation

jkelleyrtp
Copy link
Member

@jkelleyrtp jkelleyrtp commented Apr 30, 2022

This PR changes how we do packages since things have started to become unwieldy when adding functionality to crates like the router, fermi, and 3rd party renderers.

Now, all renderers are their own package and need to be added to Cargo.toml as such:

[dependencies]
dioxus = "0.3"
dioxus-router = "0.3"
dioxus-web = "0.3"

Instead of dioxus::web::launch you'll do dioxus_web::launch.

For releases, we'll using the minor version to keep things in lock step, but freely bump minor versions as new updates are pushed. It should've been this way since the beginning but I was experimenting. This also gets rid of the rsx-prelude which was a patch until we had a better solution.

The benefits:

  • 3rd party crates can be released without bumping dioxus as a whole
  • rsx prelude is now easier to deal with in 3rd party crates
  • tests and examples can now be moved into the 3rd party crates without conflicts
  • vscode and cargo no longer yells at me when I do circular imports

The stuff that remains under "dioxus" includes:

  • core
  • core-macro
  • html
  • hooks
  • rsx
  • rsx-interpreter (until we've moved to a more flexible hot reloading system)

@jkelleyrtp jkelleyrtp changed the title Use synchronous router for simpler server side rendering Renderers are now packages, not features. Jul 6, 2022
@jkelleyrtp jkelleyrtp marked this pull request as draft July 6, 2022 19:46
@jkelleyrtp jkelleyrtp added breaking This is a breaking change organization Layout of the repository labels Jul 7, 2022
@jkelleyrtp jkelleyrtp marked this pull request as ready for review July 7, 2022 21:20
@jkelleyrtp jkelleyrtp requested review from rMazeiks and ealmloff July 7, 2022 21:20
Copy link
Contributor

@rMazeiks rMazeiks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand where a bunch of changes are comming from; this is supposed to be just a re-structuring right? Might wanna check what Git has done here in the diff. Anyway, the other stuff looks good!

@@ -0,0 +1,185 @@
//! Example: Antipatterns
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i deleted some of these examples when i re-wrote the guide

the guide now contains the parts of this info i found important, in a more concise form

any reason for adding them back or just git merge madness?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge madness :) I need to figure out which ones slipped through

}
});

cx.provide_context(svc)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleting this seems sus and unrelated, is it intentional?

Copy link
Member

@ealmloff ealmloff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems much more organized. 🙂
A few things I noticed that don't fit specific lines:

  • There are some dioxus::{plaform} imports left in the docs/guide/examples
  • The tui_benchmark should probably be moved from the dioxus to the tui crate
  • I think we can remove rsx-prelude now

@jkelleyrtp jkelleyrtp enabled auto-merge (squash) July 9, 2022 19:15
@jkelleyrtp jkelleyrtp disabled auto-merge July 9, 2022 19:15
@jkelleyrtp jkelleyrtp merged commit d9546d9 into master Jul 9, 2022
@jkelleyrtp jkelleyrtp deleted the jk/sync-router branch July 9, 2022 19:15
amindWalker pushed a commit to amindWalker/dioxus that referenced this pull request Jul 10, 2022
* feat: use synchronous router design

* feat: function to get router out of dom

* chore: restructure workspace to use renderers as packages, not features
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This is a breaking change organization Layout of the repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants