Skip to content

chore: serveral compile validations improvements - #1176

Merged
aludwiko merged 7 commits into
mainfrom
octonato/minor-validation-cleanup
Dec 3, 2025
Merged

aludwiko merged 7 commits into
mainfrom
octonato/minor-validation-cleanup

Conversation

@octonato

Copy link
Copy Markdown
Contributor

No description provided.

@Component(id = "consumer-with-function-tool")
@Consume.FromTopic("my-topic")
public class ConsumerWithFunctionToolOnPrivateMethod extends Consumer {
public class ConsumerWithFunctionTool extends Consumer {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We had a rule blocking the usage of @FunctionTool in Consumer's private methods, but instead we should block it on all kind of methods. A consumer should only be called from the projection running it, never from an agent.

@octonato

Copy link
Copy Markdown
Contributor Author

There was another comment about checking Effect< here.

It seems that this is need in some cases related with usage of inner classes, but I need to look into that in detail.

I will send a follow up PR with more clean-ups.

Comment on lines -113 to -114
if (returnTypeName.equals(effectTypeName)
|| returnTypeName.startsWith(effectTypeName + "<")) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It turns out that the reason why we "needed" to check on '<' was because the first check was using equals. It was late yesterday when I tried to clean this up and I didn't notice it.

@octonato
octonato force-pushed the octonato/minor-validation-cleanup branch from e33f111 to 692680c Compare November 21, 2025 17:08
@octonato octonato changed the title chore: remove unnecessary validations chore: serveral compile validations improvements Nov 21, 2025

@aludwiko aludwiko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@aludwiko
aludwiko merged commit f2e28e5 into main Dec 3, 2025
1 check passed
@aludwiko
aludwiko deleted the octonato/minor-validation-cleanup branch December 3, 2025 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants