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

Suppress non-warning and non-error compiler output #147

Closed
someplaceguy opened this issue Nov 11, 2023 · 2 comments
Closed

Suppress non-warning and non-error compiler output #147

someplaceguy opened this issue Nov 11, 2023 · 2 comments
Labels

Comments

@someplaceguy
Copy link

someplaceguy commented Nov 11, 2023

It would be nice if there was a flag to suppress the compiler output (that is not a warning or an error).

As an example, while compiling one of my programs I see this output:

$ mlkit -o check_mlkit check.mlb
[reading source file:   nondebug.sml]
[wrote X64 code file:   MLB/RI_GC/nondebug.sml.s]
[reading source file:   util.sml]
[wrote X64 code file:   MLB/RI_GC/util.sml.s]
[reading source file:   map.sml]
[reading source file:   set.sml]
[reading source file:   fst.sml]
[reading source file:   check.sml]
[compiling body of functor MakeFst (from source check.mlb->fst.sml) begin]
[compiling body of functor ListSet (from source check.mlb->set.sml) begin]
[wrote X64 code file:   MLB/RI_GC/check.sml.code2.s]
[compiling body of functor ListSet end]
[compiling body of functor ListSet (from source check.mlb->set.sml) begin]
[wrote X64 code file:   MLB/RI_GC/check.sml.code4.s]
[compiling body of functor ListSet end]
[compiling body of functor ListSet (from source check.mlb->set.sml) begin]
[wrote X64 code file:   MLB/RI_GC/check.sml.code6.s]
[compiling body of functor ListSet end]
[wrote X64 code file:   MLB/RI_GC/check.sml.code3.s]
[wrote X64 code file:   MLB/RI_GC/check.sml.code5.s]
[wrote X64 code file:   MLB/RI_GC/check.sml.code7.s]
[compiling body of functor MakeFst end]
[wrote X64 code file:   MLB/RI_GC/check.sml.code1.s]
[wrote X64 code file:   MLB/RI_GC/check.sml.s]
[reading source file:   main.sml]
[wrote X64 code file:   MLB/RI_GC/main.sml.s]
[wrote X64 code file:   MLB/RI_GC/base-link_objects.s]
[wrote executable file: check_mlkit]

This quickly becomes noise when compiling several of such programs and it becomes hard to see actual warnings and errors (e.g. when these messages are intermixed with messages from other compilers being used in parallel).

Ideally, I would like to run something like mlkit -quiet -o check_mlkit check.mlb and MLKit would not output anything that isn't a warning or an error.

@melsman
Copy link
Owner

melsman commented Nov 11, 2023

In the master branch there is now the possibility of suppressing messages by passing the -no_messages flag...

@someplaceguy
Copy link
Author

someplaceguy commented Nov 11, 2023

@melsman Thanks for the quick reply!

It's great that such an option already exists in master! Unfortunately, it does not suppress all non-warning / non-error messages yet:

$ mlkit -no_messages -o build/gen_input_mlkit gen_input.mlb
[reading source file:   nondebug.sml]
[reading source file:   util.sml]
[reading source file:   gen_input.sml]
[reading source file:   main.sml]
(...)

Would it be possible to also suppress these messages?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants