Improve the diagnostic message emitted on failure to parse metadata.json #1000
Unanswered
jcbollinger
asked this question in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Use Case
If a syntax error is introduced into a module's
metadata.json
file then subsequent use of PDK on that module fails with a misleading and unhelpful error message:Describe the Solution You Would Like
In the event that PDK fails to parse
metadata.json
, it should diagnose that issue specifically, with as much context as possible. For example, something more like "Syntax error in metadata.json, line 8, column 17".Describe Alternatives You've Considered
The main alternative is to leave the diagnostic messaging as it now is. Although it could be argued that the current messaging is technically correct, it does not help users identify or fix the problem.
Additional Context
PDK does not currently offer tools for maintaining
metadata.json
, so it is normal for that file to be edited by hand from time to time even in PDK-compatible modules. It is natural that editing such files by hand occasionally introduces syntax errors, so it is to be expected that this issue will manifest relatively frequently for a wide variety of module maintainers. I know it happened to me several times before I was sufficiently motivated to write this feature request.Beta Was this translation helpful? Give feedback.
All reactions