Skip to content

doc.d: use errorSink #15471

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

Merged
merged 1 commit into from
Jul 29, 2023
Merged

doc.d: use errorSink #15471

merged 1 commit into from
Jul 29, 2023

Conversation

WalterBright
Copy link
Member

To make dmd an LSP, messages to stderr will have to be abstracted away. This does it for doc.d.

This required adding warningSupplemental.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#15471"

@@ -5180,10 +5181,10 @@ private void highlightCode3(Scope* sc, ref OutBuffer buf, const(char)* p, const(
*/
private void highlightCode2(Scope* sc, Dsymbols* a, ref OutBuffer buf, size_t offset)
{
uint errorsave = global.startGagging();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, gagging is an ugly kludge. ErrorSink is a solid solution.

@WalterBright WalterBright merged commit a2957d3 into dlang:master Jul 29, 2023
@WalterBright WalterBright deleted the docSink branch July 29, 2023 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants