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

Our comprehensive list of dependencies is no longer comprehensive... #5553

Closed
audreytoskin opened this issue Jan 19, 2019 · 7 comments
Closed
Labels
docs An issue/PR that touches or should touch the docs
Milestone

Comments

@audreytoskin
Copy link
Contributor

I think it was first noted in issue #2062 that fish did not actually list all of its dependencies in the project README. I tried to solve this in pull requests #4301 and #4326. Then issue #4422 noted that the list distinguishing between "common UNIX utility" and "basic system utility" was some weird wording.

Now, the current draft README in master has folded a lot of the specific command and package names back into the vague phrase "basic POSIX utilities" instead of really spelling out each one. The way I'd organized the list of packages/commands maybe wasn't the best, but the reason I'd worked on producing this exhaustingly exhaustive list of dependencies in the first place is because one or more of these commands that we often take for granted may be missing on more minimal editions of Linux or other Unixlike distros. In the past, I found fish behaving oddly when installed on the minimal Atomic Host release of Fedora, because it was missing some "basic utilities" like man and I think others. So I still think it's important that fish explicitly and thoroughly lists every external command it relies on.

(As before, obviously we don't need to list all applications for which fish offers tab completion as a "dependency", just the real requirements, and the dependencies for optional features...)

@mqudsi
Copy link
Contributor

mqudsi commented Jan 19, 2019

#4422 led to the removal of any utilities that are explicitly part of the POSIX standard and would be present on any *nix environment from being explicitly enumerated in the README. Subsequent updates to fish removed hard dependencies on a number of "common but not POSIX mandated" utilities from core fish altogether, and they were thus dropped from the README.

e.g. hostname doesn't appear not because we presume it's a "common unix utility" but because fish 3.0 no longer requires hostname.

man isn't a core fish dependency (if it is then that needs to be fixed), and as far as I can tell, was never in the README in the first place.

So non-POSIX-mandated utilities should either appear explicitly in the README (the way mktemp is) or not break core fish features when missing.

Fish itself has an insane amount of features and very, very deep reach. Dependencies for things like non-default themes or prompts definitely shouldn't be considered core fish dependencies, and dependencies that enrich fish's output or behavior (such as using man to provide autocompletion descriptions) should either degrade gracefully in their absence or be listed as a core dependency.

@audreytoskin
Copy link
Contributor Author

man wasn't a hard dependency, but used for optional features -- I think it's required for all command completions? or something? which is a pretty popular feature of fish, and so should still be documented.

@mqudsi
Copy link
Contributor

mqudsi commented Jan 19, 2019

I think you commented as I was editing my reply.

Fish itself has an insane amount of features and very, very deep reach. Dependencies for things like non-default themes or prompts definitely shouldn't be considered core fish dependencies, and dependencies that enrich fish's output or behavior (such as using man to provide autocompletion descriptions) should either degrade gracefully in their absence or be listed as a core dependency.

@faho
Copy link
Member

faho commented Jan 19, 2019

@audreytoskin
Copy link
Contributor Author

audreytoskin commented Jan 19, 2019

The point I'm trying to make is that the POSIX standard is very often treated as a useful guideline to aspire toward rather than something that is strictly mandatory. The fish developers break from POSIX where they feel it's necessary, right? And Unixlike distro packagers may also skip features or make incompatible replacements as they wish — or they could even do it by mistake, because POSIX is so big and its documentation sometimes a bit onerous...

So I don't think the phrase "basic POSIX utilities" is good enough for a list of dependencies, when POSIX compliance itself is so often treated as an optional nice-to-have. I thought the dependencies I'd made pull requests for wasn't such an overwhelming list, but perhaps a comma-separated list in a paragraph is better than what I originally did, with a set of bullet points with just one command name each...

@faho
Copy link
Member

faho commented Mar 14, 2019

Okay, revisiting this. The list of dependencies we removed was:

  • basic system utilities including basename, cat, cut, date, dircolors, dirname, ls,
    mkdir, mkfifo, mktemp, rm, seq, sort, stat, stty, tail, tr, tty, uname,
    uniq, wc, and whoami
  • a number of common UNIX utilities:
    • awk
    • find
    • grep
    • kill
    • ps
    • sed

A number of these are actually optional - basename is only used in a few completions (mainly debian stuff) and prompts, dircolors is only used in ls if available, date only in two sample prompts and __fish_print_packages, stat only in the screen completions and __fish_print_packages , seq has a fallback that is just quite a bit slower, stty isn't used but recommended if your term is screwed up, tail is only in a few completions, I can't find tty anywhere, uniq is only in a couple of completions, whoami is used in a few sample prompts, wc is only used in the git prompt, ps is used to complete processes for ps, lsof and killall, grep has been removed almost entirely (a couple of completions and the svn prompt), kill is used in suspend and for trap -l. find is used in a few completions, mostly bsd and gentoo-related.

awk is used a bit, but importantly in __fish_describe_command which I'm about to remove, sed is used all over the place.

So that leaves, as the essential set:

basic system utilities including cat, cut, dirname, ls,
mkdir, mkfifo, mktemp, rm, sort, tr, uname

  • a number of common UNIX utilities:
    • awk (about to remove)
    • sed

If you don't need completions and pick a simple prompt. These correspond to the coreutils and sed packages, so removing one from the former set won't really help as I don't think that package will be split up by any distribution.

faho added a commit that referenced this issue Mar 14, 2019
This is really the only important place we're using it.

See #5553.
@faho faho closed this as completed in 605b1cf Mar 14, 2019
@faho
Copy link
Member

faho commented Mar 14, 2019

Okay, I've now removed all grep calls in share/functions, most in share/completions (only remaining in zpool), awk from __fish_describe_command.

So you need coreutils and sed.

I've listed these tools now in the README, so this should be done.

@faho faho added the docs An issue/PR that touches or should touch the docs label Mar 14, 2019
@faho faho added this to the fish 3.1.0 milestone Mar 14, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
docs An issue/PR that touches or should touch the docs
Projects
None yet
Development

No branches or pull requests

3 participants