Closed mohanzhang closed 9 years ago
… even though the constraints are different.
The difference is only in your project’s Cabal package description file (*.cabal
), which Halcyon does not attempt to parse. Therefore, Halcyon doesn’t see a difference in constraints, and so, forcing a sandbox rebuild is, sadly, the only way to proceed.
If you declare only the packages you actually use, either in a .halcyon/constraints
or a cabal.config
, adding one more package (without changing the previously-declared constraints) should cause Halcyon to automatically extend the existing sandbox, by building only the newly-added package.
Ah, fantastic. This makes perfect sense. Thank you!
I'm trying to understand a problem I'm having before resorting to the nuclear option of blowing away the sandbox in my private storage and forcing a build from scratch.
The issue is that my
cabal.config
is from stackage, so it has many more packages than I actually use in my project's cabal file underbuild-depends
. In my last change, I needed to add a package tobuild-depends
that was already specified undercabal.config
(specifically,mime-mail-ses
).I assumed that this would cause a checksum failure and force a new sandbox, but instead, I think the buildpack didn't realize that the sandbox should change, because I see that it selects the sandbox it used in the previous build, even though the constraints are different.
The error I am now getting is:
I'm assuming there is a gap in my understanding of how halcyon uses
cabal.config
. My immediate reaction is to blow away the sandboxes in private storage to force a rebuild, but is it the best way?