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

[Bug report] "There was a problem finishing installing dependencies" v6.0.0 #156

Closed
2 tasks done
alexbarton opened this issue Nov 13, 2024 · 21 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@alexbarton
Copy link

alexbarton commented Nov 13, 2024

@olets's maintainer edit: this has become a catchall for several bugs with the same end result. Summarizing here to save newcomers having to read the thread

Original report follows…


 
 
 
 

Is there an existing issue for this?

  • I have searched the existing issues

Update the issue title

  • I have updated the title

Expected Behavior

source /opt/homebrew/share/zsh-abbr/zsh-abbr.zsh should return no errors and "just work" ;-)

Actual Behavior

❯ brew install olets/tap/zsh-abbr
[ … no errors … ]
❯ source /opt/homebrew/share/zsh-abbr/zsh-abbr.zsh
abbr: There was a problem finishing installing dependencies

Steps To Reproduce

  1. macOS 14.7.1
  2. Homebrew 4.4.5
  3. zsh-abbr installed via brew install olets/tap/zsh-abbr
  4. source /opt/homebrew/share/zsh-abbr/zsh-abbr.zsh

Environment

❯ abbr profile
abbr:905: no such file or directory: /opt/homebrew/Cellar/zsh-abbr/6.0.0/share/zsh-abbr/zsh-job-queue/zsh-job-queue.zsh
abbr:906: no such file or directory: /opt/homebrew/Cellar/zsh-abbr/6.0.0/share/zsh-abbr/zsh-job-queue/zsh-job-queue.zsh
abbr:925: no such file or directory: /opt/homebrew/Cellar/zsh-abbr/6.0.0/share/zsh-abbr/zsh-job-queue/zsh-job-queue.zsh
zsh-abbr version 6.0.0
zsh 5.9 (x86_64-apple-darwin23.0)
OSTYPE darwin23.0

Installation method

Homebrew

Installation method details

No response

Anything else?

Thanks for zsh-abbr, worked really great for me for the last years and makes working with ZSH so much more comfortable!

Please let me know if I can test so0mething or which additional info is needed – the error message itself is not very verbose …

@Chekote
Copy link

Chekote commented Nov 13, 2024

The same thing happened to me this morning after running my brew update script. Seems abbr broke when updating to the latest major release. I read the migration guide and the installation guide for v6 but nothing helped.

I tried reinstalling via brew reinstall olets/tap/zsh-abbr, but it did not help.

Environment

Mac OS 15.1
Brew 4.4.5-14-gb421c2f

$ abbr profile
abbr:905: no such file or directory: /opt/homebrew/Cellar/zsh-abbr/6.0.0/share/zsh-abbr/zsh-job-queue/zsh-job-queue.zsh
abbr:906: no such file or directory: /opt/homebrew/Cellar/zsh-abbr/6.0.0/share/zsh-abbr/zsh-job-queue/zsh-job-queue.zsh
abbr:925: no such file or directory: /opt/homebrew/Cellar/zsh-abbr/6.0.0/share/zsh-abbr/zsh-job-queue/zsh-job-queue.zsh
zsh-abbr version 6.0.0
zsh 5.9 (arm64-apple-darwin24.0)
OSTYPE darwin24.0

@olets
Copy link
Owner

olets commented Nov 13, 2024

Thanks for reporting. Oversight in updating the formula to point to v6. Should be fixed.

For anyone who tried installing v6 with Homebrew before this comment:

This might work

brew update && brew reinstall zsh-abbr

This probably will

brew uninstall zsh-abbr && brew update && brew install zsh-abbr

This definitely should

brew uninstall --force zsh-abbr && brew update && brew install zsh-abbr

Lmk which if any of those work for you. Thanks!

@LangLangBart
Copy link

LangLangBart commented Nov 14, 2024

Hi, I followed the manual1 instructions and encountered this issue.

Below is a Docker command to consistently reproduce the issue.

docker run --rm --tty --interactive alpine:latest sh -uec '
apk add zsh git
git clone https://github.com/olets/zsh-abbr --single-branch --branch main --depth 1 /olet-abbr
echo "source /olet-abbr/zsh-abbr.zsh" > ~/.zshrc
/bin/zsh'
fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/community/x86_64/APKINDEX.tar.gz
(1/18) Installing ca-certificates (20240705-r0)
(2/18) Installing brotli-libs (1.1.0-r2)
...
Resolving deltas: 100% (5/5), done.
abbr: Finishing installing dependencies
abbr: There was a problem finishing installing dependencies

