Skip to content

Conversation

@NathanReb
Copy link
Collaborator

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_COLOR and OCAML_ERROR_STYLE.

When using a standalone ppxlib driver, 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.

@NathanReb NathanReb requested review from a user and xclerc July 17, 2019 15:39
@NathanReb NathanReb force-pushed the set-error-style-standalone branch from e70e1e7 to ed0e70e Compare July 17, 2019 15:39
@NathanReb
Copy link
Collaborator Author

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.

@NathanReb
Copy link
Collaborator Author

NathanReb commented Jul 17, 2019

From a quick look it seems like updating src/gen-compiler_specifics is the way to go here.

@NathanReb NathanReb force-pushed the set-error-style-standalone branch from ed0e70e to 9dff466 Compare July 17, 2019 16:09
@ghost
Copy link

ghost commented Jul 18, 2019

Agreed

Copy link

@ghost ghost 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!

@NathanReb
Copy link
Collaborator Author

NathanReb commented Jul 18, 2019

Cool, let's merge! Should we cut a 0.8.1 release?

@NathanReb NathanReb merged commit 303d481 into master Jul 18, 2019
@ghost
Copy link

ghost commented Jul 18, 2019

Seems good to me! Are you happy to take care of it? :)

NathanReb added a commit to NathanReb/opam-repository that referenced this pull request Jul 18, 2019
CHANGES:

### Fixed

- Report errors according to the value of `OCAML_ERROR_STYLE` and
  `OCAML_COLOR` in the standalone driver (ocaml-ppx/ppxlib#83, @NathanReb)
NathanReb added a commit to NathanReb/opam-repository that referenced this pull request Jul 19, 2019
CHANGES:

- Report errors according to the value of `OCAML_ERROR_STYLE` and
  `OCAML_COLOR` in the standalone driver (ocaml-ppx/ppxlib#83, @NathanReb)
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Nov 21, 2019
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)
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Nov 28, 2019
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)
@NathanReb NathanReb deleted the set-error-style-standalone branch February 12, 2021 11:34
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.

2 participants