Skip to content
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

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

Open
SkiFire13 opened this issue Oct 11, 2022 · 1 comment · May be fixed by #568
Open

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

SkiFire13 opened this issue Oct 11, 2022 · 1 comment · May be fixed by #568

Comments

@SkiFire13
Copy link

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 change1 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.

Footnotes

  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.

@algesten
Copy link
Owner

Alright. Let's do it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants