-
Notifications
You must be signed in to change notification settings - Fork 43
upgrade to 1.64 and use workspace dependencies #265
base: master
Are you sure you want to change the base?
Conversation
TODO: get db.rs to compile current error is tripping me up
I can take a look at this. I believe I ran into a similar (maybe the same) issue when initially looking at updating to the Diesel 2.0 RCs |
That would be awesome! Let me know if I can help in any way. I really can't seem to figure out why it doesn't work. My only thought was that I used |
On initial look there is a dependency conflict being hidden. There are two versions of In the root This should make sure that the versions pulled in across the workspace match those in These should get the connection working at least. This then presents other compilation failures related to the diesel update, but I haven't looked at them yet. Edit: Actually the remaining compilation issue was just a change to the
|
Thanks! I was able to get it to compile as well and all of the test passed! |
fn execute(&mut self, query: &str) -> QueryResult<usize> { | ||
let mut txn = start_sentry_db_transaction("sql.query", query); | ||
|
||
let result = self.inner.execute(query); | ||
txn.finish(); | ||
result | ||
} | ||
|
||
#[tracing::instrument( | ||
fields( | ||
db.name=%self.info.current_database, | ||
db.system="postgresql", | ||
db.version=%self.info.version, | ||
db.statement=tracing::field::Empty, | ||
otel.kind="client", | ||
), | ||
skip(self, source), | ||
)] |
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 couldn't find any references to this function so I removed it since it is no longer part of the Connection trait. Not sure where it was supposed to be.
The original purpose of this PR was just to use the new 1.65 workspace dependencies. However, I ran into some issues getting that to compile which required upgrading to diesel 2.0 to fix. So this PR ended up being a lot bigger than I originally thought it would be. Only other thing I wanted to note about this PR is that clippy wanted me to add Eq as a derived trait on a lot of things that used PartialEq. I tried doing that at first but it seems like the db macro was conflicting with it in some way so I ignored it for now. |
https://crates.io/crates/diesel-async now that this is a thing maybe it should be used |
TODO: get db.rs to compile current error is tripping me up
If anyone can help with this error that would be amazing. https://www.reddit.com/r/rust/comments/xmdz7s/how_to_import_a_struct_that_impls_a_trait_into_a/