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

fix: add go.mod file to jvm scaffolding dirs #2414

Merged
merged 1 commit into from
Aug 17, 2024

Conversation

alecthomas
Copy link
Collaborator

@alecthomas alecthomas commented Aug 17, 2024

Without these the Go toolchain tries to scan the directories and fails due to the | characters, which are not supported by Go's build system.

Fixes the following failure:

info: go: finding module for package github.com/TBD54566975/ftl/go-runtime/ftl
go: downloading github.com/TBD54566975/ftl v0.345.0
go: ftl/builtin imports
	github.com/TBD54566975/ftl/go-runtime/ftl: create zip: jvm-runtime/java/scaffolding/{{ .Name | camel | lower }}/ftl.toml: malformed file path "jvm-runtime/java/scaffolding/{{ .Name | camel | lower }}/ftl.toml": invalid char '|'
jvm-runtime/java/scaffolding/{{ .Name | camel | lower }}/pom.xml.tmpl: malformed file path "jvm-runtime/java/scaffolding/{{ .Name | camel | lower }}/pom.xml.tmpl": invalid char '|'
jvm-runtime/java/scaffolding/{{ .Name | camel | lower }}/src/main/java/{{ .PackageDir }}/EchoVerb.java: malformed file path "jvm-runtime/java/scaffolding/{{ .Name | camel | lower }}/src/main/java/{{ .PackageDir }}/EchoVerb.java": invalid char '|'
jvm-runtime/kotlin/scaffolding/{{ .Name | camel | lower }}/ftl.toml: malformed file path "jvm-runtime/kotlin/scaffolding/{{ .Name | camel | lower }}/ftl.toml": invalid char '|'
jvm-runtime/kotlin/scaffolding/{{ .Name | camel | lower }}/pom.xml.tmpl: malformed file path "jvm-runtime/kotlin/scaffolding/{{ .Name | camel | lower }}/pom.xml.tmpl": invalid char '|'
jvm-runtime/kotlin/scaffolding/{{ .Name | camel | lower }}/src/main/kotlin/{{ .PackageDir }}/EchoVerb.kt: malformed file path "jvm-runtime/kotlin/scaffolding/{{ .Name | camel | lower }}/src/main/kotlin/{{ .PackageDir }}/EchoVerb.kt": invalid char '|'

There is an underlying bug that is triggering this, whereby replace directives aren't correctly propagated to the shared Go FTL module stubs. Filed #2415 for this.

Without these the Go toolchain tries to scan the directories and fails
due to the | characters, which are not supported by Go's build system.
@alecthomas alecthomas requested review from a team and deniseli and removed request for a team August 17, 2024 13:26
@ftl-robot ftl-robot mentioned this pull request Aug 17, 2024
@alecthomas alecthomas merged commit da4ff6f into main Aug 17, 2024
17 of 18 checks passed
@alecthomas alecthomas deleted the aat/go-mod-jdk-scaffold branch August 17, 2024 13:30
safeer pushed a commit that referenced this pull request Aug 19, 2024
Without these the Go toolchain tries to scan the directories and fails
due to the | characters, which are not supported by Go's build system.

Fixes the following failure:

```
info: go: finding module for package github.com/TBD54566975/ftl/go-runtime/ftl
go: downloading github.com/TBD54566975/ftl v0.345.0
go: ftl/builtin imports
	github.com/TBD54566975/ftl/go-runtime/ftl: create zip: jvm-runtime/java/scaffolding/{{ .Name | camel | lower }}/ftl.toml: malformed file path "jvm-runtime/java/scaffolding/{{ .Name | camel | lower }}/ftl.toml": invalid char '|'
jvm-runtime/java/scaffolding/{{ .Name | camel | lower }}/pom.xml.tmpl: malformed file path "jvm-runtime/java/scaffolding/{{ .Name | camel | lower }}/pom.xml.tmpl": invalid char '|'
jvm-runtime/java/scaffolding/{{ .Name | camel | lower }}/src/main/java/{{ .PackageDir }}/EchoVerb.java: malformed file path "jvm-runtime/java/scaffolding/{{ .Name | camel | lower }}/src/main/java/{{ .PackageDir }}/EchoVerb.java": invalid char '|'
jvm-runtime/kotlin/scaffolding/{{ .Name | camel | lower }}/ftl.toml: malformed file path "jvm-runtime/kotlin/scaffolding/{{ .Name | camel | lower }}/ftl.toml": invalid char '|'
jvm-runtime/kotlin/scaffolding/{{ .Name | camel | lower }}/pom.xml.tmpl: malformed file path "jvm-runtime/kotlin/scaffolding/{{ .Name | camel | lower }}/pom.xml.tmpl": invalid char '|'
jvm-runtime/kotlin/scaffolding/{{ .Name | camel | lower }}/src/main/kotlin/{{ .PackageDir }}/EchoVerb.kt: malformed file path "jvm-runtime/kotlin/scaffolding/{{ .Name | camel | lower }}/src/main/kotlin/{{ .PackageDir }}/EchoVerb.kt": invalid char '|'
```

There is an underlying bug that is triggering this, whereby replace
directives aren't correctly propagated to the shared Go FTL module
stubs. Filed #2415 for this.
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.

1 participant