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

Make sea-orm-cli & sea-orm-migration dependencies optional #2367

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xamgore
Copy link

@xamgore xamgore commented Sep 26, 2024

Addresses #2320.

My team is working on a workspace project. To make sure generated models are always the same, we decided to make sea-orm-cli a member crate. You may find details at the discussion 1889.

The problem is, sea-orm-cli/codegen feature imports all the database drivers, even though sqlite and mysql represent zero interest for me.

codegen = ["sea-schema/sqlx-all", "sea-orm-codegen"]

libsqlite-sys + sqlx-mysql + sqlx-sqlite take quite a few seconds in total compilation time, and I believe this could be improved.

image

I've gone through dependency-hell feature-shenanigans, but could easily make a mistake. So testing and merging this PR won't be easy. I tested the code on my local environment: tweaked all the possible combinations of features to see, whether the compiler would grumble. Also, I have patched my team project with local sea-orm codebase and tested it against it.

@xamgore
Copy link
Author

xamgore commented Sep 30, 2024

@billy1624 could you allow CI checks, please?

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