Skip to content
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

irmin-pack: use supplied ppf for integrity check #2229

Merged
merged 1 commit into from Mar 29, 2023

Conversation

metanivek
Copy link
Member

Fix integrity check command to use supplied ppf when printing successful results. Errors are still printed to stderr.

Closes #2211

Fix integrity check command to use supplied ppf when printing successful
results. Errors are still printed to stderr.
@metanivek metanivek requested review from art-w and clecat March 28, 2023 14:58
match Sys.os_type with
| "Unix" | "Cygwin" -> "/dev/null"
| "Win32" -> "NUL"
| _ -> invalid_arg "invalid os type"
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we can use https://ocaml.org/p/ocaml-variants/4.12.0%2Bdomains/doc/Stdlib/Format/index.html#val-make_formatter to define a generic "null" formatter that doesn't depend on the OS?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, yeah I can look into it. This code is just copy-pasta of what already existed. 😅

Copy link
Contributor

Choose a reason for hiding this comment

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

haha yeah I saw that but it still looks icky :P

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe using Logs directly could be what you want ? (and use the associated cli to determine where to print)

Copy link
Member Author

Choose a reason for hiding this comment

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

Since this isn't the goal of this current PR, I opened an issue for future enhancement. #2231

@metanivek metanivek merged commit eb98725 into mirage:main Mar 29, 2023
2 of 4 checks passed
@metanivek metanivek deleted the integrity_check_use_ppf branch March 29, 2023 18:26
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.

irmin-pack: integrity check doesn't use ppf for results handling
3 participants