Skip to content

Commit

Permalink
fix: add go.mod file to jvm scaffolding dirs (#2414)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alecthomas authored Aug 17, 2024
1 parent a7bc9b3 commit da4ff6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jvm-runtime/java/scaffolding/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module ignore

go 1.22.6
3 changes: 3 additions & 0 deletions jvm-runtime/kotlin/scaffolding/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module ignore

go 1.22.6

0 comments on commit da4ff6f

Please sign in to comment.