Hi Arnaud,

Interesting setup you have there.

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.

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

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

From the usage notes:

The project directory and ~/.stack are volume-mounted into the
container, so any build artifacts are "permanent" (not deleted with
the container).

That *sounds* like you'd get incremental builds then!

Best,

Luke

On  0, Arnaud Bailly <[email protected]> wrote:
  Hello,
  We have a project with multiple packages built using stack, that also
  contains or depends on non-Haskell software. I have written a shake file
  on top of that to orchestrate building docker images for all our services
  and running system tests. This shake file contains rules for triggering
  build of images that depend on source files. The build itself uses stack
  inside docker containers (not using stack's docker mode but it could be
  the case...). The dependency graph looks like that
  source files
     ^   ^
     |   |
     |   +-- service exe <--- service docker image <---+
     |                                                 +-- tests execution
     + ----- tester exe  <--- tester docker image  <---+
  The problem I am facing is that changing any source file triggers a full
  rebuild of the 2 containers, although some of the source files are not
  relevant to one or the other.
  I don't know how to solve this issue. I thought of leveraging stack's
  capabilities to extract a dependency graph and manually check which
  project to rebuild depending on which source files changed but this seems
  pretty much redundant.
  I would appreciate any insight on how best to handle this kind of
  configuration.
  Regards,
  Arnaud Bailly

  --
  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 [1][email protected].
  To post to this group, send email to [2][email protected].
  To view this discussion on the web visit
  
[3]https://groups.google.com/d/msgid/haskell-stack/39b78d6c-5a07-4e05-a4ab-67fe147a9dc0%40googlegroups.com.
  For more options, visit [4]https://groups.google.com/d/optout.

References

  Visible links
  1. mailto:[email protected]
  2. mailto:[email protected]
  3. 
https://groups.google.com/d/msgid/haskell-stack/39b78d6c-5a07-4e05-a4ab-67fe147a9dc0%40googlegroups.com?utm_medium=email&utm_source=footer
  4. https://groups.google.com/d/optout

--
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/20171219133130.jfdbn2dnd377ao4a%40lostatsea.lostatsea.
For more options, visit https://groups.google.com/d/optout.

Reply via email to