-
Notifications
You must be signed in to change notification settings - Fork 56
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
Make it easier to debug an empty @Endpoint class #330
Comments
This is based on direct user feedback. Ppl do not immediately realise that non-public endpoint methods are not exposed to TypeScript. Related: https://github.com/vaadin/flow/issues/7681
This is based on direct user feedback. Ppl do not immediately realise that non-public endpoint methods are not exposed to TypeScript. Related: https://github.com/vaadin/flow/issues/7681
This is based on direct user feedback. People do not immediately realize that non-public endpoint methods are not exposed to TypeScript. Related: https://github.com/vaadin/flow/issues/7681 + add _Javadoc_ and _performant_ into the list of valid terms for Vale
Hi, just a comment regarding this. It happened to me twice that I had to waste time investigating why the endpoint was not being generated because there were no logs and no ts file generated without methods. I think that just stress that endpoint methods should be public in the documentation is not enough (probably that is why this issue is still opened). IMHO, adding a warning in the logs that no public methods where found while scanning an @endpoint annotated class would be enough, given that it would make no sense to have it like that. |
It has occasionally happened that some users have noticed log messages, but I wouldn't count on it. Since there isn't really any reason to have an annotated class without public methods, it could just as well throw an error. |
Throwing an error seems good in this case. |
If you e.g. forget to mark your endpoint method as
public
, then there will not be any generated .ts file for your@Endpoint
class. This may lead you towards investigating whether the file is detected at all or whether the whole code generation is somehow not working.If there would instead be an empty generated .ts file, then it would be easier to pinpoint the source of the problem. It would be even better if the generated file would contain a comment that points out that there aren't any public methods in the Java class.
Another alternative would be that the generator fails with a clear error in this kind of situation.
The text was updated successfully, but these errors were encountered: