aspect-build / aspect-cli

correct, fast, usable: choose three
https://aspect.build/cli
Apache License 2.0
87 stars 19 forks source link

Query: Validate incoming labels before passing them to query #126

Open JesseTatasciore opened 2 years ago

JesseTatasciore commented 2 years ago

After prompting the user for a label, we should do some validation on it. If they typed it wrong (typo, colon in the wrong place, etc) we could help them out by suggesting a label with a minimal edit distance from what they typed.

✔ why: Determine why targetA depends on targetB
Value for 'targetA': 
Value for 'targetB': 
ERROR: Error while parsing 'somepath(, )': syntax error at ', )'

It is not super helpful to give the error from query evaluation when we already knew something was wrong.

alexeagle commented 2 years ago

Should be part of #160