prettierd icon indicating copy to clipboard operation
prettierd copied to clipboard

Errors should be written to stderr not stdout

Open barrett-ruth opened this issue 2 years ago • 11 comments

Write errors to stdout. prettier does the same.

image

barrett-ruth avatar Sep 13 '23 02:09 barrett-ruth

It looks like core_d doesn't support this currently (see https://github.com/mantoni/core_d.js/issues/19). It makes sense though. I'll try to find some time to send a PR to core_d.

fsouza avatar Sep 22 '23 04:09 fsouza

@fsouza is there a reason this behavior is still occuring? image

Do I need a new release of prettierd?

barrett-ruth avatar Oct 15 '23 21:10 barrett-ruth

Do I need a new release of prettierd?

Hmm interesting, that release should include the updated core_d, I wonder where the issue is. I'll check what's up.

fsouza avatar Oct 20 '23 16:10 fsouza

@fsouza have you figured out whats going on here? is there anything anyone can help with?

jeffshaver avatar Nov 08 '23 14:11 jeffshaver

I haven't had a chance to look into it yet. My plan was to try to repro and trace down whether some errors are being written via the wrong function in core_d or something like that.

fsouza avatar Nov 08 '23 15:11 fsouza

I just took a look into this, it's actually a bit trickier to fix, as with core_d you only know whether something failed or not at the end of the stream. We'd need to support the concept of stream when reading data from the socket. I started an issue in core_d where we can discuss it: https://github.com/mantoni/core_d.js/issues/28

fsouza avatar Nov 10 '23 03:11 fsouza

@fsouza in the linked core_d issue (https://github.com/mantoni/core_d.js/issues/28), the maintainer replied. does the stuff in 6.1.0 solve the issue and prettierd just needs to upgrade core_d again?

jeffshaver avatar Nov 30 '23 13:11 jeffshaver

@jeffshaver that will help debugging, but won't stop errors from being sent to the editor. I'll push a new release of prettierd with that feature though.

fsouza avatar Dec 05 '23 15:12 fsouza

0.25.3 - it's still actual. :disappointed:

And one more issue: it's impossible to switch off colors. This breaks other things: https://github.com/stevearc/conform.nvim/issues/486 изображение

powerman avatar Jul 03 '24 01:07 powerman

Let's see if we can get this resolved. Is there any way I can help @fsouza ?

barrett-ruth avatar Jul 03 '24 01:07 barrett-ruth

Any updates?

igor-ribeiro avatar Oct 23 '24 14:10 igor-ribeiro