ureq icon indicating copy to clipboard operation
ureq copied to clipboard

`ureq` doesn't expose `CookieStore` and this makes `ureq 2.5.0` a breaking change

Open SkiFire13 opened this issue 3 years ago • 1 comments

In order to set cookies in an AgentBuilder you need to create a CookieStore, however ureq doesn't re-export it: to do so you need to explicitly depend on either the cookie or the cookie_store crates.

However this is not just poor ergonomics, it creates a semver hazard: since the direct dependency is not linked to ureq's, and 0.x updates are considered not compatible semver-wise, any update to ureq's cookie dependency is a breaking change[^1] because it results in two copies of the cookie/cookie_store crate.

This in particular happened with the 2.5.0 update, which broke a project of mine that used ureq with cookies. My preferred fix would be to expose CookieStore and allow using that instead of depending on an external non-synced crate. Note that Cookie is already re-exported.

[^1]: technically you can avoid naming CookieStore, but it requires some weird hack to make type inference work, so it's something you probably want to avoid.

SkiFire13 avatar Oct 11 '22 15:10 SkiFire13

Alright. Let's do it!

algesten avatar Oct 15 '22 18:10 algesten