Skip to content
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

Remove magic #151

Merged
merged 40 commits into from
Jun 22, 2022
Merged

Remove magic #151

merged 40 commits into from
Jun 22, 2022

Conversation

arctic-hen7
Copy link
Member

@arctic-hen7 arctic-hen7 commented Jun 11, 2022

This PR aims to remove the .perseus/ directory entirely and make Perseus a lot more sensible for users not acquainted with its innards. This will also add full support for user modification of the builder and server code, finally adding support for custom API routes!

Breaking Changes Tracker

  • Changed multiple APIs for functional plugin actions related to the builder (they all take the new EngineError type now)
  • Restructured exports related to engine functionality (this will get progressively worse as this PR develops!)
  • Removed the HOST and PORT environment variables for configuring the server (these are replaced with PERSEUS_HOST and PERSEUS_PORT)
  • Substantially refactored exports from Perseus
  • Divided client-side and server-side exports (many functions will now need to be target-gated)
  • Replaced #[autoserde(...)] macro with macros for each state function (#[build_state], #[build_paths], etc.)
  • The #[build_paths] macro must now be applied to all build paths functions (for client/server functionality division)
  • #[perseus::main] now takes an argument as the default server to use (server integrations should now be imported and used)
  • Made state functions automatically target-gated as #[cfg(not(feature = "wasm32"))]
  • The #[should_revalidate] macro must now be applied to all revalidation determination functions (for client/server functionality division)

No support for serving yet and there's still Wasm binary bloat.
@arctic-hen7 arctic-hen7 marked this pull request as draft June 11, 2022 00:20
@arctic-hen7 arctic-hen7 added this to the v0.4.0 milestone Jun 11, 2022
Still a lot of Wasm binary bloat.
This is untested as yet, I'll update the CLI first.
This is still untested because of a Cargo dependency unification issue.
Also changed the `run_dflt_engine` and `run_client` APIs to make them
all take functions that return apps, rather than apps directly, which
makes the Actix Web integration able to work normally (by making
everything else share its quirks).
This feature is the default though.
Except `fetching`, need to merge from `main`.
Just made the user's functions `pub` to stop the compiler whining.
There's now an `EXAMPLE_INTEGRATION` environment variable that controls
this, which is set to `warp` by default in a new `.env` file, which
Bonnie can read.
This also adds a `build_paths` macro to make that work with the new systems.
@arctic-hen7 arctic-hen7 marked this pull request as ready for review June 19, 2022 00:56
@arctic-hen7
Copy link
Member Author

For completeness, I'm just going to note here that two days ago there was a bug in the basic example in which a link just disappeared after hydration. That bug is now gone, without any relevant changes. Hopefully it was a silly mistake somewhere that I've inadvertently fixed now, but if it pops up again, looking through the commit history here might be helpful.

@arctic-hen7 arctic-hen7 merged commit 14f415a into main Jun 22, 2022
@arctic-hen7 arctic-hen7 deleted the feat-remove-magic branch June 22, 2022 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant