biocad / openapi3

OpenAPI 3.0 data model
BSD 3-Clause "New" or "Revised" License
39 stars 54 forks source link

Updated for doctest on GHC 9.4 #61

Closed ysangkok closed 1 year ago

ysangkok commented 2 years ago

Fixes

Tested using

cabal test --enable-tests -w ghc-9.4.2 --constraint='vector>=0.13' --constraint='lens>=5.2' --constraint='aeson>=2.1'

The tests can't be run because doctest doesn't support GHC 9.4 yet.

pwm commented 1 year ago

Gentle ping @maksbotan could we please get this merged?

ysangkok commented 1 year ago

@pwm It would be best if sol/doctest#382 was finished first, then we could test this in CI.

eddiejessup commented 1 year ago

Hi, just letting you know that doctest has a release supporting 9.4 now

ysangkok commented 1 year ago

@maksbotan Doctest supports GHC 9.4 now, so I think this is ready for review.

endgame commented 1 year ago

As a Hackage Trustee, I have made the following revisions to openapi3-3.2.2:

maksbotan commented 1 year ago

Hi! Sorry for the lag!

I've incorporated @endgame's revision into master branch.

maksbotan commented 1 year ago

@ysangkok I've added 9.4 CI to this branch and doctests fail:

/__w/openapi3/openapi3/unpacked/openapi3-3.2.2/src/Data/OpenApi/Schema/Validation.hs:38: failure in expression `import Data.OpenApi'
expected: 
 but got: 
          ^
          <interactive>:1:1: error:
              attempting to use module ‘main:Data.OpenApi’ (/__w/openapi3/openapi3/unpacked/openapi3-3.2.2/src/Data/OpenApi.hs) which is not loaded

/__w/openapi3/openapi3/unpacked/openapi3-3.2.2/src/Data/OpenApi/Internal/Schema/Validation.hs:63: failure in expression `import Data.OpenApi.Internal.Schema.Validation'
expected: 
 but got: 
          ^
          <interactive>:1:1: error:
              attempting to use module ‘main:Data.OpenApi.Internal.Schema.Validation’ (/__w/openapi3/openapi3/unpacked/openapi3-3.2.2/src/Data/OpenApi/Internal/Schema/Validation.hs) which is not loaded

Can you look into this please?

ysangkok commented 1 year ago

@maksbotan I spent a couple of hours and reported sol/doctest#389 . I think the error in Data.OpenApi.Internal.Schema.Validation is related to OverloadedLists. But I don't wanna spend more time on this, I think doctest is super fragile and not worth the effort. Feel free to close this PR.

maksbotan commented 1 year ago

@ysangkok thanks for the discovery! I've replaced OverloadedLists usage with explicit IOHM.fromList, now tests pass on 9.4 🎉