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

Export missing for JVM typealias decls #3047

Closed
tomdaffurn opened this issue Oct 9, 2024 · 0 comments · Fixed by #3065
Closed

Export missing for JVM typealias decls #3047

tomdaffurn opened this issue Oct 9, 2024 · 0 comments · Fixed by #3065
Assignees
Labels
bug Something isn't working jvm next Work that will be be picked up next

Comments

@tomdaffurn
Copy link
Contributor

Any typealias defined in Java and used in a verb should be exported, but isn't. e.g. javamodule has these:

 typealias AnySerializedType Any  
    +typemap java "xyz.block.ftl.test.AnySerializedType"
    +typemap go "github.com/blockxyz/ftl/test.AnySerializedType"
  typealias CustomSerializedType String  
    +typemap java "xyz.block.ftl.test.CustomSerializedType"
    
  export verb anyAliasedType(javamodule.AnySerializedType) javamodule.AnySerializedType

Bug is caused by two bits of code knowing partial information about the type alias. TypeAliasProcessor creates the typealias decl, but doesn't know to export it. VerbProcessor knows to export it, but doesn't update the decl.

@tomdaffurn tomdaffurn added bug Something isn't working jvm labels Oct 9, 2024
@github-actions github-actions bot added the triage Issue needs triaging label Oct 9, 2024
This was referenced Oct 9, 2024
@tomdaffurn tomdaffurn self-assigned this Oct 9, 2024
@github-actions github-actions bot removed the triage Issue needs triaging label Oct 9, 2024
@tomdaffurn tomdaffurn added the next Work that will be be picked up next label Oct 9, 2024
tomdaffurn added a commit that referenced this issue Oct 10, 2024
Fixes #3047

When a typealias is used in a verb, set it to exported
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working jvm next Work that will be be picked up next
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant