Disable u64, usize ToSql/FromSql impl by default#1732
Conversation
Use `fallible_uint` feature to have them back
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1732 +/- ##
=======================================
Coverage 86.91% 86.91%
=======================================
Files 58 58
Lines 10642 10644 +2
=======================================
+ Hits 9249 9251 +2
Misses 1393 1393 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thank you. Would you also take a PR to additionally introduce an i64-casting variant? Too bad rust features can’t take values (like c defines or cmake vars). |
I would prefer to do like |
|
Sorry, I meant as an additional feature, eg casting_u64. |
|
I mean at least: SELECT abs(u64), sign(u64), u64 % 2 FROM tbl;doesn't work when |
|
You’re right, that’s probably a little too much for something people might enable that easily. I have no hard preference either way, but how do you feel fallible_uint removal from default should play with the crate version number? If the code were completely dropped, technically the semantic version should be a full major version increment but if it’s “just” gated behind a non-default feature? |
|
As there is still no major version of |
As first seen for gitoxide in #2330, upgrading `rusqlite` to 0.38.0 breaks compatibility with some of the types we use with it. This is due to a change in `rusqlite` that places conversions for `u64` and `usize` behind the new `fallible_uint` feature flag: - rusqlite/rusqlite#1722 - rusqlite/rusqlite#1732 We originally fixed this in #2331 (modifying #2330) by casting. This instead fixes it by enabling the new `fallible_uint` feature. For relevant details, see: - #2331 (review) - #2331 (comment)
As first seen for gitoxide in GitoxideLabs#2330, upgrading `rusqlite` to 0.38.0 breaks compatibility with some of the types we use with it. This is due to a change in `rusqlite` that places conversions for `u64` and `usize` behind the new `fallible_uint` feature flag: - rusqlite/rusqlite#1722 - rusqlite/rusqlite#1732 We originally fixed this in GitoxideLabs#2331 (modifying GitoxideLabs#2330) by casting. This instead fixes it by enabling the new `fallible_uint` feature. For relevant details, see: - GitoxideLabs#2331 (review) - GitoxideLabs#2331 (comment)
As first seen for gitoxide in #2330, upgrading `rusqlite` to 0.38.0 breaks compatibility with some of the types we use with it. This is due to a change in `rusqlite` that places conversions for `u64` and `usize` behind the new `fallible_uint` feature flag: - rusqlite/rusqlite#1722 - rusqlite/rusqlite#1732 We originally fixed this in #2331 (modifying #2330) by casting. This instead fixes it by enabling the new `fallible_uint` feature. For relevant details, see: - #2331 (review) - #2331 (comment)
As first seen for gitoxide in GitoxideLabs#2330, upgrading `rusqlite` to 0.38.0 breaks compatibility with some of the types we use with it. This is due to a change in `rusqlite` that places conversions for `u64` and `usize` behind the new `fallible_uint` feature flag: - rusqlite/rusqlite#1722 - rusqlite/rusqlite#1732 We originally fixed this in GitoxideLabs#2331 (modifying GitoxideLabs#2330) by casting. This instead fixes it by enabling the new `fallible_uint` feature. For relevant details, see: - GitoxideLabs#2331 (review) - GitoxideLabs#2331 (comment)
As first seen for gitoxide in #2330, upgrading `rusqlite` to 0.38.0 breaks compatibility with some of the types we use with it. This is due to a change in `rusqlite` that places conversions for `u64` and `usize` behind the new `fallible_uint` feature flag: - rusqlite/rusqlite#1722 - rusqlite/rusqlite#1732 We originally fixed this in #2331 (modifying #2330) by casting. This instead fixes it by enabling the new `fallible_uint` feature. For relevant details, see: - #2331 (review) - #2331 (comment)
As first seen for gitoxide in GitoxideLabs#2330, upgrading `rusqlite` to 0.38.0 breaks compatibility with some of the types we use with it. This is due to a change in `rusqlite` that places conversions for `u64` and `usize` behind the new `fallible_uint` feature flag: - rusqlite/rusqlite#1722 - rusqlite/rusqlite#1732 We originally fixed this in GitoxideLabs#2331 (modifying GitoxideLabs#2330) by casting. This instead fixes it by enabling the new `fallible_uint` feature. For relevant details, see: - GitoxideLabs#2331 (review) - GitoxideLabs#2331 (comment)
As first seen for gitoxide in GitoxideLabs#2330, upgrading `rusqlite` to 0.38.0 breaks compatibility with some of the types we use with it. This is due to a change in `rusqlite` that places conversions for `u64` and `usize` behind the new `fallible_uint` feature flag: - rusqlite/rusqlite#1722 - rusqlite/rusqlite#1732 We originally fixed this in GitoxideLabs#2331 (modifying GitoxideLabs#2330) by casting. This instead fixes it by enabling the new `fallible_uint` feature. For relevant details, see: - GitoxideLabs#2331 (review) - GitoxideLabs#2331 (comment)
As first seen for gitoxide in GitoxideLabs#2330, upgrading `rusqlite` to 0.38.0 breaks compatibility with some of the types we use with it. This is due to a change in `rusqlite` that places conversions for `u64` and `usize` behind the new `fallible_uint` feature flag: - rusqlite/rusqlite#1722 - rusqlite/rusqlite#1732 We originally fixed this in GitoxideLabs#2331 (modifying GitoxideLabs#2330) by casting. This instead fixes it by enabling the new `fallible_uint` feature. For relevant details, see: - GitoxideLabs#2331 (review) - GitoxideLabs#2331 (comment)
As first seen for gitoxide in GitoxideLabs#2330, upgrading `rusqlite` to 0.38.0 breaks compatibility with some of the types we use with it. This is due to a change in `rusqlite` that places conversions for `u64` and `usize` behind the new `fallible_uint` feature flag: - rusqlite/rusqlite#1722 - rusqlite/rusqlite#1732 We originally fixed this in GitoxideLabs#2331 (modifying GitoxideLabs#2330) by casting. This instead fixes it by enabling the new `fallible_uint` feature. For relevant details, see: - GitoxideLabs#2331 (review) - GitoxideLabs#2331 (comment)
As first seen for gitoxide in #2330, upgrading `rusqlite` to 0.38.0 breaks compatibility with some of the types we use with it. This is due to a change in `rusqlite` that places conversions for `u64` and `usize` behind the new `fallible_uint` feature flag: - rusqlite/rusqlite#1722 - rusqlite/rusqlite#1732 We originally fixed this in #2331 (modifying #2330) by casting. This instead fixes it by enabling the new `fallible_uint` feature. For relevant details, see: - #2331 (review) - #2331 (comment)
In v0.38, rusqlite fixed a logical problem: casting values to/from unsigned 64-bit values was sometimes causing runtime errors, because internally sqlite only knows about signed 64-bit integers. The problem: rusqlite/rusqlite#1722 The fix: rusqlite/rusqlite#1732 This was a problem for us because we use u64s to represent timestamps in the keystore. This commit chooses to just add the feature flag which reenables the old behavior. We're not going to be maintaining this code anymore once the potential to overflow an i64 with a unix timestamp is a reasonable possibility, and we're not using that type in other contexts, so we should be fine. I did consider the alternative of changing the underlying type from u64 to i64. However, that would have meant a cascading series of pointless changes all the way up to the ffi layer, and it just did not seem worth it. So I rejected that for now.
In v0.38, rusqlite fixed a logical problem: casting values to/from unsigned 64-bit values was sometimes causing runtime errors, because internally sqlite only knows about signed 64-bit integers. The problem: rusqlite/rusqlite#1722 The fix: rusqlite/rusqlite#1732 This was a problem for us because we use u64s to represent timestamps in the keystore. This commit chooses to just add the feature flag which reenables the old behavior. We're not going to be maintaining this code anymore once the potential to overflow an i64 with a unix timestamp is a reasonable possibility, and we're not using that type in other contexts, so we should be fine. I did consider the alternative of changing the underlying type from u64 to i64. However, that would have meant a cascading series of pointless changes all the way up to the ffi layer, and it just did not seem worth it. So I rejected that for now.
Use
fallible_uintfeature to have them backFix #1722