servant icon indicating copy to clipboard operation
servant copied to clipboard

servant-client-core-0.20.1 issue with DeepQuery and QueryString

Open ysangkok opened this issue 1 year ago • 8 comments

I have cabal-install-3.10.3.0, trying to open the repl for the release of client-core from today:

$ cabal repl -w ghc-9.8.2 -b servant-client-core
[ 9 of 13] Compiling Servant.Client.Core.HasClient

src/Servant/Client/Core/HasClient.hs:71:92: error: [GHC-61689]
    Module ‘Servant.API’ does not export ‘DeepQuery’.
   |
71 |                  getResponse, AuthProtect, BasicAuth, BasicAuthData, Capture', CaptureAll, DeepQuery, Description, Fragment, FramingRender (..), FramingUnrender (..), Header', Headers (..), HttpVersion, MimeRender (mimeRender), NoContent (NoContent), QueryFlag, QueryParam', QueryParams, QueryString, Raw, RawM, RemoteHost, ReqBody', SBoolI, Stream, Summary, ToHttpApiData, ToSourceIO (..), Vault, WithNamedContext, WithResource, WithStatus (..), contentType, getHeadersHList, toEncodedUrlPiece, NamedRoutes)
   |                                                                                            ^^^^^^^^^

src/Servant/Client/Core/HasClient.hs:71:289: error: [GHC-61689]
    Module ‘Servant.API’ does not export ‘QueryString’.
   |
71 |                  getResponse, AuthProtect, BasicAuth, BasicAuthData, Capture', CaptureAll, DeepQuery, Description, Fragment, FramingRender (..), FramingUnrender (..), Header', Headers (..), HttpVersion, MimeRender (mimeRender), NoContent (NoContent), QueryFlag, QueryParam', QueryParams, QueryString, Raw, RawM, RemoteHost, ReqBody', SBoolI, Stream, Summary, ToHttpApiData, ToSourceIO (..), Vault, WithNamedContext, WithResource, WithStatus (..), contentType, getHeadersHList, toEncodedUrlPiece, NamedRoutes)
   |                                                                                                                                                                                                                                                                                                 ^^^^^^^^^^^

src/Servant/Client/Core/HasClient.hs:77:1: error: [GHC-61948]
    Could not find module ‘Servant.API.QueryString’.
    Perhaps you meant
      Servant.API.QueryParam (needs flag -package-id servant-0.20.1)
      Servant.API.QueryParam (from servant-0.20.1)
      Servant.API.QueryParam (needs flag -package-id servant-0.20.1)
    Use -v to see a list of the files searched for.

cc: @maksbotan

ysangkok avatar May 16 '24 22:05 ysangkok

Whoops, maybe I should've slept before releasing, not vice versa.

What version of servant does cabal pull for you?

maksbotan avatar May 16 '24 23:05 maksbotan

I get the same error if I pass cabal repl -w ghc-9.8.2 -b servant-client-core -c 'servant==0.20.1', so I suppose it must be 0.20.1.

Looking at servant-client-core.cabal in the repo, it does seem to specify that package as a dependency. And looking at the released cabal file, I also see build-depends: servant there in the library section. So I am not sure what is going on...

ysangkok avatar May 16 '24 23:05 ysangkok

Okay, I'll check tomorrow.

Thanks for the report.

maksbotan avatar May 16 '24 23:05 maksbotan

I suppose those two symbols were added recently, and we need a new release of servant. Then we could revise client-core to depend on that new release... ? But not sure, I haven't investigated. Good night.

ysangkok avatar May 16 '24 23:05 ysangkok

Ah yes, DeepQuery was added just 3 weeks ago: https://github.com/haskell-servant/servant/pull/1604/files

ysangkok avatar May 16 '24 23:05 ysangkok

I've deprecated 0.20.1 servant-client* for now, Cabal won't pull them. But looks like we need a new release, there are breaking changes since 0.20.

Are we ready to cut 0.21 or there is some unfinished work? Whole servant bump is a tedious process.

maksbotan avatar May 17 '24 09:05 maksbotan

I don't think there is 'unfinished work' aside from @MangoIV's work on documentation in #1726 . But I am not sure that even needs to be synced with releases since it might get auto-deployed on readthedocs.

ysangkok avatar May 20 '24 14:05 ysangkok

If we have RTD set on "latest" then we don't have anything to worry about

tchoutri avatar May 20 '24 14:05 tchoutri

Closing this as the issue is resolved. We still need to do a new release eventually.

ysangkok avatar May 25 '24 21:05 ysangkok