-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added feature flag to enable dune cache by default
Signed-off-by: Ambre Austen Suhamy <ambre@tarides.com>
- Loading branch information
1 parent
7c423c5
commit 73ad59c
Showing
4 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
let cache_enabled_by_default = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
The dune cache should be enabled by 'default' | ||
(not by default on main branch since it's a feature flag) | ||
$ export DUNE_CACHE=enabled | ||
$ echo "(lang dune 3.16)" > dune-project | ||
|
||
$ cat > dune << EOF | ||
> (library | ||
> (name foo)) | ||
> EOF | ||
|
||
$ cat > foo.ml << EOF | ||
> let f x y = x + y | ||
> EOF | ||
|
||
Set up cache directory | ||
$ export DUNE_CACHE_ROOT=$(pwd)/dune_test_cache | ||
$ mkdir $DUNE_CACHE_ROOT | ||
|
||
$ DUNE_CACHE=disabled dune build | ||
$ ls $DUNE_CACHE_ROOT | ||
We have not written anything to the cache yet. | ||
|
||
Change source files to force a recompilation | ||
$ cat > foo.ml << EOF | ||
> let f x y = x - y | ||
> EOF | ||
|
||
$ dune build | ||
$ ls $DUNE_CACHE_ROOT | ||
files | ||
meta | ||
temp | ||
values | ||
Cache has been written to! |