8d860058da6f# abbr --version
abbr:905: no such file or directory: /olet-abbr/zsh-job-queue/zsh-job-queue.zsh
abbr:906: no such file or directory: /olet-abbr/zsh-job-queue/zsh-job-queue.zsh
abbr:925: no such file or directory: /olet-abbr/zsh-job-queue/zsh-job-queue.zsh
zsh-abbr version 6.0.0

Footnotes

  1. Installation :: zsh-abbr

@LangLangBart
Copy link

Using the --recurse-submodules flag with git clone does the trick.

         --recurse-submodules[=<pathspec>]
             After the clone is created, initialize and clone submodules within
             based on the provided <pathspec>. If no =<pathspec> is provided,
             all submodules are initialized and cloned. This option can be given
             multiple times for pathspecs consisting of multiple entries. The
             resulting clone has submodule.active set to the provided pathspec,
             or "." (meaning all submodules) if no pathspec is provided.
   
             Submodules are initialized and cloned using their default settings.
             This is equivalent to running git submodule update --init
             --recursive <pathspec> immediately after the clone is finished.
             This option is ignored if the cloned repository does not have a
             worktree/checkout (i.e. if any of --no-checkout/-n, --bare, or
             --mirror is given)

The problem is that I use zsh4humans1 to install plugins, and there is no option I can pass to the installation process to update the submodules.

# auto-expanding abbreviations - https://github.com/olets/zsh-abbr
z4h install olets/zsh-abbr || return

Footnotes

  1. GitHub - romkatv/zsh4humans: A turnkey configuration for Zsh

@olets
Copy link
Owner

olets commented Nov 14, 2024

Thanks for the report @LangLangBart.

Make this change:

- git clone https://github.com/olets/zsh-abbr --single-branch --branch main --depth 1 /olet-abbr
+ git clone https://github.com/olets/zsh-abbr --recurse-submodules --single-branch --branch main --depth 1 /olet-abbr

Can fix an existing v6 clone with

cd path/to/zsh-abbr
git submodule update --init

I've updated the docs.

@olets
Copy link
Owner

olets commented Nov 14, 2024

Crossing comments!

Can you clone manually and then have z4h load that? If not, recommend opening a z4h issue to ask.

@LangLangBart
Copy link

Thanks @olets

I switched to the brew install method, and it works well.

@bartlibert
Copy link

The dependencies are also missing in the source distribution files, will you add them there?

@llakala
Copy link

llakala commented Nov 15, 2024

The dependencies are also missing in the source distribution files, will you add them there?

Bumping this, nixpkgs needs this before we can update to 6.0.0.

@bartlibert
Copy link

The dependencies are also missing in the source distribution files, will you add them there?

Bumping this, nixpkgs needs this before we can update to 6.0.0.

FYI, for arch linux I switched the aur package to using git tags to work around this. Maybe it can help for nixos as well: PKGBUILD

@olets
Copy link
Owner

olets commented Nov 15, 2024

Interesting, didn't occur to me that GitHub's generated archives might miss submodules. Seems like a bug.

Added a complete archive to https://github.com/olets/zsh-abbr/releases/tag/v6.0.0

If that's helpful, I'll make manually adding a tag-named archive to the releases part of my release workflow.

@olets olets added bug Something isn't working and removed needs triage labels Nov 15, 2024
@olets olets added this to zsh-abbr Nov 15, 2024
@olets olets moved this to In Progress in zsh-abbr Nov 15, 2024
@olets olets changed the title [Bug report] "There was a problem finishing installing dependencies" [Bug report] "There was a problem finishing installing dependencies" v6.0.0 Nov 15, 2024
@olets
Copy link
Owner

olets commented Nov 17, 2024

@alexbarton @Chekote I believe your bugs are fixed

NixOS is still giving us trouble but imo it's fair to consider that a Nix package problem, and to discuss in NixOS/nixpkgs#355512

Tentatively closing this. Comment if you're still having trouble

