mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-11 04:45:57 +03:00
Document solution for .hs unneeded rebuilds (#932)
* Document solution for .hs unneeded rebuilds * Update BAZEL.md Co-Authored-By: stefanobaghino-da <43749967+stefanobaghino-da@users.noreply.github.com>
This commit is contained in:
parent
aa24ae0d2d
commit
7843621766
13
BAZEL.md
13
BAZEL.md
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user