ariadne icon indicating copy to clipboard operation
ariadne copied to clipboard

Multiple messages/notes

Open eaglgenes101 opened this issue 2 years ago • 5 comments

In codespan-reporting crate, it is possible to attach multiple notes to a diagnostic message. In ariadne, there is only one message and only one note available to provide, limiting the diagnostic messages that I can create with an Ariadne report. It'd be a nice feature if I could associate multiple formatted messages or notes to any given Ariadne report.

eaglgenes101 avatar Aug 07 '21 00:08 eaglgenes101

How do you imagine these being displayed in the diagnostic? Just a list of notes below the diagnostic like below?

    | Note: This is a note
    | Note: This is another note
    | Note: This is the third note

zesterer avatar Aug 07 '21 11:08 zesterer

Yeah, probably.

eaglgenes101 avatar Aug 07 '21 14:08 eaglgenes101

Unfortunately I'm away for the next 10 days, but I can implement this when I get back.

zesterer avatar Aug 13 '21 17:08 zesterer

I am currently trying to use ariadne, where I have a specific usecase where this would be very helpful.

What is the current status? Is there anything I can do to help with this?

indietyp avatar Jun 27 '23 20:06 indietyp

If you're interested in implementing this, it wouldn't be too difficult! The crux of it would be to switch this Option to a Vec and then turn its usage location in write.rs from an if let into a for _ in. Whatever you build on top of that is up to you of course :)

zesterer avatar Jun 27 '23 23:06 zesterer