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

Kotlin modules get renamed to "builtin" during deployment #1213

Closed
matt2e opened this issue Apr 9, 2024 · 3 comments
Closed

Kotlin modules get renamed to "builtin" during deployment #1213

matt2e opened this issue Apr 9, 2024 · 3 comments

Comments

@matt2e
Copy link
Collaborator

matt2e commented Apr 9, 2024

Run ftl dev examples/kotlin/time --recreate --log-level=DEBUG
By the end, a deployment will be created called "builtin-xxxxxx" instead of "time-xxxxxxx"

@matt2e matt2e changed the title kotlin modules get renamed to "builtin" during deployment Kotlin modules get renamed to "builtin" during deployment Apr 9, 2024
@github-actions github-actions bot added the triage Issue needs triaging label Apr 9, 2024
@matt2e matt2e self-assigned this Apr 9, 2024
@github-actions github-actions bot removed the triage Issue needs triaging label Apr 9, 2024
@alecthomas alecthomas mentioned this issue Apr 9, 2024
@matt2e
Copy link
Collaborator Author

matt2e commented Apr 9, 2024

From what i can tell, when reading the module schema from the pb file, the name is builtin instead of time.
Adding these lines to ExtractSchemeRule.kt at line 172 seems to fix the issue, but I don't understand why.

if (moduleName == "builtin") {
      throw IllegalArgumentException("Why does this fix it?")
    }

@matt2e matt2e removed their assignment Apr 9, 2024
@wesbillman
Copy link
Collaborator

wesbillman commented Apr 29, 2024

I'm getting this when running tests locally now as well.

[ERROR] Failed to execute goal com.github.ozsie:detekt-maven-plugin:1.23.5:check-with-type-resolution (default) on project echo: Execution default of goal com.github.ozsie:detekt-maven-plugin:1.23.5:check-with-type-resolution failed: Analyzing /Users/wesbillman/dev/ftl/buildengine/testdata/projects/echokotlin/target/generated-sources/ftl/builtin/Builtin.kt led to an exception.
[ERROR] Location: xyz.block.ftl.schemaextractor.ExtractSchemaRule.postVisit(ExtractSchemaRule.kt:177)
[ERROR] The original exception message was: Why does this fix it?

Deleting ./build and running just clean seemed to fix it for me.

@alecthomas
Copy link
Collaborator

Same fix for me, I think it's just yet another weird Maven cache thing 🤷‍♂️

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

No branches or pull requests

4 participants