4

My stack (haskell) project has a few sub-projects which have their own cabal files. My (self-hosted) gitlab CI runner has stack installed globally and all the builds share the ~/.stack directory, which seems to be working well, as subsequent builds do not seem to be rebuilding the LTS/snapshot packages.

Further, I have cached all .stack-work directories in the build dir and the cache restoration seems to be working well. Despite that, in every build I see the following messages...

lambda-haskell-0.1.0.0: unregistering (old configure information not found)
opaleye-codegen-0.0.0: unregistering (missing dependencies: opaleye-helpers, steroids)
opaleye-helpers-0.1.0.0: unregistering (old configure information not found)
poi-bin-0.1.0.0: unregistering (missing dependencies: opaleye-codegen)
steroids-0.1.1: unregistering (old configure information not found)
webservice-0.1.0.0: unregistering (missing dependencies: lambda-haskell, opaleye-helpers, poi-bin)

... and this results in the main package, i.e. webservice, being compiled from scratch, which wastes a lot of time.

What else do I need to cache? What "old configure information" is being referred to and where is it stored?

Saurabh Nanda
  • 6,373
  • 5
  • 31
  • 60
  • What version of Stack are you using? Have you verified that it works correctly outside of CI? Can you duplicate the problem in your CI setup with a standalone "main project + one subproject" example? – K. A. Buhr Jan 30 '22 at 21:11
  • The "old configure information" is information on the flags that were used to build the packages in `.stack-work`, and it's stored in the database `.stack-work/stack.sqlite3`. If that file is being correctly cached and restored, I'm not sure what's going on. – K. A. Buhr Jan 30 '22 at 21:17
  • Have you seen https://stackoverflow.com/questions/60906336/stack-haskell-build-cache-of-source-files-with-github-actions ? Maybe your stack version is old enough and relies on timestamps – Andrew Feb 02 '22 at 16:59

0 Answers0