Skip to content

improve installation experience #281

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

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open

improve installation experience #281

wants to merge 44 commits into from

Conversation

balupton
Copy link
Member

@balupton balupton commented Feb 6, 2025

WIP

Closes:

May close:

Improves:

Discards old implementation of:

Todos:

Current batch todos, in any order:

  • merge my other WIP changes with the dev branch
  • new setup-shell flow
  • make sure that uninstallations in the setup-util-$shell flow remove uninstalled login shell, without endless recursion - I've added an exclude option, however need to finish implementing it
  • config-helper, echo-wait, and echo-file automatic sudo handling
  • need to make sure that when unsetting a login shell, we use the next preference or prompt
  • need to implement the configuration saving
  • make sure there is a cannot configure nu if nu not installed check
  • make use_shells empty by default, as otherwise everything is selected for login shell
  • add login shell detection
  • echo-wait cleanup
  • config-helper auto sudo escalation
  • get-installer to use a json file, so it can run on bash v3 which will fix Dorothy-config failing on old bash versions.
  • is-touchable
  • --sudo flag to --elevate in all relevant locations
  • sudo --stdin flag when needed
  • eval-helper and sudo-helper should be merged, or need a new eval-target command, to avoid conflating stderr output in no-tty mode (achieved by new do function)
  • implement and test and cleanup new do and try functions
  • update Dorothy tests action for new semaphore location
  • don't write theme fallback to cache
  • move styles.bash env vars preset to setup-environment-commands
  • test new get-terminal-theme on WSL
  • merge and release
  • figure out why the choose error happens if no git remote, as it should have thrown before calling choose - this could be the bash bug manifesting itself, or could be a bug in prior try versions now fixed
  • update outdated bash docs
  • experiment with custom tty device file when in no-tty so stderr is not filled up
  • complete cache expiry unification for get-terminal-theme and setup-environment-commands, for now live with the bug that is introduced where one must manually clear the terminal theme cache

bash.bash:
- change `__can_read_decimal_timeout` to `BASH_CAN_READ_DECIMAL_TIMEOUT`
- add `BASH_CAN_*` capability variables, notably: `BASH_CAN_READ_I`, `BASH_CAN_PIPE_STDOUT_AND_STDERR_SHORTHAND`

bash.bash, zsh.zsh:
- fix `\m` being output instead of `\n` in `__print_value_lines_or_line`
@balupton balupton marked this pull request as draft February 8, 2025 18:22
…me as `curl`

caused by `-quiet` instead of `--quiet`, however `--no-verbose/-nv` is actually desired, as it makes errors outputted which is what we do for our `curl` implementation

/regression since 8292276
- 8292276#diff-fc2bc2f535254e954ecf9c2585d7ea395d07d1a59e2177638631d7981d2db9d8L101-R141

as this is a 2 year old bug, this was never encountered in practice because `curl` is the preferred implementation and `curl` is dep of dorothy so it is always used in practice
blame goes back to 686a1ba

this is a non-functional bug, as the checks will just ignore it as it doesn't exist

the bug is that `("${@:1}")` includes the title, whereas we just want the paths
…eady knows they are setup, enables quicker debugging
… terms of overriding the actions default behaviour and being the preference
thanks to our shim in `bash.bash` it is always available

also fixes a double load of `bash.bash` in `get-array`
cspell:
- update spellcheck for new utilities

command-working:
- add `ssh` to exceptions, this was needed as `setup-util-ssh` now checks for `ssh` as it handles the client too, which does a `ssh` check

cpr, fs-diff:
- update and correct comments on tooling and installers

dorothy:
- completely rewrote the user configuration setup process to reduce friction, streamline UX for beginners and pros, and eliminate fragility
- questions now have descriptions for YOLO no-RTFM users who install first and expect the installation to walk them through the project, shoutout to our YOLO user `@christianaudigeur6177` on youtube
- incentives authentication with github and gitlab to offer a superior repo creation/verification experience, and to prevent rate limiting /close #225 /improves #270
- able to now detect renamed github repositories if using the github cli, and prompts the user for what to do /ref #225
- robust and intuitive fallbacks if any step fails
- clear and robust strongbox setup, with improved description and flow, no longer waits for confirm as we now auto-verify
- strongbox and dorothy repo detection is now offloaded to `git-helper` rather than fetch, this means it now works on all repositories not just public github repositories, with none of the fragility, /close #266
- remove a legacy `__require_array 'mapfile'` /ref c158b97

