Using plutus-apps as a dependency in another Haskell project
DrXano opened this issue · comments
I wanted to build the PAB of Plutus and im using the Plutus-starter repository to build the PAB. But when the build finished i noticed it built an old version of Plutus-apps. I tried to update the dependencies of the project, and replaced the tag of the plutus-apps dependency to get a recent commit. But when i start nix-shell im always getting this:
error: attribute '4c60896dff0c31a98395ba6e6791433cd61a25e3' missing
at /nix/store/bvynxhgsxhp6ds11ak1wnjx5h8avmfwf-source/modules/cabal-project.nix:111:37:
110| default = if config.sha256map != null
111| then { location, tag, ...}: config.sha256map.${location}.${tag}
| ^
112| else _: null;
(use '--show-trace' to show detailed location information)
I tried other recent commits and tags but its only working with this tag: plutus-starter-devcontainer/v1.0.14
You might also need to update the nix/pkgs/haskell/haskell.nix
file:
rg plutus-starter-devcontainer/v1.0.14
cabal.project
25: tag: plutus-starter-devcontainer/v1.0.14
nix/pkgs/haskell/haskell.nix
25: "https://github.com/input-output-hk/plutus-apps.git"."plutus-starter-devcontainer/v1.0.14" = "0j3hphj4b21vwdj900233d67qsaj91mppwsx1vv0ichnmnw2bmir";
and update the tag there.
Got it, and now i have a new question: Where do i find the sha256 of a commit?
Usually nix-shell
will message you about the hash mismatch telling both: the expected and the actual hash. Just try to change the commit, run nix-shell
again and then fix the hash.
What im doing is updating the dependencies of the plutus-starter repository. I managed to update the tags, updated the sha256 according to nix-shell
, and now i am getting this error:
Error:
Problem with module re-exports:
- The module 'Data.Aeson.Extras'
is not exported by any suitable package.
It occurs in neither the 'exposed-modules' of this package,
nor any of its 'build-depends' dependencies.
- The module 'Data.Either.Extras'
is not exported by any suitable package.
It occurs in neither the 'exposed-modules' of this package,
nor any of its 'build-depends' dependencies.
- The module 'Plutus.V1.Ledger.Ada'
is not exported by any suitable package.
It occurs in neither the 'exposed-modules' of this package,
nor any of its 'build-depends' dependencies.
- The module 'Plutus.V1.Ledger.Slot'
is not exported by any suitable package.
It occurs in neither the 'exposed-modules' of this package,
nor any of its 'build-depends' dependencies.
- The module 'Plutus.V1.Ledger.TxId'
is not exported by any suitable package.
It occurs in neither the 'exposed-modules' of this package,
nor any of its 'build-depends' dependencies.
In the stanza 'library'
In the package 'plutus-ledger-0.1.0.0'
ak3n i did it. Got over this problem, managed to update the dependencies, and compiled the repository sucessfully. I also opened a PR on the repository with what i've done.