refactor(sqlite): Resolve duplicate test target warning for macros.rs#3988
Conversation
93a1dbd to
f1ee6df
Compare
| 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.
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.
| #![cfg(any(feature = "sqlite", feature = "sqlite-unbundled"))] | ||
|
|
There was a problem hiding this comment.
| #![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.