Skip to content

Commit

Permalink
fix: remove unused [executables] from ftl-project.toml (#1667)
Browse files Browse the repository at this point in the history
This is unused since you have to issue `ftl` commands to do anything so
we already know where that executable is. We originally added this to be
used by extensions, but we can use `settings.json` for that instead.
  • Loading branch information
wesbillman authored Jun 5, 2024
1 parent 06b1316 commit 42d6bed
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 35 deletions.
3 changes: 0 additions & 3 deletions backend/controller/sql/testdata/go/database/ftl-project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ ftl-min-version = ""
[modules.database.secrets]
FTL_DSN_DATABASE_TESTDB = "inline://InBvc3RncmVzOi8vcG9zdGdyZXM6c2VjcmV0QGxvY2FsaG9zdDo1NDMyMC90ZXN0ZGI_c3NsbW9kZT1kaXNhYmxlIg"

[executables]
ftl = ""

[commands]
3 changes: 0 additions & 3 deletions common/projectconfig/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ func mergeRootKeys(a, b Config) Config {
if b.ExternalDirs != nil {
a.ExternalDirs = b.ExternalDirs
}
if b.Executables.FTL != "" {
a.Executables.FTL = b.Executables.FTL
}
if len(b.Commands.Startup) > 0 {
a.Commands.Startup = b.Commands.Startup
}
Expand Down
9 changes: 0 additions & 9 deletions common/projectconfig/merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ func TestMerge(t *testing.T) {
},
ModuleDirs: []string{"a/b/c"},
ExternalDirs: []string{"e/f"},
Executables: Executables{
FTL: "ftl",
},
Commands: Commands{
Startup: []string{"echo 'Before'"},
},
Expand Down Expand Up @@ -62,9 +59,6 @@ func TestMerge(t *testing.T) {
},
ModuleDirs: []string{"d"},
ExternalDirs: []string{"g/h"},
Executables: Executables{
FTL: "./bin/ftl",
},
Commands: Commands{
Startup: []string{"echo 'After'"},
},
Expand Down Expand Up @@ -97,9 +91,6 @@ func TestMerge(t *testing.T) {
},
ModuleDirs: []string{"d"},
ExternalDirs: []string{"g/h"},
Executables: Executables{
FTL: "./bin/ftl",
},
Commands: Commands{
Startup: []string{"echo 'After'"},
},
Expand Down
5 changes: 0 additions & 5 deletions common/projectconfig/projectconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ import (
"github.com/TBD54566975/ftl/internal/log"
)

type Executables struct {
FTL string `toml:"ftl"`
}

type Commands struct {
Startup []string `toml:"startup"`
}
Expand All @@ -34,7 +30,6 @@ type Config struct {
Modules map[string]ConfigAndSecrets `toml:"modules"`
ModuleDirs []string `toml:"module-dirs"`
ExternalDirs []string `toml:"external-dirs"`
Executables Executables `toml:"executables"`
Commands Commands `toml:"commands"`
FTLMinVersion string `toml:"ftl-min-version"`
}
Expand Down
3 changes: 0 additions & 3 deletions common/projectconfig/projectconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ func TestProjectConfig(t *testing.T) {
},
ModuleDirs: []string{"a/b/c", "d"},
ExternalDirs: []string{"e/f", "g/h"},
Executables: Executables{
FTL: "ftl",
},
Commands: Commands{
Startup: []string{"echo 'Executing global pre-build command'"},
},
Expand Down
3 changes: 0 additions & 3 deletions common/projectconfig/testdata/ftl-project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@ external-dirs = ["e/f", "g/h"]

[commands]
startup = ["echo 'Executing global pre-build command'"]

[executables]
ftl = "ftl"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ ftl-min-version = ""
[global.secrets]
secret = "inline://ImJhciI"

[executables]
ftl = ""

[commands]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ ftl-min-version = ""
[global.secrets]
secret = "inline://ImZvb2JhciI"

[executables]
ftl = ""

[commands]
3 changes: 0 additions & 3 deletions go-runtime/ftl/ftltest/testdata/go/wrapped/ftl-project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ ftl-min-version = ""
[global.secrets]
secret = "inline://ImJhemJheiI"

[executables]
ftl = ""

[commands]

0 comments on commit 42d6bed

Please sign in to comment.