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

Plugin system for language runtimes #2452

Open
21 of 38 tasks
Tracked by #2442
alecthomas opened this issue Aug 20, 2024 · 0 comments
Open
21 of 38 tasks
Tracked by #2442

Plugin system for language runtimes #2452

alecthomas opened this issue Aug 20, 2024 · 0 comments
Assignees
Labels
core The core of FTL P1

Comments

@alecthomas
Copy link
Collaborator

alecthomas commented Aug 20, 2024

Proposal here: https://hackmd.io/vmNTsVJlRSKYnWlCMPRnAA

@alecthomas alecthomas mentioned this issue Aug 20, 2024
19 tasks
@github-actions github-actions bot added the triage Issue needs triaging label Aug 20, 2024
@alecthomas alecthomas added P1 core The core of FTL and removed triage Issue needs triaging labels Aug 20, 2024
@ftl-robot ftl-robot mentioned this issue Aug 20, 2024
matt2e added a commit that referenced this issue Oct 1, 2024
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
- Watches for:
    - added and removed modules
    - updates to `ftl.toml`
- Asks a module plugin to build when:
    - explicitly asked (eg: `ftl build`)
    - dependencies are updated
    - `ftl.toml` is updated
- Listens to each module plugin's Updates topic to react to automatic
builds

#### Module plugin
Currently these plugins arent actual plugins, but they will be soon!
- Can be used to scaffold a new module (`ftl new ...`)
- Gathers dependencies for a module
- Builds when asked by the build engine
- Watches for file changes within the module (language dependant.
excludes `ftl.toml`)
- When a change is detected, publishes automatic build events to it's
`Updates` topic

Not included in this PR (coming in a later one):
- allow `ftl new` to have language specific arguments (currently go and
jvm ones are hardcoded into `cmd_new.go`)
- currently no logic for collapsing multiple build requests into one or
detecting if we have already built since a file change event was fired.
This logic needs to change for external plugins anyway.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
matt2e added a commit that referenced this issue Oct 11, 2024
Adds `languageplugin.externalPlugin` for working with plugins over gRPC.
This PR does not include any non-test implementations.

Part of #2452
matt2e added a commit that referenced this issue Oct 24, 2024
We already added bind allocator to build engine so that it can launch
language plugins but we did not pass in the bind allocator.

Added a task to clean this up here:
#2452
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core The core of FTL P1
Projects
None yet
Development

No branches or pull requests

2 participants