-
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
fix(engine): remove old target even if it is a dir #9327
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
I see we handle the case when a directory is changed to a file, what about when a file is changed to a directory? |
Because we use |
I extracted a function and amended the test to cover that behavior. |
8bc5a44
to
ef89dbf
Compare
ping @snowleopard - I renamed the functions as requested, I think this is ready to go but let me know if you need to test this. |
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.
Thanks, looks good!
cc @rleshchinskiy who recently implemented something similar internally (I believe he simply called |
Fixes ocaml#6575 Signed-off-by: Etienne Millon <me@emillon.org>
Signed-off-by: Etienne Millon <me@emillon.org>
Signed-off-by: Etienne Millon <me@emillon.org>
Signed-off-by: Etienne Millon <me@emillon.org>
Signed-off-by: Etienne Millon <me@emillon.org>
Signed-off-by: Etienne Millon <me@emillon.org>
Signed-off-by: Etienne Millon <me@emillon.org>
Signed-off-by: Etienne Millon <me@emillon.org>
Signed-off-by: Etienne Millon <me@emillon.org>
Signed-off-by: Etienne Millon <me@emillon.org>
Signed-off-by: Etienne Millon <me@emillon.org>
Signed-off-by: Etienne Millon <me@emillon.org>
thanks. I pushed a change in order not to log if the file does not exist (which is what was breaking the coq test) |
* fix(engine): remove old target even if it is a dir Fixes ocaml#6575 Signed-off-by: Etienne Millon <me@emillon.org> * Add changelog entry Signed-off-by: Etienne Millon <me@emillon.org> * Ignore EPERM on darwin Signed-off-by: Etienne Millon <me@emillon.org> * Extract Fpath.unlink_status Signed-off-by: Etienne Millon <me@emillon.org> * Change file to directory Signed-off-by: Etienne Millon <me@emillon.org> * Keep exceptions Signed-off-by: Etienne Millon <me@emillon.org> * Use a single constructor for exn Signed-off-by: Etienne Millon <me@emillon.org> * Log error Signed-off-by: Etienne Millon <me@emillon.org> * rename Fpath.unlink to Fpath.unlink_exn Signed-off-by: Etienne Millon <me@emillon.org> * rename Path.unlink to Path.unlink_exn Signed-off-by: Etienne Millon <me@emillon.org> * rename Fpath.unlink_status to Fpath.unlink Signed-off-by: Etienne Millon <me@emillon.org> * rename Path.unlink_status to Path.unlink Signed-off-by: Etienne Millon <me@emillon.org> * do not log error if file does not exist Signed-off-by: Etienne Millon <me@emillon.org> --------- Signed-off-by: Etienne Millon <me@emillon.org>
* fix(engine): remove old target even if it is a dir Fixes #6575 * Add changelog entry * Ignore EPERM on darwin * Extract Fpath.unlink_status * Change file to directory * Keep exceptions * Use a single constructor for exn * Log error * rename Fpath.unlink to Fpath.unlink_exn * rename Path.unlink to Path.unlink_exn * rename Fpath.unlink_status to Fpath.unlink * rename Path.unlink_status to Path.unlink * do not log error if file does not exist --------- Signed-off-by: Etienne Millon <me@emillon.org> Co-authored-by: Etienne Millon <me@emillon.org>
CHANGES: ### Fixed - When a directory is changed to a file, correctly remove it in subsequent `dune build` runs. (ocaml/dune#9327, fix ocaml/dune#6575, @emillon) - Fix a problem with the doc-new target where transitive dependencies were missed during compile. This leads to missing expansions in the output docs. (ocaml/dune#9955, @jonludlam) - coq: fix performance regression in coqdep unescaping (ocaml/dune#10115, fixes ocaml/dune#10088, @ejgallego, thanks to Dan Christensen for the report) - coq: memoize coqdep parsing, this will reduce build times for Coq users, in particular for those with many .v files (ocaml/dune#10116, @ejgallego, see also ocaml/dune#10088) - on Windows, use an unicode-aware version of `CreateProcess` to avoid crashes when paths contains non-ascii characters. (ocaml/dune#10212, fixes ocaml/dune#10180, @emillon)
Fixes #6575