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

Doesn't build with aeson 1.2.2.0 #124

Closed
felixonmars opened this issue Sep 21, 2017 · 3 comments
Closed

Doesn't build with aeson 1.2.2.0 #124

felixonmars opened this issue Sep 21, 2017 · 3 comments
Assignees

Comments

@felixonmars
Copy link
Contributor

I did the following in the Arch package to make it builds again:

sed -i 's/import Data.Aeson/import Data.Aeson hiding (constructorTagModifier)/' src/Data/Swagger/Internal/ParamSchema.hs
sed -i 's/import Data.Aeson/import Data.Aeson hiding (constructorTagModifier, unwrapUnaryRecords, fieldLabelModifier, allNullaryToStringTag)/' src/Data/Swagger/Internal/Schema.hs

The original errors:

[ 8 of 15] Compiling Data.Swagger.Internal.ParamSchema ( src/Data/Swagger/Internal/ParamSchema.hs, dist/build/Data/Swagger/Internal/ParamSchema.dyn_o )

src/Data/Swagger/Internal/ParamSchema.hs:298:21: error:
    Ambiguous occurrence ‘constructorTagModifier’
    It could refer to either ‘Data.Aeson.constructorTagModifier’,
                             imported from ‘Data.Aeson’ at src/Data/Swagger/Internal/ParamSchema.hs:25:1-17
                             (and originally defined in ‘aeson-1.2.2.0:Data.Aeson.Types.Internal’)
                          or ‘Data.Swagger.SchemaOptions.constructorTagModifier’,
                             imported from ‘Data.Swagger.SchemaOptions’ at src/Data/Swagger/Internal/ParamSchema.hs:46:1-33
                             (and originally defined
                                at src/Data/Swagger/SchemaOptions.hs:14:5-26)
    |
298 |       tag = toJSON (constructorTagModifier opts (conName (Proxy3 :: Proxy3 c f p)))
    |                     ^^^^^^^^^^^^^^^^^^^^^^
[10 of 15] Compiling Data.Swagger.Internal.Schema ( src/Data/Swagger/Internal/Schema.hs, dist/build/Data/Swagger/Internal/Schema.dyn_o )

src/Data/Swagger/Internal/Schema.hs:663:7: error:
    Ambiguous occurrence ‘unwrapUnaryRecords’
    It could refer to either ‘Data.Aeson.unwrapUnaryRecords’,
                             imported from ‘Data.Aeson’ at src/Data/Swagger/Internal/Schema.hs:35:1-17
                             (and originally defined in ‘aeson-1.2.2.0:Data.Aeson.Types.Internal’)
                          or ‘Data.Swagger.SchemaOptions.unwrapUnaryRecords’,
                             imported from ‘Data.Swagger.SchemaOptions’ at src/Data/Swagger/Internal/Schema.hs:67:1-33
                             (and originally defined
                                at src/Data/Swagger/SchemaOptions.hs:21:5-22)
    |
663 |     | unwrapUnaryRecords opts = fieldSchema
    |       ^^^^^^^^^^^^^^^^^^

src/Data/Swagger/Internal/Schema.hs:717:21: error:
    Ambiguous occurrence ‘fieldLabelModifier’
    It could refer to either ‘Data.Aeson.fieldLabelModifier’,
                             imported from ‘Data.Aeson’ at src/Data/Swagger/Internal/Schema.hs:35:1-17
                             (and originally defined in ‘aeson-1.2.2.0:Data.Aeson.Types.Internal’)
                          or ‘Data.Swagger.SchemaOptions.fieldLabelModifier’,
                             imported from ‘Data.Swagger.SchemaOptions’ at src/Data/Swagger/Internal/Schema.hs:67:1-33
                             (and originally defined
                                at src/Data/Swagger/SchemaOptions.hs:12:5-22)
    |
717 |     fname = T.pack (fieldLabelModifier opts (selName (Proxy3 :: Proxy3 s f p)))
    |                     ^^^^^^^^^^^^^^^^^^

src/Data/Swagger/Internal/Schema.hs:741:5: error:
    Ambiguous occurrence ‘allNullaryToStringTag’
    It could refer to either ‘Data.Aeson.allNullaryToStringTag’,
                             imported from ‘Data.Aeson’ at src/Data/Swagger/Internal/Schema.hs:35:1-17
                             (and originally defined in ‘aeson-1.2.2.0:Data.Aeson.Types.Internal’)
                          or ‘Data.Swagger.SchemaOptions.allNullaryToStringTag’,
                             imported from ‘Data.Swagger.SchemaOptions’ at src/Data/Swagger/Internal/Schema.hs:67:1-33
                             (and originally defined
                                at src/Data/Swagger/SchemaOptions.hs:19:5-25)
    |
741 |   | allNullaryToStringTag opts && allNullary = pure $ unnamed (toStringTag sumSchema)
    |     ^^^^^^^^^^^^^^^^^^^^^

src/Data/Swagger/Internal/Schema.hs:767:19: error:
    Ambiguous occurrence ‘constructorTagModifier’
    It could refer to either ‘Data.Aeson.constructorTagModifier’,
                             imported from ‘Data.Aeson’ at src/Data/Swagger/Internal/Schema.hs:35:1-17
                             (and originally defined in ‘aeson-1.2.2.0:Data.Aeson.Types.Internal’)
                          or ‘Data.Swagger.SchemaOptions.constructorTagModifier’,
                             imported from ‘Data.Swagger.SchemaOptions’ at src/Data/Swagger/Internal/Schema.hs:67:1-33
                             (and originally defined
                                at src/Data/Swagger/SchemaOptions.hs:14:5-26)
    |
767 |     tag = T.pack (constructorTagModifier opts (conName (Proxy3 :: Proxy3 c f p)))
    |                   ^^^^^^^^^^^^^^^^^^^^^^
@phadej phadej self-assigned this Sep 21, 2017
@fizruk
Copy link
Member

fizruk commented Sep 21, 2017

@phadej I see you self-assigned this.
I'll wait for a fix before making a release then.

@phadej
Copy link
Collaborator

phadej commented Sep 21, 2017

Fixed in #125

@fizruk
Copy link
Member

fizruk commented Sep 21, 2017

Released in swagger2-2.1.6.

@fizruk fizruk closed this as completed Feb 22, 2018
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

No branches or pull requests

3 participants