-
Notifications
You must be signed in to change notification settings - Fork 552
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
plugins: add support for adding default plugins #3926
Labels
Milestone
Comments
ilgooz
changed the title
services/plugin: add support for adding default plugins
plugins: add support for adding default plugins
Jan 3, 2022
I was able to add a default plugin with the following change : diff --git a/starport/chainconfig/config.go b/starport/chainconfig/config.go
index faa458f2..1789776e 100644
--- a/starport/chainconfig/config.go
+++ b/starport/chainconfig/config.go
@@ -50,6 +50,9 @@ var DefaultConf = Config{
Faucet: Faucet{
Host: "0.0.0.0:4500",
},
+ Plugins: []Plugin{
+ {Name: "test", Path: "git.sr.ht/~tbruyelle/plugins-sp/print"},
+ },
}
// Config is the user given configuration to do additional setup
@@ -221,7 +224,7 @@ func Parse(r io.Reader) (Config, error) {
if err := yaml.NewDecoder(r).Decode(&conf); err != nil {
return conf, err
}
- if err := mergo.Merge(&conf, DefaultConf); err != nil {
+ if err := mergo.Merge(&conf, DefaultConf, mergo.WithAppendSlice); err != nil {
return Config{}, err
}
return conf, validate(conf) That said I'm not sure about the impact of adding the |
salmad3
added
type:feat
To implement new feature.
component:extensions
Related to Ignite Extensions.
labels
Feb 2, 2024
Yes, thanks, let's close. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Plugin system: #1312, #1959
The plugin system requires you to define the plugins you want to use for your chain in the chain's config.yml. As this is pretty useful for loading plugins optionally, Starport CLI may want to offer some plugins out of the box, without the need of users defining them in the config.yml manually. (maybe
starport scaffold band
)In order accomplish this feature, we can define the default plugins in DefaultConf which will make Starport CLI automatically load these plugins without any user input.
cc @tbruyelle
The text was updated successfully, but these errors were encountered: