Skip to content

Add Action remove_residuals#108

Merged
xhtmlboi merged 9 commits intomainfrom
attempt-to-erase-files
Nov 27, 2025
Merged

Add Action remove_residuals#108
xhtmlboi merged 9 commits intomainfrom
attempt-to-erase-files

Conversation

@xvw
Copy link
Copy Markdown
Collaborator

@xvw xvw commented Nov 26, 2025

This patch proposes tracking artifacts created by YOCaml to enable the implementation of a new action: Action.remove_residuals, which allows files that were not created by YOCaml to be deleted.

This should fix #55 and simplify Kane's development.

(cc @reynir)

@xvw xvw requested review from dinosaure, gr-im and xhtmlboi November 26, 2025 17:55
@reynir
Copy link
Copy Markdown
Contributor

reynir commented Nov 26, 2025

Cool! I looked at some of the changes in lib/core/ and it looks good. Not a proper review, but I think it looks promising and is exactly what I want in #55!

Copy link
Copy Markdown
Owner

@xhtmlboi xhtmlboi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!
I am strongly in favor of merging this soon as possible :)

let* () = Eff.write_file ~on path sexp_str in
Eff.log ~src:Eff.yocaml_log_src ~level:`Debug @@ Lexicon.cache_stored path

let remove_residuals ?(on = `Target) ~target cache =
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it make sense to check residuals on other thing than Target?

[INFO]./residuals_build/5.txt deleted!
[DEBUG]Cache stored in `./residuals_build/cache`

$ ls residuals_build
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you, in the test, re-run the generation?

@xhtmlboi xhtmlboi merged commit 83f0dda into main Nov 27, 2025
5 checks passed
@xhtmlboi xhtmlboi deleted the attempt-to-erase-files branch November 27, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Yocaml_git never removes files

3 participants