IntersectMBO / plutus

The Plutus language implementation and tools
Apache License 2.0
1.58k stars 482 forks source link

Trying to build this `plutus` repo as a dependency of a cabal project #4791

Closed omefire closed 1 year ago

omefire commented 2 years ago

I am trying to build a cabal project that has plutus as a dependency, however I keep getting the error:

[171 of 189] Compiling PlutusIR.Transform.DeadCode ( plutus-ir/src/PlutusIR/Transform/DeadCode.hs, dist/build/PlutusIR/Transform/DeadCode.o, dist/build/PlutusIR/Transform/DeadCode.dyn_o )

plutus-ir/src/PlutusIR/Transform/DeadCode.hs:51:45: error:
    • Couldn't match expected type ‘T.ToVertex Deps.Node’
                  with actual type ‘G.Graph Deps.Node’
    • In the second argument of ‘T.reachable’, namely ‘depGraph’
      In the second argument of ‘($)’, namely
        ‘T.reachable Deps.Root depGraph’
      In the expression: Set.fromList $ T.reachable Deps.Root depGraph
   |
51 |     in Set.fromList $ T.reachable Deps.Root depGraph
   |        
                                     ^^^^^^^^

Here is my cabal.project file:

...
source-repository-package
  type: git
  location: https://github.com/input-output-hk/plutus
  tag: f680ac6979e069fcc013e4389ee607ff5fa6672f
  subdir:
    plutus-core
    plutus-ledger-api
    plutus-tx
    plutus-tx-plugin
    prettyprinter-configurable
    stubs/plutus-ghc-stub
    word-array
    ...
michaelpj commented 2 years ago

Probably we're missing an upper bound on algebraic-graphs. PR welcome if you find it.

klarkc commented 1 year ago

It works with algebraic-graphs < 0.7, found it here.

michaelpj commented 1 year ago

This was fixed in master a long time ago.