@arrrgi
Copy link

arrrgi commented Nov 30, 2024

Crossing comments!

Can you clone manually and then have z4h load that? If not, recommend opening a z4h issue to ask.

Raised an issue on zsh4humans.

@arrrgi
Copy link

arrrgi commented Dec 1, 2024

@olets it might be too late now with this issue closed, but have you considered the benefits of using a subtree for including zsh-job-queue

I opened an issue with the zsh4humans maintainer and was told it wasn't trivial to provide (as per issue romkatv/zsh4humans#335) as z4h doesn't support installing Zsh plugins with a git clone operation.

@romkatv
Copy link

romkatv commented Dec 2, 2024

@olets it might be too late now with this issue closed, but have you considered the benefits of using a subtree for including zsh-job-queue

See https://www.atlassian.com/git/tutorials/git-subtree. The tl;dr is that subtrees are better than submodules.

@olets
Copy link
Owner

olets commented Dec 2, 2024

Never too late, but there's no question in my mind that submodule is the better tool for this case than subtree. I'll comment in the z4h issue with a workaround concept.

It's a bummer that the archives GitHub automatically generates for releases don't include submodules' contents (the root cause of most of the reports in this issue), but people whose go-to plugin management method doesn't support Git cloning or downloading user-specified archives can always use the docs' "manual" method (or in the case of zsh-abbr Homebrew if they're Homebrew users).

(Let's not make this the place to debate this subjective question, but for anyone reading along who hasn't used both (or either) subtree has its place but I don't find the above Atlassian article's premise or argument compelling. From a quick search, this is closer to how I think about the two https://adam-p.ca/blog/2022/02/git-submodule-subtree/.)

@romkatv

This comment was marked as off-topic.

@arrrgi
Copy link

arrrgi commented Dec 3, 2024

I will accept Homebrew as the installation method as I don't think any further productive conversation will come of the debate between including source trees from other repos. I have used both submodules and subtrees and see merit in each approach.

I'm fortunate that the systems I develop on all have Homebrew installed before my Zsh config and personalisations are setup, but I would advocate that not all Linux users want to install Homebrew and would appreciate some form of automated way to include this in their ecosystem as a plugin for Zsh.

@olets
Copy link
Owner

olets commented Dec 7, 2024

not all Linux users want to install Homebrew and would appreciate some form of automated way to include this in their ecosystem as a plugin for Zsh

For users who want to automate their own downloading of an archive but don't know where to start, and for users who* can't/won't use a plugin manager that supports zsh-abbr, can't/won't use Homebrew, can't/won't use git clone, and aren't on a distro that has its own zsh-abbr package and can't/won't take on maintaining one, I've added some GitHub REST API solution signposting to the "installing as a plugin" docs. A contribution of a cross-OS script would be welcome (maybe rossmacarthur/install is relevant prior art, minus the cargo aspect? Or maybe not… this isn't my niche.)

Also tested 20 plugin managers, and documented limitations in the same section (tl;dr nearly all work with no special considerations needed).

I'll comment in the z4h issue with a workaround concept

I've added a Git-dependent z4h postinstall hook snippet to the docs' Integrations page. I'm not deeply familiar with z4h, and this snippet may miss supporting some of z4h's package management features, but installing works.** Also added signposting for a no-Git-dependency solution (docs contribution welcome).

 

* Tone check: don't read this long list as snarky, just helping users determine whether they fall into this category
** Iterating on that is outside the scope of this issue — open a new issue if necessary

@arrrgi
Copy link

arrrgi commented Dec 8, 2024

Thanks @olets for your time, effort and great documentation additions

olets added a commit that referenced this issue Dec 10, 2024
…156]

This commit is to document impactful changes in associated repos:

- The `zsh-abbr` and `zsh-abbr@6` Homebrew formulae successfully install zsh-abbr.
- The GitHub release has an associated working archive.
- The documentation site's manual installation snippet works.
- The documentation site includes solutions for installing with zgen, zit, zr, and zsh4humans.
@olets
Copy link
Owner

olets commented Dec 14, 2024

In case anyone's watching this space for NixOS updates: there's now a working v6.x package 🎉 NixOS/nixpkgs#364640

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

8 participants