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

feat: JVM can make local verb calls via generated clients #3299

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tomdaffurn
Copy link
Contributor

No description provided.

@tomdaffurn tomdaffurn requested review from a team and alecthomas as code owners November 1, 2024 05:09
@tomdaffurn tomdaffurn requested review from stuartwdouglas and removed request for a team November 1, 2024 05:09
This was referenced Nov 1, 2024
@@ -905,6 +905,10 @@ func (e *Engine) buildWithCallback(ctx context.Context, callback buildCallback,
return err
}
}
err = WriteGenericSchemaFiles(newSchemas, metasMap)
Copy link
Collaborator

Choose a reason for hiding this comment

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

So this approach will write out the generated schema after the build, which then results in clients being generated?

Won't this also generate new copies of things like Data classes that will then be duplicated?

I guess with this approach you have to check the schema in, as projects won't be buildable otherwise.

Copy link
Contributor Author

@tomdaffurn tomdaffurn Nov 3, 2024

Choose a reason for hiding this comment

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

This doesn't change the approach much. Previously it wrote schema files inside the generate stubs function on line 903. Stubs are only written for modules not in the last topology group. ie modules that have dependant modules.

Now it does the same but outside the if statement, for every group in the topology.

Yes, it does generate duplicated data classes, so when using the verb client you need to use the ftl.module.DataClass package instead of your own. That's a bit sucky.

Maybe we can change the codegen to special case local verb clients...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants