I haven't posted anything about Rome in a while so here is what I worked on this evening. These are more error messages. It's obviously not all I'm working on but it's the easiest thing to tweet and discuss.
-
-
What does that actually mean? Actually pointing to the specific range and location of invalid input rather than "there is an error in here somewhere".
Show this thread -
Rome ingests package.json files and performs some normalization and validation. One of the fields is name. When you use a package.json name in npm or yarn that is invalid, it will just yell at you. Rome points to the exact location with some possible hints. Examples:
Show this thread -
-
-
These errors aren't generated until after either. The validation logic actually does some rough "autofixing". It would be possible to have a flag that suppresses the errors and writes the normalized fixed version to disk. Super nuanced and hard UX though to implement.
Show this thread
End of conversation
New conversation -
-
-
So if name is "hey/ho/Lets/go", it first errors on first /, I prepend @ then it errors on second /, I remove it then it errors on L, ... then on last /, ... etc. Wouldn't it be better if it returned "void | Array<[n, n]>" so I could see all the errors at once?
-
Yeah it would be better. My tweet was a simplification and Rome does produce as many errors as possible instead of bailing on the first.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 