7

I started following the lectures on youtube and got this error when I try to build the English Auction

Warning: The build command is a part of the legacy v1 style of cabal usage.

Please switch to using either the new project style and the new-build command or the legacy v1-build alias as new-style projects will become the default in the next version of cabal-install. Please file a bug if you cannot replicate a working v1- use case with the new-style commands.

For more information, see: https://wiki.haskell.org/Cabal/NewBuild

Resolving dependencies... Warning: solver failed to find a solution: Could not resolve dependencies: [__0] trying: plutus-pioneer-program-week01-0.1.0.0 (user goal) [__1] next goal: base (dependency of plutus-pioneer-program-week01) [__1] rejecting: base-4.12.0.0/installed-4.1... (conflict: plutus-pioneer-program-week01 => base^>=4.14.1.0) [__1] fail (backjumping, conflict set: base, plutus-pioneer-program-week01) After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: plutus-pioneer-program-week01, base Trying configure anyway. Configuring plutus-pioneer-program-week01-0.1.0.0... cabal: Encountered missing dependencies: aeson -any, base >=4.14.1.0 && <4.15, playground-common -any, plutus-contract -any, plutus-ledger -any, plutus-tx -any, plutus-tx-plugin -any

tried to run nix-shell at the top-level directory of the plutus-repository but I couldn't. Got

Error: getting status of '/home/test/plutus/plutus-pioneer-program/default.nix': No such file or directory

2

I had a similar issue and solved it by running nix-shell in the plutus library, then navigating to the plutus-pioneer/code/week01 and running cabal update. I hope this helps!

4
  • 1
    I could run cabal update and cabal build. When I try to execute cabal run an error message saying that 'Cannot run the target '' which refers to the package plutus-pioneer-program-week01-0.1.0.0 because it does not contain any executables.' shows.
    – Ramiro
    Jun 9 at 14:59
  • 1
    Ahh, I think you should be using cabal repl in the week01 folder. **note the lowercase w in week01. This folder should contain these files: cabal.project hie.yaml LICENSE plutus-pioneer-program-week01.cabal src Jun 9 at 15:29
  • 1
    Hello Isaac, could you please tell me how can i get to the plutus library? Jun 15 at 22:44
  • You can us "cd /nameofdirectory" in the terminal on linux. I would familiarize yourself with terminal commands and Vim :) Jun 21 at 21:21
1

I had the similar problem, this recipe works for me:

Run nix-shell inside plutus project and move to plutus-pioneer-program/code/week01 directory from nix shell, then start cabal build.

UPD: plutus-pioneer-program repo contains README with steps how to run plutus-playground, one of steps is to clone Plutus repo and to checkout it to the specific commit. Inside that Plutus directory you can run nix-shell and then go to pioneer directory.

4
  • How can i do that? when i try to run nix-shell i get Error: getting status of '/home/test/plutus/plutus-pioneer-program/default.nix': No such file or directory , where is the plutus project? is it a file or a location? sry if it seems tooo silly !!! Jun 15 at 22:37
  • 1
    Plutus repo it is mentioned in the Week #1 homework in the plutus-pioneer-program repo. Jun 17 at 1:13
  • Thank you , so I must install this library using nix, as well as cabal before running cabal - build ? Jun 17 at 1:23
  • 2
    Not exactly, you should just clone plutus repo, and every time when you want to run some code from pioneer program you should firstly run nix shell from plutus and go to desired project in that shell to run cabal commands. Jun 17 at 1:29
1

I am new to nix, but my understanding is as follows:

Both the plutus and plutus-pioneer-program repos need to be extracted on disk. Check out the plutus commit of the coding week you want to work on (in cabal.project in root of week code folder).

Start all the nix-shell instances you require in the root of the plutus repository. I start 3: one each for playground server and client, and programming in Hashkell (cabal repl). For each shell you have to cd to the correct folder. This way all components are in sync.

Don't forget to set up the cache at the start. I am really impressed how nix make this so easy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.