-
Notifications
You must be signed in to change notification settings - Fork 102
Set compiler's error-style and color through env vars in standalone mode #83
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
Conversation
e70e1e7 to
ed0e70e
Compare
|
I realized as I was writing the PR text that this won't work as is since the compiler lib from older compilers don't expose those flags. |
|
From a quick look it seems like updating |
Signed-off-by: Nathan Rebours <[email protected]>
ed0e70e to
9dff466
Compare
|
Agreed |
ghost
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
|
Cool, let's merge! Should we cut a |
|
Seems good to me! Are you happy to take care of it? :) |
CHANGES: ### Fixed - Report errors according to the value of `OCAML_ERROR_STYLE` and `OCAML_COLOR` in the standalone driver (ocaml-ppx/ppxlib#83, @NathanReb)
CHANGES: - Report errors according to the value of `OCAML_ERROR_STYLE` and `OCAML_COLOR` in the standalone driver (ocaml-ppx/ppxlib#83, @NathanReb)
CHANGES: - Do not produce a suprious empty correction when deriving_inline expands into an extension that undergoes further expansion (ocaml-ppx/ppxlib#86, @aalekseyev) - Add `Ppxlib.Quoter`. This module allows to generate hygienic code fragments in the spirit of ppx_deriving. (ocaml-ppx/ppxlib#92, @rgrinberg) - Allow for registering derivers on module type declarations. (ocaml-ppx/ppxlib#94, fix ocaml-ppx/ppxlib#83, @rgrinberg) - Fix parsing long idenitifiers. (ocaml-ppx/ppxlib#98, @NathanReb)
CHANGES: - Do not produce a suprious empty correction when deriving_inline expands into an extension that undergoes further expansion (ocaml-ppx/ppxlib#86, @aalekseyev) - Add `Ppxlib.Quoter`. This module allows to generate hygienic code fragments in the spirit of ppx_deriving. (ocaml-ppx/ppxlib#92, @rgrinberg) - Allow for registering derivers on module type declarations. (ocaml-ppx/ppxlib#94, fix ocaml-ppx/ppxlib#83, @rgrinberg) - Fix parsing long idenitifiers. (ocaml-ppx/ppxlib#98, @NathanReb)
OCaml 4.08 introduced to new flags allowing users to configure the error reporting style and use of colors.
Those can also be set via the env variables
OCAML_COLORandOCAML_ERROR_STYLE.When using a standalone
ppxlibdriver, the appropriate flags weren't set according to those env variables and therefore the error reporting wasn't impacted.A nice follow up could be to re-expose the command line flags from the standalone driver as well.