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

Make DiagnosticDecorator semi-public #2557

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Matejkob
Copy link
Contributor

The refactored implementation of DiagnosticFormatter, as seen in this pull request, is now closely integrated with DiagnosticDecorator. In order to expose the new initializers and methods of DiagnosticFormatter as public, it's necessary to also make DiagnosticDecorator public.

Given that decorateHighlight is still experimental, I've renamed it to start with an underscore (_) and added a warning to it's documentation to emphasize that this API is not yet intended for production use.

@ahoppen
Copy link
Collaborator

ahoppen commented Mar 21, 2024

What’s your motivation for making the type public? Do you expect clients to provide their own diagnostic formatter?

@Matejkob
Copy link
Contributor Author

Yes, indeed. The original intension was to allow clients to customize diagnostic formatters.

@ahoppen
Copy link
Collaborator

ahoppen commented Apr 22, 2024

Sorry for the delay: Do you have a concrete example of a client that might want to customize the diagnostic formatter? I would prefer to not increase the API surface area unnecessarily

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.

None yet

2 participants