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

doctests fail on GHC-9.10 #254

Closed
ysangkok opened this issue Jun 19, 2024 · 1 comment · Fixed by #255
Closed

doctests fail on GHC-9.10 #254

ysangkok opened this issue Jun 19, 2024 · 1 comment · Fixed by #255

Comments

@ysangkok
Copy link
Contributor

after applying the patch at the end and running cabal test -w ghc-9.10.1 --allow-newer, I get this error:

/home/janus/flipstone/swagger2/src/Data/Swagger.hs:298: failure in expression `instance ToSchema BadMixedType'
expected: ...
          ... • Cannot derive Generic-based Swagger Schema for BadMixedType
          ...   BadMixedType is a mixed sum type (has both unit and non-unit constructors).
          ...   Swagger does not have a good representation for these types.
          ...   Use genericDeclareNamedSchemaUnrestricted if you want to derive schema
          ...   that matches aeson's Generic-based toJSON,
          ...   but that's not supported by some Swagger tools.
          ...
          ... In the instance declaration for ‘ToSchema BadMixedType’
 but got: <interactive>:166:10: error: [GHC-64725]
                                ^
              • Cannot derive Generic-based Swagger Schema for BadMixedType
                BadMixedType is a mixed sum type (has both unit and non-unit constructors).
                Swagger does not have a good representation for these types.
                Use genericDeclareNamedSchemaUnrestricted if you want to derive schema
                that matches aeson's Generic-based toJSON,
                but that's not supported by some Swagger tools.
              • In the expression:
                  Data.Swagger.Internal.Schema.$dmdeclareNamedSchema @(BadMixedType)
                In an equation for ‘declareNamedSchema’:
                    declareNamedSchema
                      = Data.Swagger.Internal.Schema.$dmdeclareNamedSchema
                          @(BadMixedType)
                In the instance declaration for ‘ToSchema BadMixedType’
diff --git a/swagger2.cabal b/swagger2.cabal
index 3166a5d..6c475bc 100644
--- a/swagger2.cabal
+++ b/swagger2.cabal
@@ -33,7 +33,7 @@ tested-with:
 
 custom-setup
   setup-depends:
-                base < 4.20
+                base < 4.21
               , Cabal < 3.11
               , cabal-doctest >=1.0.6 && <1.1
 
@@ -62,10 +62,10 @@ library
 
   -- GHC boot libraries
   build-depends:
-      base             >=4.9       && <4.20
+      base             >=4.9       && <4.21
     , bytestring       >=0.10.8.1  && <0.13
-    , containers       >=0.5.7.1   && <0.7
-    , template-haskell >=2.11.1.0  && <2.22
+    , containers       >=0.5.7.1   && <0.8
+    , template-haskell >=2.11.1.0  && <2.23
     , time             >=1.6.0.1   && <1.14
     , transformers     >=0.5.2.0   && <0.7
 
@@ -75,24 +75,24 @@ library
 
   -- other dependencies
   build-depends:
-      base-compat-batteries     >=0.11.1   && <0.14
+      base-compat-batteries     >=0.11.1   && <0.15
     , aeson                     >=2.0.0.0  && <2.3
     , aeson-pretty              >=0.8.7    && <0.9
     -- cookie 0.4.3 is needed by GHC 7.8 due to time>=1.4 constraint
-    , cookie                    >=0.4.3    && <0.5
+    , cookie                    >=0.4.3    && <0.6
     , generics-sop              >=0.5.1.0  && <0.6
     , hashable                  >=1.2.7.0  && <1.5
     , http-media                >=0.8.0.0  && <0.9
     , insert-ordered-containers >=0.2.3    && <0.3
-    , lens                      >=4.16.1   && <5.3
-    , network                   >=2.6.3.5  && <3.2
+    , lens                      >=4.16.1   && <5.4
+    , network                   >=2.6.3.5  && <3.3
     , optics-core               >=0.2      && <0.5
     , optics-th                 >=0.2      && <0.5
     , scientific                >=0.3.6.2  && <0.4
     , unordered-containers      >=0.2.9.0  && <0.3
     , uuid-types                >=1.0.3    && <1.1
     , vector                    >=0.12.0.1 && <0.14
-    , QuickCheck                >=2.10.1   && <2.15
+    , QuickCheck                >=2.10.1   && <2.16
 
   default-language:    Haskell2010
@sandratowry6
Copy link

I don't know how this work but iam will to learn

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