MostroP2P / mostro-core

common types used by mostro and clients
https://mostro.network
MIT License
6 stars 7 forks source link

chore: upgrade sqlx package version #57

Closed f3r10 closed 3 months ago

f3r10 commented 3 months ago

Upgrade sqlx dependency #32

grunch commented 3 months ago

Thanks for your contribution @f3r10

grunch commented 3 months ago

I have news about this, after I try to publish a new version with this change on crates.io I get this response:

cargo publish
    Updating crates.io index
error: all dependencies must have a version specified when publishing.
dependency `sqlx-crud` does not specify a version
Note: The published dependency will use the version from crates.io,
the `git` specification will be removed from the dependency declaration.

We need to push the new fork as a new project on crates.io right?

grunch commented 3 months ago

I have news about this, after I try to publish a new version with this change on crates.io I get this response:

cargo publish
    Updating crates.io index
error: all dependencies must have a version specified when publishing.
dependency `sqlx-crud` does not specify a version
Note: The published dependency will use the version from crates.io,
the `git` specification will be removed from the dependency declaration.

We need to push the new fork as a new project on crates.io right?

@f3r10 let me know what do you think about this

f3r10 commented 3 months ago

Sorry for the late response, Yes, you are right @grunch it looks like it is necessary to push the fork to crates.io so that it will be possible to define a version on the Cargo.toml file

f3r10 commented 3 months ago

maybe this option could be better than publishing the fork project to creates.io: https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#working-with-an-unpublished-minor-version Let me know what could be the best option

f3r10 commented 3 months ago
[dependencies]
sqlx-crud = { version = "0.4.0", features = [
  "runtime-tokio-rustls",
], optional = true }
...

[patch.crates-io]
sqlx-crud = { git = "https://github.com/f3r10/sqlx-crud" }

With this change, it looks like it works

grunch commented 2 months ago
[dependencies]
sqlx-crud = { version = "0.4.0", features = [
  "runtime-tokio-rustls",
], optional = true }
...

[patch.crates-io]
sqlx-crud = { git = "https://github.com/f3r10/sqlx-crud" }

With this change, it looks like it works

got this done and published on version 0.6.2

f3r10 commented 2 months ago

I am going to create a PR to Mostro updating the dependencies with the new version mostro-core an the patch of sqlx

grunch commented 2 months ago

unfortunately I have to revert this PR because it is not working properly with https://github.com/MostroP2P/mostro/pull/334

I will do this PR again but it's not going to be merged until we are sure the mostrod PR can work properly with it

grunch commented 2 months ago

@f3r10

f3r10 commented 2 months ago

sure, I understand. I am going to check https://github.com/MostroP2P/mostro/pull/334 to see what is missing