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

Improve driver experience #1262

Merged
merged 6 commits into from
Dec 13, 2024
Merged

Improve driver experience #1262

merged 6 commits into from
Dec 13, 2024

Conversation

panglesd
Copy link
Collaborator

  • Avoid "hanging state" where computation happen but the user does not know what is going on,
  • Fix wrong computation of the number of executed generation,
  • Only generate JSON output if requested with --generate-json (@jonludlam let me know if you want me to revert this one, but it takes a bit of time when, for users, JSON output is not needed).

@panglesd panglesd added the no changelog This pull request does not need a changelog entry label Dec 13, 2024
@jonludlam
Copy link
Member

I'm quite happy with the json argument.

@@ -205,6 +211,7 @@ let run mode
else []
in
Logs.debug (fun m -> m "XXXX Remaps length: %d" (List.length remaps));
Format.eprintf "Starting the compilation process... \n%!";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this be Logs.info ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point. However, shouldn't this be Logs.app?

Currently, the Info level is a bit too verbose. Eg:

odoc_driver.exe: [INFO] Unable to determine library of archive ocamlmiddleend: Ignoring.
odoc_driver.exe: [INFO] No files for module: Tophooks
odoc_driver.exe: [INFO] Unable to determine library of archive odoc_info: Ignoring.
odoc_driver.exe: [INFO] No files for module: Findlib
odoc_driver.exe: [INFO] No files for module: Findlib_config
odoc_driver.exe: [INFO] No files for module: Fl_args
odoc_driver.exe: [INFO] No files for module: Fl_lint
odoc_driver.exe: [INFO] No files for module: Fl_meta
odoc_driver.exe: [INFO] No files for module: Fl_metascanner
odoc_driver.exe: [INFO] No files for module: Fl_metatoken
odoc_driver.exe: [INFO] No files for module: Fl_package_base
odoc_driver.exe: [INFO] No files for module: Fl_split
odoc_driver.exe: [INFO] No files for module: Fl_topo
odoc_driver.exe: [INFO] No files for module: Ocaml_args
odoc_driver.exe: [INFO] No files for module: Fl_dynload
odoc_driver.exe: [INFO] No files for module: Topfind

will be displayed for any invokation of odoc_driver. I believe this should be fixed in another PR!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, that's Logs.app !

Copy link
Collaborator

@Julow Julow left a comment

Choose a reason for hiding this comment

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

Looks good to me :)

@@ -205,6 +211,7 @@ let run mode
else []
in
Logs.debug (fun m -> m "XXXX Remaps length: %d" (List.length remaps));
Logs.app (fun m -> m "Starting the compilation process... \n%!");
Copy link
Collaborator

Choose a reason for hiding this comment

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

This newline and flush are probably unwanted. Logs does that again.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks!

@panglesd panglesd merged commit 6be8c0a into ocaml:master Dec 13, 2024
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog This pull request does not need a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants