Skip to content

beam libraries fail to build #7753

Open
@jkachmar

Description

@jkachmar

description

I'm not clear why this is happening, since the changes from beam-migrate 0.5.3.1 -> 0.5.3.2 shouldn't have caused a failure like this (it looks more like a consequence of the 0.5.3.1 change removing IsString).

beam-postgres errors
       /home/curators/work/unpack-dir/unpacked/beam-postgres-0.5.4.2-b87d68439aa1f0afa582131bbabbcf894e57e70d7f0fddbdaf689804967ad0ff/Database/Beam/Postgres
/Migrate.hs:86:20: error: [GHC-83865]
           • Couldn't match expected type: Tool.BeamMigrationBackend
                                             Postgres Pg
                         with actual type: (forall a. Pg a -> Pg a)
                                           -> (String -> IO (Tool.BeamMigrateConnection Postgres Pg))
                                           -> Tool.BeamMigrationBackend Postgres Pg
           • Probable cause: ‘Tool.BeamMigrationBackend’ is applied to too few arguments
             In the expression:
               Tool.BeamMigrationBackend
                 "postgres"
                 (unlines
                    ["For beam-postgres, this is a libpq connection string which can either be a list of key value pairs or a URI",
                     "",
                     "For example, 'host=localhost port=5432 dbname=mydb connect_timeout=10' or 'dbname=mydb'",
                     "", ....])

...

                               $ \ conn -> left show <$> withPgDebug (\ _ -> pure ()) conn action)
          |
       86 | migrationBackend = Tool.BeamMigrationBackend
          |                    ^^^^^^^^^^^^^^^^^^^^^^^^^...
          • Couldn't match expected type: Pg ()
                         with actual type: Pg a0 -> IO (Either String a0)
           • The lambda expression ‘\ options action
                                      -> bracket (Pg.connectPostgreSQL (fromString options)) Pg.close
                                           $ ...’
             has two value arguments,
               but its type ‘T.Text -> Pg ()’ has only one
             In the 9th argument of ‘Tool.BeamMigrationBackend’, namely
               ‘(\ options action
                   -> bracket (Pg.connectPostgreSQL (fromString options)) Pg.close
                        $ \ conn
                            -> left show <$> withPgDebug (\ _ -> pure ()) conn action)’
             In the expression:
               Tool.BeamMigrationBackend
                 "postgres"
                 (unlines
                    ["For beam-postgres, this is a libpq connection string which can either be a list of key value pairs or a URI",
                     "",
                     "For example, 'host=localhost port=5432 dbname=mydb connect_timeout=10' or 'dbname=mydb'",
                     "", ....])
                 (liftIOWithHandle getDbConstraints)
                 (Db.sql92Deserializers
                    <>
                      Db.sql99DataTypeDeserializers
                        <>
                          Db.sql2008BigIntDataTypeDeserializers
                            <> postgresDataTypeDeserializers <> Db.beamCheckDeserializers)
                 (BCL.unpack . (<> ";") . pgRenderSyntaxScript . fromPgCommand)
                 "postgres.sql" pgPredConverter
                 (mconcat
                    [defaultActionProvider, defaultSchemaActionProvider,
                     pgExtensionActionProvider, pgCustomEnumActionProvider])
                 (\ options action
                    -> bracket (Pg.connectPostgreSQL (fromString options)) Pg.close
                         $ \ conn -> left show <$> withPgDebug (\ _ -> pure ()) conn action)
           |
       108 |                         (\options action ->
           |                          ^^^^^^^^^^^^^^^^^^...

along with similar errors for beam-sqlite

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions