<p>So I solved it. Recollect in lesson 3 where you have to update the  <code>plutus</code> repo with the tag in cabal.project (from lesson 10). Then in the plutus repo, <code>nix build -f default.nix plutus.haskell.packages.plutus-core</code> (this may or may not be necessary) and run <code>nix-shell</code>. Then <code>cabal run uniswap-pab</code> in the lesson 10 repo should work.</p>

CC BY-SA 4.0
2021-06-19T22:40:02.067Z
2021-06-19T22:40:02.067Z
Hud
<p>Altering <code>cabal.project</code> line for <code>eventful-sql-common</code> is also an option: the error suggests that build needs another extension (<code>MultiParamTypeClasses</code>) which can be added to respective line of <code>cabal.project</code>:</p>
<pre><code>@ code/week10/cabal.project:41 @ source-repository-package
-- newer version of persistent. See stack.yaml for the mirrored
-- configuration.
package eventful-sql-common
-  ghc-options: -XDerivingStrategies -XStandaloneDeriving -XUndecidableInstances -XDataKinds -XFlexibleInstances
+  ghc-options: -XDerivingStrategies -XStandaloneDeriving -XUndecidableInstances -XDataKinds -XFlexibleInstances -XMultiParamTypeClasses
</code></pre>

CC BY-SA 4.0
2021-06-23T08:50:13.753Z
2021-06-23T08:50:13.753Z
sorki
<p>For lecture 10 of plutus pioneering program, we had to run <code>cabal run uniswap-pab</code> to create the contract IDs. I got this</p>
<pre><code> - plutus-pioneer-program-week10-0.1.0.0 (exe:uniswap-pab) (first run)
Starting     eventful-sql-common-0.2.0 (lib)
Building     eventful-sql-common-0.2.0 (lib)

Failed to build eventful-sql-common-0.2.0.
Build log (
/Users/hud/.cabal/logs/ghc-8.10.2/vntfl-sql-cmmn-0.2.0-cb78f53d.log ):
Configuring library for eventful-sql-common-0.2.0..
Preprocessing library for eventful-sql-common-0.2.0..
Building library for eventful-sql-common-0.2.0..
[1 of 5] Compiling Eventful.Store.Sql.JSONString ( src/Eventful/Store/Sql/JSONString.hs, dist/build/Eventful/Store/Sql/JSONString.o, dist/build/Eventful/Store/Sql/JSONString.dyn_o )
[2 of 5] Compiling Eventful.Store.Sql.Orphans ( src/Eventful/Store/Sql/Orphans.hs, dist/build/Eventful/Store/Sql/Orphans.o, dist/build/Eventful/Store/Sql/Orphans.dyn_o )

src/Eventful/Store/Sql/Orphans.hs:19:21: warning: [-Wdeprecations]
    In the use of data constructor ‘PersistDbSpecific’
    (imported from Database.Persist.Sql, but defined in persistent-2.11.0.4:Database.Persist.Types.Base):
    Deprecated: &quot;Deprecated since 2.11 because of inconsistent escaping behavior across backends. The Postgres backend escapes these values, while the MySQL backend does not. If you are using this, please switch to 'PersistLiteral' or 'PersistLiteralEscaped' based on your needs.&quot;
   |
19 |   fromPersistValue (PersistDbSpecific t) =
   |                     ^^^^^^^^^^^^^^^^^
[3 of 5] Compiling Eventful.Store.Sql.Operations ( src/Eventful/Store/Sql/Operations.hs, dist/build/Eventful/Store/Sql/Operations.o, dist/build/Eventful/Store/Sql/Operations.dyn_o )

src/Eventful/Store/Sql/Operations.hs:18:1: warning: [-Wunused-imports]
    The import of ‘maybe’ from module ‘Data.Maybe’ is redundant
   |
