Skip to content

Commit 702af10

Browse files
committed
Use Sys.opaque_identity in build-info to prevent excessive no-changes rebuild in release profile
1 parent 4812b07 commit 702af10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/build-info/dune

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
(target configVersion.ml)
1616
(mode (promote (until-clean) (only configVersion.ml))) ; replace existing file in source tree, even if releasing (only overrides)
1717
(deps (universe)) ; do not cache, always regenerate
18-
(action (pipe-stdout (bash "git describe --all --long --dirty || echo \"n/a\"") (with-stdout-to %{target} (bash "xargs printf '(* Automatically regenerated, changes do not persist! *)\nlet version = \"%s\"'")))))
18+
(action (pipe-stdout (bash "git describe --all --long --dirty || echo \"n/a\"") (with-stdout-to %{target} (bash "xargs printf '(* Automatically regenerated, changes do not persist! *)\nlet version = Sys.opaque_identity \"%s\"'")))))
1919

2020
(rule
2121
(target configProfile.ml)
@@ -31,7 +31,7 @@
3131
(target configDatetime.ml)
3232
(mode (promote (until-clean) (only configDatetime.ml))) ; replace existing file in source tree, even if releasing (only overrides)
3333
(deps (universe)) ; do not cache, always regenerate
34-
(action (pipe-stdout (bash "date +\"%Y-%m-%dT%H:%M:%S\" || echo \"n/a\"") (with-stdout-to %{target} (bash "xargs printf '(* Automatically regenerated, changes do not persist! *)\nlet datetime = \"%s\"'")))))
34+
(action (pipe-stdout (bash "date +\"%Y-%m-%dT%H:%M:%S\" || echo \"n/a\"") (with-stdout-to %{target} (bash "xargs printf '(* Automatically regenerated, changes do not persist! *)\nlet datetime = Sys.opaque_identity \"%s\"'")))))
3535

3636
(env
3737
(_

0 commit comments

Comments
 (0)