-
Notifications
You must be signed in to change notification settings - Fork 1.5k
refactor(sqlite): Resolve duplicate test target warning for macros.rs #3988
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
refactor(sqlite): Resolve duplicate test target warning for macros.rs #3988
Conversation
93a1dbd to
f1ee6df
Compare
Cargo.toml
Outdated
| name = "sqlite-unbundled-macros" | ||
| path = "tests/sqlite/macros.rs" | ||
| required-features = ["sqlite-unbundled", "macros"] | ||
| required-features = ["macros"] # Also requires either sqlite or sqlite-unbundled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a pseudo-feature specifically for this:
| required-features = ["macros"] # Also requires either sqlite or sqlite-unbundled | |
| required-features = ["_sqlite", "macros"] # Also requires either sqlite or sqlite-unbundled |
I think sometime in the future we could change it to sqlite-bundled and sqlite-unbundled (or maybe sqlite-bindgen), and then the sqlite feature just enables libsqlite3-sys without any linkage features.
The blocker on that is that the pre-generated bindings libsqlite3-sys uses by default are based on SQLite 3.14, but we unconditionally depend on sqlite3_prepare_v3() which wasn't added until 3.20: https://www.sqlite.org/changes.html#version_3_20_0
If they would be amenable to adding a min_sqlite_version_3_20 feature, or a prepare-v3 feature, I think we could make it work out-of-the-box.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened rusqlite/rusqlite#1731
tests/sqlite/macros.rs
Outdated
| #![cfg(any(feature = "sqlite", feature = "sqlite-unbundled"))] | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #![cfg(any(feature = "sqlite", feature = "sqlite-unbundled"))] |
Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
…d of #![cfg(...)] in the module Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
f1ee6df to
16eb3b6
Compare
|
Made both adjustments to use |
…launchbadge#3988) * refactor(sqlite): Resolve duplicate test target warning for macros.rs Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com> * refactor(sqlite): For macros tests, use _sqlite pseudo feature instead of #![cfg(...)] in the module Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com> --------- Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
Does your PR solve an issue?
Resolves this
cargowarning:Merges the two target definitions in
Cargo.tomland moves thesqlitevssqlite-unbundledfeature check to the top of themacros.rsmodule.Is this a breaking change?
No; only affects test target configuration.