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

improve installation experience #281

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

improve installation experience #281

wants to merge 40 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
/continues f53c564

echo-unique:
- new command that supports arguments, and stdin content without sorting

choose:
- fix ctrl+c not returning to default screen buffer

dorothy, fs-relocate:
- fix bad refactor of last commit

echo-file:
- don't output separator between files, as we don't want that in all use cases

git-helper:
- add `--no-confirm-solo` to protocol prompt
- add repository details to all sensible prompts

setup-shell:
- fix the broken implementation of before
- add installed and configured shell detection and use it when merging with preferences
- add version detection
- don't crash on unconfigurable shells
- improved formatting
- fix crash on deconfigure

setup-util:
- lint

remaining todos:
- [ ] config-helper sudo escalation
- [ ] find out why xonsh is not getting installed
- [ ] find out why all the shells aren't be configured correctly
- [ ] save configuration updates

Co-authored-by: hjalmar jakobsson <[email protected]>
@balupton balupton force-pushed the dev/devilbird branch 2 times, most recently from a6cf1a7 to b56a2bc Compare February 16, 2025 07:47
had to split allow/disallow and login, as the flow was too confusing with them as one

now actions are: install/uninstall, configure/deconfigure, allow/disallow, login

implemented the arg handling

fixed duplication and detection and exclusions etc for basenames and paths

also innovated with ksh and dash config loading, they can now be toggled independently

need to apply configuration saving now, setup-util-$shell configuration/deconfiguration, etc

also fix linting issues
people had confusion about what was installed when, and for what reasons
@balupton balupton force-pushed the dev/devilbird branch 15 times, most recently from 1dbaa58 to 2c94ff6 Compare March 20, 2025 08:21
- 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
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