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

Cargo.toml: Only enable mysql_backend on diesel, not the whole mysql feature #707

Merged
merged 2 commits into from
Mar 5, 2025

Conversation

mcronce
Copy link
Contributor

@mcronce mcronce commented Mar 4, 2025

Only the mysql_backend feature is required for the traits/types; mysql pulls in the full MySQL client machinery (including mysqlclient-sys, which pulls in openssl, etc)

This only benefits diesel_async users, as far as I can tell; diesel_async uses separate connection machinery (mysql_async, mysql_common), which is pure Rust and uses a more permissive license

I would guess that the same could be applied to db-diesel-postgres, as diesel does have a postgers_backend feature which looks like it's a similar subset of the postgres feature, but I couldn't test that as we're only a MySQL shop and didn't want to submit anything untested.

Note that this may be considered a breaking change. Downstream crates/applications that pull in rust_decimal's db-diesel-mysql feature but not diesel's mysql feature, and which need to actually connect to MySQL using diesel's sync connections, are currently relying on the transitive dependency and will experience build failures.

@Tony-Samuels Tony-Samuels requested a review from paupino March 4, 2025 19:39
@Tony-Samuels
Copy link
Collaborator

I'd consider this breaking change acceptable, but I'd like to wait for @paupino to confirm he's also happy with it before approving.

@paupino
Copy link
Owner

paupino commented Mar 4, 2025

Yep, I agree! This seems like a minor risk - and while I realize it breaks semantic versioning slightly, I think it is worthwhile.

@Tony-Samuels
Copy link
Collaborator

@mcronce , are you able to fix up the tests? They'll need dev dependencies now.

@mcronce
Copy link
Contributor Author

mcronce commented Mar 5, 2025

Definitely - I think that'll fix it

@paupino paupino merged commit f34cefc into paupino:master Mar 5, 2025
15 checks passed
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