get-installer:
- update aliases for the updated `setup-util-*` comments

git-helper:
- add `get-remote-file`, `has-remote-file`, `is-dorothy`, `is-strongbox` actions
- correct `--` usage in help text
- remote selection skips confirmation if there is only one remote

add:
- `setup-util-croc` intended for `cpr` and dorothy strongbox init
- `setup-util-diff` extracted from `setup-util-git`
- `setup-util-diff-so-fancy` intended for `fs-diff`
- `setup-util-difftastic` intended for `fs-diff`
- `setup-util-git-lfs` extracted from `setup-util-git`
- `setup-util-gitell` extracted from `setup-util-git`
- `setup-util-magic-wormwhole` intended for `cpr` and dorothy strongbox init
- `setup-util-meld` extracted from `setup-util-git`
- `setup-util-pinentry` extracted from `setup-util-git`
- `setup-util-ssh` handles the client and server, previously `setup-util-sshd` only handled server, that is not deprecated
- `setup-util-ssh-askpass` extracted from `setup-util-git`
- `setup-util-termscp` intended for `cpr` and dorothy strongbox init

setup-util:
- check is no longer constrained to `--quiet` mode, as we can just output the necessary text, this dramtically improves the successful checks which prevents DOWNLOAD determinations hitting the GitHub API causing Rate Limit encounters during the intial non-quiet dorothy setup experience /improves #270

setup-util-*:
- changed `setup-util "$@" --check --cli=<cli>` to `setup-util --check --cli=<cli> "$@"`, such that `--no-check` can be passed by the user to disable the checks

setup-util-gh:
- clearer messaging on why one would want to authenticate

setup-util-git:
- extract extra installers into their own `setup-util-*` scripts

setup-util-node:
- correct a syntax for a `git-helper` call

docs/private-configuration:
- update for new strongbox flow

deprecated:
- `setup-util-sshd` has been replaced by `setup-util-ssh` which now handles both client and server
@balupton balupton force-pushed the dev/devilbird branch 4 times, most recently from 07d5d80 to cb51e8f Compare February 9, 2025 18:41
balupton added a commit that referenced this pull request Feb 21, 2025
people had confusion about what was installed when, and for what reasons
@balupton balupton force-pushed the dev/devilbird branch 16 times, most recently from 2c94ff6 to 192befd Compare March 21, 2025 08:25
- new `__do` and `__try`, instead of `eval_capture`
    - better coverage and tests, see `dorothy-internals`
    - more powerful API
- new `is-fs` helpers
- new `echo-wait` (maybe should rename to `echo-write`)
    - no longer needs sponge
    - more powerful API
    - moreutils as such is no longer a dorothy recommended dep
- auto-sudo escalation on nearly everything
    - new sudo/elevate/elevated args
- use FDs instead of device files where sensible to avoid linux divergence from macos
- ... todo
- new `--elevated`, `--elevate`, `--user`, `--group`, `--reason` elevation args
- merging of `until-success` and `sudo-helper` into `eval-helper`
- change source code convention of having a newline follow `--`
- merged `fs-bytes`, `fs-kilobytes`, `fs-megabytes` into new `fs-size`
- merged various dirname/basename/filename commands into new `fs-path`
- renamed `echo-wait` to `echo-write`
- renamed `get-file` to `fs-type`
- add `is-exit`

todos:

- finish merged `eval-helper`
- finish new elevation args on `fs-*` commands
- finish new `fs-mkdir`
Turns out Dorothy for 3 years has made it so that accessing empty arrays on bash <4.4 does not crash, as it disables their problematic implementation of `nounset`. I've now documented the various workarounds of `bash.bash` in `versions.md`.

I've also removed verbose comments about the `]] || retuurn` rule, as that can become a linter rule (added a todo note about it).

I've also fixed `dorothy-warnings` have incorrect function calls and documentation.
This continues the WIP work of 5da9753 in which `sudo-helper` and `until-success` have been merged into `eval-helper`. This reduces overlapping functionality, increases simplicity, and prevents conflicts between them.

The documentation for `eval-helper` still needs to be updated. Notably, that `eval-helper` now forwards `__do` arguments to `__do`, enabling things like `--trim-padding` to now become a `__do` process substituion argument.

`echo-revolving-door` now supports multiple lines.
adds tests for `video-merge`, fixes tests for `fs-path`, and preps merge of `fs-realpath` and `fs-absolute` into `fs-path`, while expanding abilities of path resolution tooling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant