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

feature: multi-runtime (take two) #150

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

unRob
Copy link
Owner

@unRob unRob commented Jun 19, 2024

Exploring what happens if we get rid of the bash entrypoint.

milpa commands of kind executable are not fully supported yet, need to figure out:

  • feeding parsed arguments and options to commands that wish to know about types. POSIX Shells are easy because all values are strings, but for other languages, it'd be nice to pass along structured data, as well as positional arguments (clean of options) to be a good unix citizen.
  • To be kinda sorta compatible with shell scripts, we'd also need to make the MILPA_(ARG|OPT)_ env vars available, serializing repeated values somehow (it should be clear in docs that this is a best-effort, and not as reliable as reading structured input).
  • Test out implementation of env vars for arguments and options

Bash is great, and it's my main scripting language, so that's not going away. Other shells are great too, and loosening the dependency on bash, while allowing other shells (zsh, for now) sounds like a good idea, and something I'd like to play with.

  • add documentation for usage of different shells (based on file extension) should be added
  • implement support for fish? don't use it, but seems cool, and already supported by cobra.
  • figure out how to split runtime.sh
  • should I port itself commands into golang and remove the dependency on bash?
  • utils are bash-only, even if some might work in zsh; log was ported since it's included by default. Porting and maintaining these for each scripting language that I may wanna include sounds like a lot of work, for something I might not even use. Maybe I should make the runtime pluggable instead?

The bash entrypoint is gone, so this will also come into play:

  • periodic check for updates needs to be implemented in go
  • figure out how to allow MilpaRoot/MILPA_ROOT to be modified somehow when installing brew formula. The formula needs a couple more tweaks.
  • help and docs should be fed through less -FIRX

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.

1 participant