-
Notifications
You must be signed in to change notification settings - Fork 248
[RFC] Allow tyson config #1555
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
[RFC] Allow tyson config #1555
Conversation
My vote would be to hold off on tyson. I think we should be using the same devbox.json that our users are using, and introducing a programming language + runtime for config parsing is a huge change. If we need this functionality internally, could we just add the typescript package and run scripts through the init hook? Or even install tyson as a regular package through runx without modifying devbox? |
@gcurtis the specific use case that is interesting for us is turning This change as implemented would not replace devbox.json for us, it would simply mutate it for consumption purposes. Specifically tson would not be used to add standard packages, scripts, or anything else that is doable in json. I'm actually not totally sold on having tyson have it's own runtime. For example we could implement something similar by just using |
I'm not sure we should merge or add TySON support unless we want to support it fully, or it unlocks some benefits that we want to leverage. Merging scripts from the package.json seems like a JS/TS specific benefit, and probably not significant enough to justify adding the feature. Even if we're just using TySON as a mutator for the Devbox JSON, it seems like it would add complexity to managing a project's configs. |
The package.json example is a benefit. Another benefit is we can run
There's nothing
I'm not sure I understand/agree. If TySON is only evaluated if a tson file exists, this strictly limits the scope/risks of this change. Devbox continues to write only to |
@loreto and @gcurtis thoughts on reconsidering this PR? In the font-end repo we have package.json and devbox.json for each project and maintaining that is a pain. This change would allow us to make devbox.json mimic the package.json functionality without requiring that we copy paste every command. I'm OK putting this behind a feature flag. Just to reiterate,
|
Summary
This allows tyson config. It uses runx so the binary does not statically depend on tyson.
TODO: Need to scope tyson to only certain commands that don't modify config (otherwise we end up writing the mutations to the config).
How was it tested?