-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ftl call suggests verbs if no match found #1516
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea, just a few changes 🙇
Co-authored-by: Alec Thomas <[email protected]>
bcdcc9c
to
7d3333d
Compare
awesome thank you @mihai-chiorean !! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one, the NotFound is great, thanks.
backend/schema/schema.go
Outdated
@@ -90,7 +93,8 @@ func (s *Schema) ResolveRefToType(ref *Ref, out Decl) error { | |||
} | |||
} | |||
} | |||
return fmt.Errorf("could not resolve reference %v", ref) | |||
|
|||
return errors.Join(ErrNotFound, fmt.Errorf("could not resolve reference %v", ref)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, but can you add this to the other Resolve*
methods, and add a comment to each, and the error, mentioning that this is returned when the reference cannot be found?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ResolveRefMonomorphised
is the only one that seems relevant because it calls this. I updated it.
Co-authored-by: Alec Thomas <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
https://hackmd.io/@ftl/By2EEAXmR