Skip to content

Commit

Permalink
Document solution for .hs unneeded rebuilds (digital-asset#932)
Browse files Browse the repository at this point in the history
* Document solution for .hs unneeded rebuilds

* Update BAZEL.md

Co-Authored-By: stefanobaghino-da <43749967+stefanobaghino-da@users.noreply.github.com>
  • Loading branch information
stefanobaghino-da authored and mergify[bot] committed May 8, 2019
1 parent aa24ae0 commit 7843621
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions BAZEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -1006,3 +1006,16 @@ program directly. Please refer to //daml-lf/archive/BUILD.bazel for example usag
If you find yourself writing similar rules, please take a moment to write some Starlark to abstract
it out and document it here. Note that proto3-suite isn't compatible with protoc, so it is not currently
possible to hook it up into the "proto_library" tooling.
## Known issues
### Unchanged Haskell library being rebuilt
Unfortunately, [GHC builds are not deterministic](https://gitlab.haskell.org/ghc/ghc/issues/12262). This, coupled with the way Bazel works, may lead to Haskell libraries that have not been changed to be rebuilt. If the library sits at the base of the dependency graph, it may cause a ripple effect that forces you to rebuild most of the workspace without an actual need for it (`ghc-lib` is one example of this).
**To work around this issue** you can clean the local and build cache, making sure you are fetching the GHC build artifacts from remote:
bazel clean --expunge # clean the build cache
rm -r .bazel-cache # clean the local cache
This will also mean that changes made locally will need to be rebuilt, but it's likely that this will still result in a net positive gain on your build time.

0 comments on commit 7843621

Please sign in to comment.