Skip to content
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 sure methods annotated with @Funq are declared as public #27670

Merged

Conversation

michalvavrik
Copy link
Contributor

fixes: #27669

Throw an exception and break the build when non-public methods are annotated with @Funq as only public methods are registered as functions. This will give developer the information he made mistake during the build as there is no good reason to declare methods with @Funq and don't use them as Funq functions.

@matejvasek
Copy link
Contributor

looks good to me
/cc @patriot1burke

@quarkus-bot

This comment has been minimized.

@michalvavrik michalvavrik force-pushed the feature/funq-validate-methods-are-public branch from c2d06b8 to 582e1ea Compare September 1, 2022 17:11
@matejvasek
Copy link
Contributor

one nit: missing test

@michalvavrik
Copy link
Contributor Author

sure, I'll add the test.

@michalvavrik michalvavrik force-pushed the feature/funq-validate-methods-are-public branch from 582e1ea to 41a61a8 Compare September 1, 2022 18:17
@michalvavrik
Copy link
Contributor Author

Here you go.

Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

@michalvavrik michalvavrik force-pushed the feature/funq-validate-methods-are-public branch from 41a61a8 to b992535 Compare September 4, 2022 22:22
@michalvavrik
Copy link
Contributor Author

Rebased onto current main as other PR changed pom.xml.

@quarkus-bot

This comment has been minimized.

@geoand
Copy link
Contributor

geoand commented Sep 5, 2022

In light of the test failures, are we sure that @Funq can't be placed on package private methods?

@michalvavrik
Copy link
Contributor Author

Only test that's failing is the one I added on Friday here #27674. It tests exactly what it should, but I keep forgetting to declare methods public. It's my fault, but validation is good thing. I'll fix in a minute.

@michalvavrik michalvavrik force-pushed the feature/funq-validate-methods-are-public branch from b992535 to 51cffe3 Compare September 5, 2022 07:46
@geoand geoand merged commit 86afc9c into quarkusio:main Sep 8, 2022
@quarkus-bot quarkus-bot bot added this to the 2.13 - main milestone Sep 8, 2022
@michalvavrik michalvavrik deleted the feature/funq-validate-methods-are-public branch September 8, 2022 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@Funq over non-public methods are ignored but information is not logged/no ex/nothing in docs
3 participants