Ah, I see. I also saw you are already posting on the Shake list ;)

Also, another thing to consider:

   https://docs.docker.com/engine/userguide/eng-image/multistage-build/

Splitting your container into a build/service one and then pay less time
building, if you can't get Shake to recognize when to build and not build.

Hopefully someone else can weigh in with some pointers. I'll stop guessing!

Best,

Luke

On  0, Arnaud Bailly <[email protected]> wrote:
  Hi Luke,
  Thanks for your answer!
  On Tue, Dec 19, 2017 at 2:31 PM, Luke Murphy <[1][email protected]> wrote:

    Hi Arnaud,

    Interesting setup you have there.

  I am not sure how I should take this statement :)


    So, Shake triggers a build, and you fire up a container and run Stack
    inside that? I assume that it does a full rebuild because it is a fresh
    container - regardless of Stack managing .stack and project changes.

  Actually no, I mount the full project's directory into the container so I
  (usually) get incremental builds.
  What's bothersome is that I don't have stack's dependencies in shake so I
  sometimes rebuild too much, e.g. I rebuild the service container even if
  only the tester's code changes.
  I was looking at `stack dot` which produces a dependency graph, but it
  seemed ridiculous to parse a graphviz file to reconstruct a dependency
  graph in my haskell code, so I had a look at stack's code itself but it's
  really not obvious how to get that graph directly.

    Perhaps you can look into directly using the built in docker support:

       [2]https://docs.haskellstack.org/en/stable/docker_integration/#usage

  Yes, that I will do. It will probably simplify our CI pipeline too... but
  it will require some work

References

  Visible links
  1. mailto:[email protected]
  2. https://docs.haskellstack.org/en/stable/docker_integration/#usage

--
You received this message because you are subscribed to the Google Groups 
"haskell-stack" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/haskell-stack/20171219135657.h5p2rxrn3g7qib7i%40lostatsea.lostatsea.
For more options, visit https://groups.google.com/d/optout.

Reply via email to