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

Suggestion: consider merging get-installer into setup-util, such that I can do setup-util --cli='thing' and it'll work #282

Open
balupton opened this issue Feb 8, 2025 · 0 comments
Labels
enhancement Improvement or suggestion PR / Bounty only External demand, as such, external funding / effort is required to make this happen

Comments

@balupton
Copy link
Member

balupton commented Feb 8, 2025

It is a bit strange that get-installer is a seperate utility to setup-util, the origins of this go back to before setup-util was as full-fledged as it was, and there was a need for get-installer mappings to go to things other than setup-util-* commands.

The other constraint that required get-installer was its use of bash associative arrays, which is a bash v4 feature, and macos ships with bash v3. However, now that there is tooling within Dorothy for parsing json, we could just move the associative array to a json configuration file that setup-util loads.

The other change here, would actually also allow setup-util to handle groupings of installer methods. Such as be able to handle DOWNLOAD for a bottle, as well as DOWNLOAD for a github tarball. That would be doing setup-util --cli=<cli> -- [first batch of options] -- [second batch of options]. This is because to support setup-util --cli=<cli> to lookup <cli> and call the setup-util-<installer> command, we need to know if any options were passed.

There are probably other complexities here, such as handling all the weird options of get-installer, but it seems good.

@balupton balupton added enhancement Improvement or suggestion PR / Bounty only External demand, as such, external funding / effort is required to make this happen labels Feb 8, 2025
balupton added a commit that referenced this issue Feb 10, 2025
rewrote `get-installer` so that instead of using a bash v4 associative array, it now uses a json file, similar to what became possible in `setup-dns` several months ago

this also allows the possibility of automatic sorting of the keys

I've also moved the `--test` into its own subshell function as per standard convention, and did this by introducing a `--verify` option that works with `--quiet` to `get-installer`

I have also updated the verification to do a single call to `echo-style` which dramatically improves performance

/fixes https://github.com/bevry/dorothy/actions/runs/13235857374/job/36940496915#step:2:10920

/implements half of the suggestion in #282

other changes:

`dorothy test`:
- remove handling of flakey tests, solve their flakeyness instead
- prior flakeyness was due to the eval_capture race condition which is now solved

`setup.bash`:
- don't default to installing neovim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement or suggestion PR / Bounty only External demand, as such, external funding / effort is required to make this happen
Development

No branches or pull requests

1 participant