Skip to content

Cabal build is failing #8394

@HinaMunir-Hm

Description

@HinaMunir-Hm

Describe the bug
I created the cabal file using command 'cabal init interactive'. But when I am trying to run cabal build it is throwing me errors. I am uncertain but I think this is because either I have created a smart contract using latest plutus playground haskell version or I have done some mistake while creating cabal file.

To Reproduce
Steps to reproduce the behavior:

$cabal init --interactive
What does the package build:
   1) Executable
   2) Library
   3) Library and Executable
Your choice? 3
What is the main module of the executable:
 * 1) Main.hs (does not yet exist, but will be created)
   2) Main.lhs (does not yet exist, but will be created)
   3) Other (specify)
Your choice? [default: Main.hs (does not yet exist, but will be created)] 3
Please specify? nfts-list-contract.hs
Please choose version of the Cabal specification to use:
   1) 1.10   (legacy)
   2) 2.0    (+ support for Backpack, internal sub-libs, '^>=' operator)
   3) 2.2    (+ support for 'common', 'elif', redundant commas, SPDX)
 * 4) 2.4    (+ support for '**' globbing)
   5) 3.0    (+ set notation for ==, common stanzas in ifs, more redundant commas, better pkgconfig-depends)
Your choice? [default: 2.4    (+ support for '**' globbing)] 
Package name? [default: plutus-example] 
Package version? [default: 0.1.0.0] 
Please choose a license:
 * 1) NONE
   2) BSD-2-Clause
   3) BSD-3-Clause
   4) Apache-2.0
   5) MIT
   6) MPL-2.0
   7) ISC
   8) GPL-2.0-only
   9) GPL-3.0-only
  10) LGPL-2.1-only
  11) LGPL-3.0-only
  12) AGPL-3.0-only
  13) GPL-2.0-or-later
  14) GPL-3.0-or-later
  15) LGPL-2.1-or-later
  16) LGPL-3.0-or-later
  17) AGPL-3.0-or-later
  18) Other (specify)
Your choice? [default: NONE] 
Author name? Hina
Maintainer email? 
Project homepage URL? 
Project synopsis? 
Project category:
 * 1) (none)
   2) Codec
   3) Concurrency
   4) Control
   5) Data
   6) Database
   7) Development
   8) Distribution
   9) Game
  10) Graphics
  11) Language
  12) Math
  13) Network
  14) Sound
  15) System
  16) Testing
  17) Text
  18) Web
  19) Other (specify)
Your choice? [default: (none)] 
Should I generate a test suite for the library? [default: y] 
Test directory:
 * 1) test
   2) Other (specify)
Your choice? [default: test] 
What base language is the package written in:
 * 1) Haskell2010
   2) Haskell98
   3) Other (specify)
Your choice? [default: Haskell2010] 
Add informative comments to each field in the cabal file (y/n)? [default: n] 

Guessing dependencies...

Warning: no package found providing Control.Lens.

Warning: no package found providing Data.Default.

Warning: no package found providing Ledger.

Warning: no package found providing Ledger.Ada.

Warning: no package found providing Ledger.Constraints.

Warning: no package found providing Ledger.Contexts.

Warning: no package found providing Ledger.Interval.

Warning: no package found providing Ledger.TimeSlot.

Warning: no package found providing Ledger.Tx.

Warning: no package found providing Ledger.Typed.Scripts.

Warning: no package found providing Ledger.Value.

Warning: no package found providing Plutus.Contract.

Warning: no package found providing Plutus.Contract.Test.

Warning: no package found providing Plutus.Contract.Typed.Tx.

Warning: no package found providing PlutusTx.

Warning: no package found providing PlutusTx.Prelude.

Warning: no package found providing Cardano.Api.Shelley.

Warning: no package found providing Codec.Serialise.

Warning: no package found providing Plutus.V1.Ledger.Scripts.

Warning: no package found providing Cardano.Api.

Warning: no package found providing Cardano.Api.Byron.

Warning: no package found providing Control.Monad.Trans.Except.Extra.

Warning: no package found providing Data.Aeson.

Warning: no package found providing Data.Sequence.Strict.

Warning: no package found providing Cardano.CLI.Environment.

Warning: no package found providing Cardano.CLI.Shelley.Run.Query.

Warning: no package found providing Cardano.CLI.Types.

Warning: no package found providing Cardano.Ledger.Alonzo.PParams.

Warning: no package found providing Cardano.Ledger.Alonzo.PlutusScriptApi.

Warning: no package found providing Cardano.Ledger.Alonzo.Tx.

Warning: no package found providing Cardano.Ledger.Alonzo.TxInfo.

Warning: no package found providing Cardano.Ledger.Alonzo.TxWitness.

Warning: no package found providing Cardano.Ledger.BaseTypes.

Warning: no package found providing Cardano.Ledger.TxIn.

Warning: no package found providing Cardano.Ledger.Crypto.

Warning: no package found providing Cardano.Slotting.EpochInfo.

Warning: no package found providing Cardano.Slotting.Time.

Warning: no package found providing Ouroboros.Consensus.HardFork.Combinator.AcrossEras.

Warning: no package found providing Ouroboros.Consensus.HardFork.History.

Warning: no package found providing Ouroboros.Network.Protocol.LocalStateQuery.Type.

Warning: no package found providing Plutus.Script.Utils.V1.Typed.Scripts.

Warning: no package found providing Plutus.V1.Ledger.Api.

Warning: no package found providing PlutusTx.AssocMap.

Warning: no package found providing PlutusTx.IsData.Class.

Warning: no package found providing Plutus.V1.Ledger.Contexts.

Warning: no package found providing PlutusTx.Builtins.
Generating CHANGELOG.md...
Generating test/MyLibTest.hs...
Generating plutus-example.cabal...
Warning: plutus-example.cabal already exists, backing up old version in plutus-example.cabal.save0

Warning: no synopsis given. You should edit the .cabal file and add one.
You may want to edit the .cabal file and add a Description field.


$ cabal v2-build ...

Expected behavior
It should successfully build the cabal file so that I can convert .hs file to .plutus.

System information

  • Operating system
  • cabal, ghc versions
    cabal-install version 3.6.2.0,
    The Glorious Glasgow Haskell Compilation System, version 8.10.7

Additional context
Screenshot from 2022-08-18 12-08-46

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