cedar-policy / cedar

Implementation of the Cedar Policy Language
https://www.cedarpolicy.com
Apache License 2.0
870 stars 79 forks source link

Fuzzy matching on unknown method error message #246

Closed aaronjeline closed 1 week ago

aaronjeline commented 1 year ago

Category

Other

Describe the feature you'd like to request

The function ast::Id::to_meth errors if the underlying Id doesn't name a method. It would be useful to fuzzy match the Id against all the possible methods to provide the user with guesses as to what they may have met

Describe alternatives you've considered

Leave error message as is

Additional context

No response

Is this something that you'd be interested in working on?

andrewmwells-amazon commented 1 year ago

It may be worth considering a more general "add suggestions for typos" to error messages. E.g., the ones mentioned in this comment: https://github.com/cedar-policy/cedar/pull/222#discussion_r1278119832