-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-execute actions when a target is modified #1343
Conversation
List.partition_map targets ~f:(fun fn -> | ||
match Utils.Cached_digest.refresh fn with | ||
| digest -> Left digest | ||
| exception (Unix.Unix_error _ | Sys_error _) -> Right fn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be nice to make refresh
and file
to return a Result
type. I see that we're handling this exception in two cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it improves things much given that in these cases as we just ignore the exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what it improves is not having to remember to catch 2 exceptions. But I won't press this.
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
Fixes #1342 Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
CHANGES: - Do not fail if the output of `ocamlc -config` doesn't include `standard_runtime` (ocaml/dune#1326, @diml) - Let `Configurator.V1.C_define.import` handle negative integers (ocaml/dune#1334, @Chris00) - Re-execute actions when a target is modified by the user inside `_build` (ocaml/dune#1343, fix ocaml/dune#1342, @diml) - Pass `--set-switch` to opam (ocaml/dune#1341, fix ocaml/dune#1337, @diml) - Fix bad interaction between multi-directory libraries the `menhir` stanza (ocaml/dune#1373, fix ocaml/dune#1372, @diml) - Integration with automatic formatters (ocaml/dune#1252, fix ocaml/dune#1201, @emillon) - Better error message when using `(self_build_stubs_archive ...)` and `(c_names ...)` or `(cxx_names ...)` simultaneously. (ocaml/dune#1375, fix ocaml/dune#1306, @nojb) - Improve name detection for packages when the prefix isn't an actual package (ocaml/dune#1361, fix ocaml/dune#1360, @rgrinberg) - Support for new menhir rules (ocaml/dune#863, fix ocaml/dune#305, @fpottier, @rgrinberg) - Do not remove flags when compiling compatibility modules for wrapped mode (ocaml/dune#1382, fix ocaml/dune#1364, @rgrinberg) - Fix reason support when using `staged_pps` (ocaml/dune#1384, @charlesetc) - Add support for `enabled_if` in `rule`, `menhir`, `ocamllex`, `ocamlyacc` (ocaml/dune#1387, @diml) - Exit gracefully when a signal is received (ocaml/dune#1366, @diml) - Load all defined libraries recursively into utop (ocaml/dune#1384, fix ocaml/dune#1344, @rgrinberg) - Allow to use libraries `bytes`, `result` and `uchar` without `findlib` installed (ocaml/dune#1391, @nojb)
CHANGES: - Do not fail if the output of `ocamlc -config` doesn't include `standard_runtime` (ocaml/dune#1326, @diml) - Let `Configurator.V1.C_define.import` handle negative integers (ocaml/dune#1334, @Chris00) - Re-execute actions when a target is modified by the user inside `_build` (ocaml/dune#1343, fix ocaml/dune#1342, @diml) - Pass `--set-switch` to opam (ocaml/dune#1341, fix ocaml/dune#1337, @diml) - Fix bad interaction between multi-directory libraries the `menhir` stanza (ocaml/dune#1373, fix ocaml/dune#1372, @diml) - Integration with automatic formatters (ocaml/dune#1252, fix ocaml/dune#1201, @emillon) - Better error message when using `(self_build_stubs_archive ...)` and `(c_names ...)` or `(cxx_names ...)` simultaneously. (ocaml/dune#1375, fix ocaml/dune#1306, @nojb) - Improve name detection for packages when the prefix isn't an actual package (ocaml/dune#1361, fix ocaml/dune#1360, @rgrinberg) - Support for new menhir rules (ocaml/dune#863, fix ocaml/dune#305, @fpottier, @rgrinberg) - Do not remove flags when compiling compatibility modules for wrapped mode (ocaml/dune#1382, fix ocaml/dune#1364, @rgrinberg) - Fix reason support when using `staged_pps` (ocaml/dune#1384, @charlesetc) - Add support for `enabled_if` in `rule`, `menhir`, `ocamllex`, `ocamlyacc` (ocaml/dune#1387, @diml) - Exit gracefully when a signal is received (ocaml/dune#1366, @diml) - Load all defined libraries recursively into utop (ocaml/dune#1384, fix ocaml/dune#1344, @rgrinberg) - Allow to use libraries `bytes`, `result` and `uchar` without `findlib` installed (ocaml/dune#1391, @nojb) - Take argument to self_build_stubs_archive into account. (ocaml/dune#1395, @nojb) - Fix bad interaction between `env` customization and vendored projects: when a vendored project didn't have its own `env` stanza, the `env` stanza from the enclosing project was in effect (ocaml/dune#1408, @diml) - Fix stop early bug when scanning for watermarks (ocaml/dune#1423, @diml)
Fix #1342
As a bonus, it improves the behaviour when an action incorrectly modifies one of its dependency.