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

JVM Plugin does not maintain generated stubs well #4049

Closed
matt2e opened this issue Jan 15, 2025 · 2 comments
Closed

JVM Plugin does not maintain generated stubs well #4049

matt2e opened this issue Jan 15, 2025 · 2 comments
Labels
triage Issue needs triaging

Comments

@matt2e
Copy link
Collaborator

matt2e commented Jan 15, 2025

Issues:

  • After being told about other module schemas, the plugin generates schema protos for each module (excluding modules dependant on itself). It does not generate actual client code for them though, so the user can not easily import those files with autocomplete. The next build of the module will generate those files.
  • If a module is removed, or it becomes dependant on the a module, that module's proto file will not get removed (writeGenericSchemaFiles adds but never removes)
  • If we trigger a new build every time an external module schema changes then do things become cyclic? I guess not but still a lot of unnecessary builds... (10 module project... every schema change causes 10 builds)

Would switching to the same model we use for go where we generate external stubs once in projectroot/.ftl and then we could symlink into it from within each jvm target?

@github-actions github-actions bot added the triage Issue needs triaging label Jan 15, 2025
@matt2e
Copy link
Collaborator Author

matt2e commented Jan 15, 2025

Simply clearing out old proto files in writeGenericSchemaFiles makes things worse as the initial builds with ftl dev will not generate non-dependant external sources every time.

@matt2e matt2e added demo Label for upcoming demo(s) and removed demo Label for upcoming demo(s) labels Jan 15, 2025
@matt2e
Copy link
Collaborator Author

matt2e commented Jan 16, 2025

Closing as I think this is a good solution for now: #4066

@matt2e matt2e closed this as completed Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issue needs triaging
Projects
None yet
Development

No branches or pull requests

1 participant