redex icon indicating copy to clipboard operation
redex copied to clipboard

[proguard] Change proguard warnings to TRACE statements

Open danzimm opened this issue 4 years ago • 5 comments

If a user has a proguard file which uses a lot of unimplemented features in redex then there's a lot of stderr spew. This PR changes those stderr logs to TRACE logs so we can hide that output.

Additionally this PR changes the TRACE system to allow a user to specify 0 for a given subsystem. E.g. now one can run redex with TRACE=1;PROGUARD:0 to enable all traces at level 1, but disabling proguard traces. I can put this in another PR, but it seems so small and tangentially relevant to this PR that I put it in here (also I figured 3 PRs is enough for today)

danzimm avatar Jul 28 '20 23:07 danzimm

Hi @danzimm!

Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours needs attention.

You currently have a record in our system, but we do not have a signature on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

facebook-github-bot avatar Jul 28 '20 23:07 facebook-github-bot

Here's proof I signed the CLA:

Screen Shot 2020-07-28 at 7 50 31 PM

Also I fixed the build failures I had & clang-formatd them :D

danzimm avatar Jul 28 '20 23:07 danzimm

IMO this is not the right approach. Hiding "incompatibilities" behind non-default-on flags is usually not intuitive behavior. If we were failing for those, and then could say "re-run with TRACE to see failures" I'd say that makes sense. At least initialize the trace level to 1 so only daredevils will reset it?

agampe avatar Jul 29 '20 06:07 agampe

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

facebook-github-bot avatar Jul 29 '20 06:07 facebook-github-bot

Ahh, that's a good point @agampe ! Thanks for giving this a thoughtful review. I'll go ahead and default the PROGUARD trace to 1 so that by default users see proguard errors (and I can continue to be a daredevil 😎)

danzimm avatar Jul 29 '20 12:07 danzimm