diff --git a/backend/protos/xyz/block/ftl/v1/language/language.proto b/backend/protos/xyz/block/ftl/v1/language/language.proto index 09960f2f4b..4462faeb00 100644 --- a/backend/protos/xyz/block/ftl/v1/language/language.proto +++ b/backend/protos/xyz/block/ftl/v1/language/language.proto @@ -58,6 +58,21 @@ message CreateModuleRequest { // Response to a create module request. message CreateModuleResponse {} +message ModuleConfigDefaultsRequest { + string path = 1; +} + +message ModuleConfigDefaultsResponse { + string DeployDir = 1; + optional string build = 2; + optional string GeneratedSchemaDir = 3; + repeated string Watch = 4; + // TODO: remove... + // repeatedDeploy []string + // string Errors string + +} + message DependenciesRequest { string path = 1; Metadata metadata = 2; @@ -170,6 +185,8 @@ service LanguageService { // Generates files for a new empty module with the requested name rpc CreateModule(CreateModuleRequest) returns (CreateModuleResponse); + rpc ModuleConfigDefaults(ModuleConfigDefaultsRequest) returns (ModuleConfigDefaultsResponse); + // Extract dependencies for a module rpc GetDependencies(DependenciesRequest) returns (DependenciesResponse); diff --git a/internal/buildengine/languageplugin/external_plugin.go b/internal/buildengine/languageplugin/external_plugin.go index ef11de9615..7260ef0539 100644 --- a/internal/buildengine/languageplugin/external_plugin.go +++ b/internal/buildengine/languageplugin/external_plugin.go @@ -140,6 +140,10 @@ func (p *externalPlugin) CreateModule(ctx context.Context, projConfig projectcon return err } +func (p *externalPlugin) GetModuleConfigDefaults(ctx context.Context, dir string) (moduleconfig.CustomDefaults, error) { + // resp, err := p.client.getModuleConfig(ctx, connect.NewRequest(&langpb.GetModuleConfigRequest{ +} + // TODO: docs func (p *externalPlugin) GetDependencies(ctx context.Context, config moduleconfig.ModuleConfig) ([]string, error) { resp, err := p.client.getDependencies(ctx, connect.NewRequest(&langpb.DependenciesRequest{ diff --git a/internal/buildengine/languageplugin/plugin.go b/internal/buildengine/languageplugin/plugin.go index ec4405beae..c2f7a75052 100644 --- a/internal/buildengine/languageplugin/plugin.go +++ b/internal/buildengine/languageplugin/plugin.go @@ -32,19 +32,6 @@ type BuildResult struct { StartTime time.Time } -// TODO: rethink this? -type CompilerBuildError struct { - err error -} - -func (e CompilerBuildError) Error() string { - return e.err.Error() -} - -func (e CompilerBuildError) Unwrap() error { - return e.err -} - // PluginEvent is used to notify of updates from the plugin. // //sumtype:decl