-
-
Notifications
You must be signed in to change notification settings - Fork 607
sea-orm-rocket: update for compatibility with rocket 0.5.1 #2732
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
Conversation
The database API for Rocket has changed between 0.5.0 and 0.5.1, and database pools must now use rocket_db_pools. This breaks compatibility with the current implementation of sea-orm-rocket. Based on the working implementation at https://github.com/amyipdev/sea-orm-rocket, this patch updates the code to use rocket_db_pools and bumps the version number to 0.6.0 to reflect that this version is NOT compatible with the prior v0.5.5. A maintainer with push access to crates `sea-orm-rocket` and `sea-orm-rocket-codegen` will need to update the crates upon acceptance of this PR. Signed-off-by: Amy Parker <amy@amyip.net> Fixes: SeaQL#2730
It would be helpful to add a compatibility table to the README. |
Could you please update the examples as well? |
pub idle_timeout: Option<u64>, | ||
|
||
/// Enable SQLx statement logging (default true) | ||
#[serde(default)] |
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 change seems a bit unclear. What is it used for?
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'm not sure why it doesn't set the default correctly on newer versions, but it doesn't - without manually allowing it to set a default, it'll crash unless I manually set it.
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 is inconsistent with the doc comment. I will change this to default true
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 maybe we need to manually implement the Default trait here. Or we should figure out what's causing this to crash.
Will do!
Where are these examples located? |
Nevermind, I see what you mean on the failing checks. I'll get those updated. Is the clippy check supposed to fail like that? It's failing on something completely unrelated to the PR. |
Just ignore the Clippy check; Those will only fail on the 1.1.x branch. |
As the patches to sea_orm_rocket require switching over from the original structures to those from rocket_db_pools, the examples also need to be switched over (see build #5177). This patch updates examples `rocket_example` and `rocket_okapi_example` to use the new sea_orm_rocket version. Signed-off-by: Amy Parker <amy@amyip.net>
Because v0.6.0 is not backwards-compatible with v0.5.0 and Rocket requires a different version depending on whether one is using v0.5.0 (and/or its release candidates) or v0.5.1, the user should be informed in the README/when viewing on crates.io that they may need a different version of the package. Per the suggestions in SeaQL#2732, this patch adds a compatibility table to the sea-orm-rocket README. Signed-off-by: Amy Parker <amy@amyip.net>
@Huliiiiii requested patches added! |
The current build (#5233) for PR SeaQL#2732 fails due to the lack of proper formatting, which gets checked during the build stage. This patch fixes the formatting by running `cargo fmt`. Signed-off-by: Amy Parker <amy@amyip.net>
@Huliiiiii formatting fixed in most recent patch |
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.
thank you all!
* sea-orm-rocket: update for compatibility with rocket 0.5.1 The database API for Rocket has changed between 0.5.0 and 0.5.1, and database pools must now use rocket_db_pools. This breaks compatibility with the current implementation of sea-orm-rocket. Based on the working implementation at https://github.com/amyipdev/sea-orm-rocket, this patch updates the code to use rocket_db_pools and bumps the version number to 0.6.0 to reflect that this version is NOT compatible with the prior v0.5.5. A maintainer with push access to crates `sea-orm-rocket` and `sea-orm-rocket-codegen` will need to update the crates upon acceptance of this PR. Signed-off-by: Amy Parker <amy@amyip.net> Fixes: #2730 * examples: update for sea_orm_rocket 0.6.0 As the patches to sea_orm_rocket require switching over from the original structures to those from rocket_db_pools, the examples also need to be switched over (see build #5177). This patch updates examples `rocket_example` and `rocket_okapi_example` to use the new sea_orm_rocket version. Signed-off-by: Amy Parker <amy@amyip.net> * sea-orm-rocket: add compatibility table to README Because v0.6.0 is not backwards-compatible with v0.5.0 and Rocket requires a different version depending on whether one is using v0.5.0 (and/or its release candidates) or v0.5.1, the user should be informed in the README/when viewing on crates.io that they may need a different version of the package. Per the suggestions in #2732, this patch adds a compatibility table to the sea-orm-rocket README. Signed-off-by: Amy Parker <amy@amyip.net> * examples: cargo fmt The current build (#5233) for PR #2732 fails due to the lack of proper formatting, which gets checked during the build stage. This patch fixes the formatting by running `cargo fmt`. Signed-off-by: Amy Parker <amy@amyip.net> --------- Signed-off-by: Amy Parker <amy@amyip.net>
🎉 Released In 1.1.17 🎉Thank you everyone for the contribution! |
PR Info
New Features
Bug Fixes
Breaking Changes