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

Draft: add module support #12

Merged
merged 14 commits into from
Dec 3, 2023
Merged

Conversation

axtloss
Copy link
Member

@axtloss axtloss commented Nov 15, 2023

Adds support for custom module plugins to vib

current To-Do:

  • plugin loading logic
  • set "api" that plugins can use
  • dynamically loading plugins when the modules are used`
    - [ ] port current modules to plugins (optional, may become a seperate PR)

Breaking changes:

  • the gen-module module type is now completely unsupported, instead of simply being deprecated
  • recipes have a new property PluginPath that is required to be set

Adds logic for loading and reusing module plugins
@mirkobrombin mirkobrombin self-requested a review November 16, 2023 20:08
core/plugins.go Outdated Show resolved Hide resolved
Reworks the way recipes are loaded to allow Module plugins to make use
of their own Module definitions instead of having to adjust to a central
one.
@axtloss
Copy link
Member Author

axtloss commented Nov 21, 2023

The latest commit broke the build out of purpose, the resolver functions are going to be moved to the plugin API and have not been modified to adhere to the new way modules are loaded.

Makes the resolve functions available in the api to let modules download
their sources themselves
vib can now build basic recepies that do not contain nested modules!
Allows users to nest modules, making them all run as one RUN command in
the containerfile
Allows users to define plugin paths manually instead of having it
hardcoded to ./plugins
@axtloss axtloss marked this pull request as ready for review November 28, 2023 21:18
@axtloss
Copy link
Member Author

axtloss commented Nov 28, 2023

This should be ready for review and/or testing now

Adds nested modules before the actual module as they are treated like
dependencies and it does not make sense to have those after the module
creates a seperate go.mod for api/ so that plugins and vib can build
using the same version of the api, instead of having vib panic every
time it loads a plugin because of differing versions
@mirkobrombin
Copy link
Member

Nice, I'll test and review during the weekend

api/go.mod Outdated Show resolved Hide resolved
@mirkobrombin mirkobrombin merged commit 9f691cd into main Dec 3, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants