File tree 3 files changed +30
-0
lines changed
test/blackbox-tests/test-cases/symlink-targets.t
3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,9 @@ Unreleased
111
111
Previously, Dune would have re-executed the action again at the last
112
112
line. Now it remembers the result of the first execution.
113
113
114
+ - Fix a bug where dune would always re-run all actions that produce symlinks,
115
+ even if their dependencies did not change. (#4405 , @aalekseyev )
116
+
114
117
2.8.2 (21/01/2021)
115
118
------------------
116
119
Original file line number Diff line number Diff line change @@ -130,6 +130,11 @@ let refresh_and_chmod fn =
130
130
if Cache. cachable stats.st_kind then
131
131
Path. chmod ~stats: (Some stats) ~mode: 0o222 ~op: `Remove fn
132
132
in
133
+ let stats =
134
+ match stats.st_kind with
135
+ | S_LNK -> Path. stat fn
136
+ | _ -> stats
137
+ in
133
138
refresh_ stats fn
134
139
135
140
let peek_file fn =
Original file line number Diff line number Diff line change
1
+ Test demonstrating the handling of actions that produce symlinks.
2
+
3
+ $ echo " (lang dune 2.8)" > dune-project
4
+ $ cat > dune << EOF
5
+ > (rule (targets b) (deps a) (action (bash " ln -s a b" )))
6
+ > EOF
7
+ $ echo a > a
8
+ $ dune build ./b --display =short
9
+ bash b
10
+ $ readlink _build /default /b
11
+ a
12
+ $ cat _build /default /b
13
+ a
14
+
15
+ $ dune build ./b --display =short
16
+
17
+
18
+ $ echo a-v2 > a
19
+ $ dune build ./b --display =short
20
+ bash b
21
+ $ cat _build /default /b
22
+ a-v2
You can’t perform that action at this time.
0 commit comments