18 | import Data.Maybe (listToMaybe, maybe)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Eventful/Store/Sql/Operations.hs:19:1: warning: [-Wunused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
   |
19 | import Data.Monoid ((&lt;&gt;))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
[4 of 5] Compiling Eventful.Store.Sql.DefaultEntity ( src/Eventful/Store/Sql/DefaultEntity.hs, dist/build/Eventful/Store/Sql/DefaultEntity.o, dist/build/Eventful/Store/Sql/DefaultEntity.dyn_o )

src/Eventful/Store/Sql/DefaultEntity.hs:25:1: error:
    Generating Persistent entities now requires the MultiParamTypeClasses language extension. Please enable it by copy/pasting this line to the top of your file:

{-# LANGUAGE MultiParamTypeClasses #-}
   |
25 | share [mkPersist sqlSettings, mkMigrate &quot;migrateSqlEvent&quot;] [persistLowerCase|
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
cabal: Failed to build eventful-sql-common-0.2.0 (which is required by
exe:uniswap-pab from plutus-pioneer-program-week10-0.1.0.0). See the build log
above for details.
</code></pre>
<p>I tried to remove the <code>dist-newstyle</code> folder and tried run <code>cabal configure &amp;&amp; cabal build</code> but to no avail. How do I deal with eventful sql errors?</p>

CC BY-SA 4.0
2021-06-17T14:49:03.190Z
Can you provide more of the error message?
Matthias Sieber
CC BY-SA 4.0
2021-06-18T14:53:24.767Z
@MatthiasSieber added!
Hud
<plutus><plutus-pioneer-program><cabal>
Failed to build eventful-sql-common-0.2.0
# Failed to build eventful-sql-common-0.2.0

(Asked by: username_0 on 2021-06-17)

For lecture 10 of plutus pioneering program, we had to run cabal run uniswap-pab to create the contract IDs. I got this
 - plutus-pioneer-program-week10-0.1.0.0 (exe:uniswap-pab) (first run)
Starting     eventful-sql-common-0.2.0 (lib)
Building     eventful-sql-common-0.2.0 (lib)

Failed to build eventful-sql-common-0.2.0.
Build log (
/Users/hud/.cabal/logs/ghc-8.10.2/vntfl-sql-cmmn-0.2.0-cb78f53d.log ):
Configuring library for eventful-sql-common-0.2.0..
Preprocessing library for eventful-sql-common-0.2.0..
Building library for eventful-sql-common-0.2.0..
[1 of 5] Compiling Eventful.Store.Sql.JSONString ( src/Eventful/Store/Sql/JSONString.hs, dist/build/Eventful/Store/Sql/JSONString.o, dist/build/Eventful/Store/Sql/JSONString.dyn_o )
[2 of 5] Compiling Eventful.Store.Sql.Orphans ( src/Eventful/Store/Sql/Orphans.hs, dist/build/Eventful/Store/Sql/Orphans.o, dist/build/Eventful/Store/Sql/Orphans.dyn_o )

src/Eventful/Store/Sql/Orphans.hs:19:21: warning: [-Wdeprecations]
    In the use of data constructor ‘PersistDbSpecific’
    (imported from Database.Persist.Sql, but defined in persistent-2.11.0.4:Database.Persist.Types.Base):
    Deprecated: "Deprecated since 2.11 because of inconsistent escaping behavior across backends. The Postgres backend escapes these values, while the MySQL backend does not. If you are using this, please switch to 'PersistLiteral' or 'PersistLiteralEscaped' based on your needs."
   |
19 |   fromPersistValue (PersistDbSpecific t) =
   |                     ^^^^^^^^^^^^^^^^^
[3 of 5] Compiling Eventful.Store.Sql.Operations ( src/Eventful/Store/Sql/Operations.hs, dist/build/Eventful/Store/Sql/Operations.o, dist/build/Eventful/Store/Sql/Operations.dyn_o )

src/Eventful/Store/Sql/Operations.hs:18:1: warning: [-Wunused-imports]
    The import of ‘maybe’ from module ‘Data.Maybe’ is redundant
   |
18 | import Data.Maybe (listToMaybe, maybe)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Eventful/Store/Sql/Operations.hs:19:1: warning: [-Wunused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
   |
19 | import Data.Monoid ((<>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
[4 of 5] Compiling Eventful.Store.Sql.DefaultEntity ( src/Eventful/Store/Sql/DefaultEntity.hs, dist/build/Eventful/Store/Sql/DefaultEntity.o, dist/build/Eventful/Store/Sql/DefaultEntity.dyn_o )

src/Eventful/Store/Sql/DefaultEntity.hs:25:1: error:
    Generating Persistent entities now requires the MultiParamTypeClasses language extension. Please enable it by copy/pasting this line to the top of your file:

{-# LANGUAGE MultiParamTypeClasses #-}
   |
25 | share [mkPersist sqlSettings, mkMigrate "migrateSqlEvent"] [persistLowerCase|
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
cabal: Failed to build eventful-sql-common-0.2.0 (which is required by
exe:uniswap-pab from plutus-pioneer-program-week10-0.1.0.0). See the build log
above for details.

I tried to remove the dist-newstyle folder and tried run cabal configure && cabal build but to no avail. How do I deal with eventful sql errors?

**Tags:** plutus, plutus-pioneer-program, cabal
> **Comments:**
> **username_1**: Can you provide more of the error message?  
> **username_0**: @MatthiasSieber added!  

---

## 2 answers

### Answer by username_0 on 2021-06-19. Score: 1 | Accepted answer

So I solved it. Recollect in lesson 3 where you have to update the `plutus` repo with the tag in cabal.project (from lesson 10). Then in the plutus repo, `nix build -f default.nix plutus.haskell.packages.plutus-core` (this may or may not be necessary) and run `nix-shell`. Then `cabal run uniswap-pab` in the lesson 10 repo should work.


---

### Answer by username_2 on 2021-06-23. Score: 0

Altering cabal.project line for eventful-sql-common is also an option: the error suggests that build needs another extension (MultiParamTypeClasses) which can be added to respective line of cabal.project:
@ code/week10/cabal.project:41 @ source-repository-package
-- newer version of persistent. See stack.yaml for the mirrored
-- configuration.
package eventful-sql-common
-  ghc-options: -XDerivingStrategies -XStandaloneDeriving -XUndecidableInstances -XDataKinds -XFlexibleInstances
+  ghc-options: -XDerivingStrategies -XStandaloneDeriving -XUndecidableInstances -XDataKinds -XFlexibleInstances -XMultiParamTypeClasses


---

