-
Notifications
You must be signed in to change notification settings - Fork 9
Add servant 0.19 support to servant-util #40
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
| type EncodedQueryParam = Text | ||
| encodeQueryParam :: ToHttpApiData a => a -> EncodedQueryParam | ||
| encodeQueryParam = toQueryParam | ||
| #endif |
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 seems really awkward. How bad would it be to bump the dependency version?
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 do not like this solution too. If supporting servant 0.18 is not required, let's remove it.
Btw, I'll create an other PR to export encodeQueryParam from the servant-client-core package.
Since this haskell-servant/servant#1549, it would not be required anymore to add the encodeQueryParam function, it might be used the encodeQueryParamValue function.
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.
Did you were thinking something like this marinelli@a0dbeeb?
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.
@Martoon-00 what do you think about 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.
I apologize for the late reply 🙏 🙏
I don't like such tricks with CPP pragmas too, but in this case its scope is sufficiently limited and it seems like the least evil to me.
Let's go with the current solution to leave others some time if they need a recent feature of servant-util but cannot afford to switch to the servant-0.19. And after a couple of major releases of servant, or if this CPP turns out to hinder other features, we will strip the old behaviour.
I also asked our OPS team to make CI run both the old and new versions of servant-client-core (internal ticket for this).
@marinelli You are also very welcome to start using haskell-servant/servant#1549 here as soon as it appears in a release. Just leave a note in the changelog that we do not support servant-0.19, rather only < 0.19 and >= 0.19.X.
Thanks a lot for your work!
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 anymore that re-exporting encodeQueryParamValue from servant-client-core is a good idea :)
We'll see.
| type EncodedQueryParam = Text | ||
| encodeQueryParam :: ToHttpApiData a => a -> EncodedQueryParam | ||
| encodeQueryParam = toQueryParam | ||
| #endif |
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 apologize for the late reply 🙏 🙏
I don't like such tricks with CPP pragmas too, but in this case its scope is sufficiently limited and it seems like the least evil to me.
Let's go with the current solution to leave others some time if they need a recent feature of servant-util but cannot afford to switch to the servant-0.19. And after a couple of major releases of servant, or if this CPP turns out to hinder other features, we will strip the old behaviour.
I also asked our OPS team to make CI run both the old and new versions of servant-client-core (internal ticket for this).
@marinelli You are also very welcome to start using haskell-servant/servant#1549 here as soon as it appears in a release. Just leave a note in the changelog that we do not support servant-0.19, rather only < 0.19 and >= 0.19.X.
Thanks a lot for your work!
Martoon-00
left a comment
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.
Again thank you for the update.
Please rebase and let's merge it.
I rebased and updated the |
This PR proposes to:
servant>= v0.19 (fix Build problem with servant 0.19 #38)cabal.projectfileuniversum-1.7.3✅ Checklist for your Pull Request
Related changes (conditional)
Tests
silently reappearing again.
Documentation
Public contracts
of Public Contracts policy.
and
Stylistic guide (mandatory)