You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[devbox.json] Allowing including plugins explicitly via "include" field. (#986)
## Summary
This adds the ability to include plugins explicitly via:
```
"include": [
"plugin:php"
]
```
in devbox.json. The idea is to allow including any devbox.json into an
existing one. The proposed syntax is:
* path: for local files
* https:// for remote files
* plugin: for built-in plugins
only plugin is implemented in this PR.
Improved existing plugin mechanism by using `lockfile` to decide is
`devbox.d` directory needs to be created by keeping track of the plugin
version. In the future we could allow upgrading of configs if there is
version mismatch.
A few design questions: (cc: @Lagoja@loreto )
* Should include be merged into `packges` instead? We could introspect
the include to see if it's a flake or a plugin. This would simplify the
devbox.json but it might be a weird way to include other configs.
* One kinda ugly thing of current design is that the php plugin doesn't
actually install PHP. That feels a bit wrong, but the way we've
currently designed plugins is that they trigger on packages so not sure
how to improve this. One option is to rename `builtin` to something that
makes it more explicit that it extends functionality on existing nix
packages. Maybe `extend:php`. Another option: In the future I expect
includes to contain packages which would be installed as well. So could
parametrize the php plugin so it can take the top level php package as
an input (but otherwise it could install its own)
Edit:
After chatting with @loreto and @Lagoja we agreed to keep this design
with following:
* replace "builtin" with "plugin".
* Including plugins works the same way current plugins. Specifically
init hooks, and environment get added to existing environment. No new
packages are installed.
## How was it tested?
In php flake example, did `devbox services up`
0 commit comments