haskell-servant / servant

Servat is a Haskell DSL for describing, serving, querying, mocking, documenting web applications and more!
https://docs.servant.dev/
1.82k stars 412 forks source link

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

Closed ysangkok closed 4 months ago

ysangkok commented 4 months ago

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

maksbotan commented 4 months ago

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

What version of servant does cabal pull for you?

ysangkok commented 4 months ago

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

maksbotan commented 4 months ago

Okay, I'll check tomorrow.

Thanks for the report.

ysangkok commented 4 months ago

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 commented 4 months ago

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

maksbotan commented 4 months ago

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.

ysangkok commented 4 months ago

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.

tchoutri commented 4 months ago

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

ysangkok commented 4 months ago

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