-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: isolate hardcoded language support #2796
Conversation
bd0ab9b
to
97737ab
Compare
322d7e1
to
045abee
Compare
7dc7580
to
35639ff
Compare
@@ -333,3 +324,11 @@ func parseImports(filePath string) ([]string, error) { | |||
} | |||
return imports, nil | |||
} | |||
|
|||
func (c ModuleConfig) Schema() string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Schema is going to be passed back from plugins over gRPC, so modules themselves shouldn't be configuring the location of the schema file.
2aab2c7
to
03c6ad8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks Matt.
for { | ||
select { | ||
case event := <-e.pluginEvents: | ||
logger := log.FromContext(originalCtx).Module(event.ModuleName()).Scope("build") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe create the logger once at the top?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logger needs to be scoped to the module, but the loop is for all modules. So it needs to be done per event
# Conflicts: # examples/go/time/go.sum
# Conflicts: # examples/go/time/go.sum
# Conflicts: # examples/go/time/go.sum
# Conflicts: # examples/go/time/go.sum
ffd4b38
to
5f5cbfe
Compare
Part of #2452
In preparation for language plugins, this PR defines a protocol for each language support to conform to. Later we will define the external plugin gRPC service and then move each language to being an external plugin one by one.
Breakdown of components:
Build engine
ftl.toml
ftl build
)ftl.toml
is updatedModule plugin
Currently these plugins arent actual plugins, but they will be soon!
ftl new ...
)ftl.toml
)Updates
topicNot included in this PR (coming in a later one):
ftl new
to have language specific arguments (currently go and jvm ones are hardcoded intocmd_new.go
)