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
query-engine-c-abi: Fix build warnings after update #4864
Conversation
`rustc` now detects unused trait methods, which means we need to make a new offering to the gods of `cfg[feature=]`.
CodSpeed Performance ReportMerging #4864 will not alter performanceComparing Summary
|
WASM Query Engine file Size
|
✅ WASM query-engine performance won't change substantially (1.000x)Full benchmark report
After changes in 4dab8ff |
@@ -82,6 +82,7 @@ impl TypeIdentifier for Column<'_> { | |||
) | |||
} | |||
|
|||
#[cfg(feature = "mysql")] |
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.
this feels really weird that a mysql feature is in sqlite; am I missing something?
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.
I think TypeIdentifier
is used only by sqlite and mysql. So, if mysql
is enabled, method in trait will exist and that will force us to implement one for sqlite
too.
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.
Right but we also have the same file for mysql. That feels like it'd make more sense for us to tag this one as feature = "sqlite"
and then add the same fn over in the mysql connector
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.
This will break the build where sqlite and mysql are always included.
Situation is:
- if
mysql
is not enabled thanTypeIdentifier
will not haveis_json
method and it all will be good - If
sqlite
is not enabled, all methods are used and there will be no warnings. - If
mysql
is enabled,is_json
method will be added to trait and sincesqlite
andmysql
share the trait we'll be forced to implement it for sqlite as well.
I am gonna merge it since i need a RN release, but fell free to continue the discussion, if any changes are needed, I'll open a follow up PR |
rustc
now detects unused trait methods, which means we need to make anew offering to the gods of
cfg[feature=]
.