Repository navigation
fix: handle invalid return types when parsing endpoint methods - #967
Merged
Merged
Conversation
vlidholt
approved these changes
May 29, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
The analyzer package was updated with a new type:
InvalidTypethis PR implements support for this when checking the return type of endpoint methods.This PR also changes the behaviour of the parsing somewhat as it will NOT include any methods that does not meet the requirements for endpoint methods. Requirements here meaning the return types are following the required synax, e.g. Must be a Future, Must be a superset of InterfaceType, Must be a Valid type.
A type can be for example be invalid if it was not defined or imported to the endpoint file.
List which issues are fixed by this PR. You must list at least one issue.
#963
Pre-launch Checklist
///), and made sure that the documentation follows the same style as other Serverpod documentation. I checked spelling and grammar.If you need help, consider asking for advice on the discussion board.