librasn / rasn

A Safe #[no_std] ASN.1 Codec Framework
Other
212 stars 50 forks source link

Improve error messages of the proc macros? #346

Open shahn opened 2 weeks ago

shahn commented 2 weeks ago

Would you be interested in a PR to more accurately pin point error locations when using the derive macro?

XAMPPRocky commented 2 weeks ago

Thank you for your issue! I've been wanting better error messages for the derive macros since I wrote them so a PR that provides better error messages is definitely welcome! 🙂

shahn commented 2 weeks ago

While working on this, I have split out the proc macro code into another crate, to be able to run benchmarks, fuzzing and tests against it. rasn-derive is just a thing wrapper around that now, converting from proc_macro to the proc_macro2 types and back. I could, after this effort, undo that change, which would give just the better error messages, but not allow for the other improvements, so I would rather make a series of some PRs to incrementally get there. Would that be acceptable?

XAMPPRocky commented 1 week ago

@shahn That would be fine, as long as the code remains in the macros folder.