agentm / project-m36

Project: M36 Relational Algebra Engine
The Unlicense
876 stars 47 forks source link

Best approach to include project-m36 client #309

Closed drshade closed 2 years ago

drshade commented 2 years ago

This might be more of a general haskell package management type question, but what is the best approach to include project-m36 client into my application build?

I started with a "stack init" type project, and then added project-m36 as a dependency. Compiling that took me down a long journey of trying to figure out a long list of "extra-deps" to include to get everything compiling.

My eventual list of "extra-deps" in stack.yaml looks like this:

extra-deps: 
- git: https://github.com/agentm/project-m36.git
  commit: c505392e6dcda8dfeab3fcd65575ccd28c7b9331
- git: https://github.com/agentm/curryer.git
  commit: 74ecaac619ad1165a4517d5c0f4e530493bda130
- git: https://github.com/composewell/streamly.git
  commit: ac3af8749194f1788704dda8667d0b3807075cc2
- fast-builder-0.1.2.1
- rset-1.0.0
- winery-1.3.2
- barbies-th-0.1.8
- base16-bytestring-1.0.1.0
- heaps-0.3.6.1@sha256:7928b759ca5180d35722c45948c0bde264229f3c99c1888188a3d9285f13d3d2,1340
- stm-containers-1.2@sha256:a887f2e7692b7cf20e0b081e2d66e21076e2bd4b57016ec59c484edfa2d29397,3244
- stm-hamt-1.2.0.6@sha256:fba86ccb4b45c5706c19b0e1315ba63dcac3b5d71de945ec001ba921fae80061,3972 

Which now seems to compile - but wasn't a particularly fun approach to get up and running.

What is the recommended way to use the project-m36 client?

All the best, Tom

farzadbekran commented 2 years ago

The problem with using Project:M36 with stack is caused by it not being included in stackage, therefor stack does not know what extra deps are needed. As long as its not included in the stackage, i think the best way is to just copy the deps from the stack.yaml file in the repo itself and use the latest commit.

agentm commented 2 years ago

Thanks! I'll add this to the documentation. I am also working on upgrading several of these packages to use the hackage/stackage versions of modules whenever possible.