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

[examples] entity & application crate depends on SeaORM with minimum required features enabled #723

Merged
merged 1 commit into from
May 14, 2022

Conversation

billy1624
Copy link
Member

@billy1624 billy1624 commented May 13, 2022

Changes

  • entity crate in each example should depends on SeaORM with only macros and with-* features enabled, i.e. without any runtime or backend features enabled. As it's up to application crate (root crate) to make the decision.
  • application crate in each example would depends on SeaORM with the target runtime and backend features enabled

The philosophy behind it is to allow the sharing of entity crate for other purposes not only for the usage in backend API but also frontend or even for unit testing in a standalone crate. In addition, this makes compiling entity crate alone much faster as it doesn't depends on any runtime library nor db backend.

@billy1624 billy1624 self-assigned this May 13, 2022
@billy1624 billy1624 force-pushed the restructure-examples branch from f3aded8 to b741582 Compare May 13, 2022 08:39
@billy1624 billy1624 marked this pull request as ready for review May 13, 2022 08:46
@billy1624 billy1624 requested a review from tyt2y3 May 13, 2022 08:46
@nahuakang
Copy link
Contributor

If this new crate dependency for workspace structure should be recommended to users, maybe we could also update the entity crate doc?

@tyt2y3
Copy link
Member

tyt2y3 commented May 14, 2022

Yeah sure thank you for the suggestion

Copy link
Member

@tyt2y3 tyt2y3 left a comment

Choose a reason for hiding this comment

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

Exactly how it was designed :D

@tyt2y3 tyt2y3 merged commit c3db8f4 into master May 14, 2022
@tyt2y3 tyt2y3 deleted the restructure-examples branch May 14, 2022 05:24
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.

3 participants