[homebrew] Error calling in `resolve-bundle-name` with null bundle name
When I try to run jpm update-installed, I keep running into this error with an unexpected nil in resolve-bundle-name.
From https://github.com/janet-lang/pkgs
* branch HEAD -> FETCH_HEAD
HEAD is now at d4ccb7e Merge pull request #50 from jeannekamikaze/patch-1
removing /opt/homebrew/Cellar/janet/1.24.1/lib/janet/pkgs.janet
removing manifest /opt/homebrew/Cellar/janet/1.24.1/lib/janet/.manifests/pkgs.jdn
Uninstalled.
generating /opt/homebrew/Cellar/janet/1.24.1/lib/janet/.manifests/pkgs.jdn...
Installed as 'pkgs'.
copying pkgs.janet to /opt/homebrew/Cellar/janet/1.24.1/lib/janet...
error: bad slot #1, expected string|symbol|keyword|buffer, got nil
in string/find [src/core/string.c] on line 313
in resolve-bundle-name [/opt/homebrew/Cellar/janet/1.24.1/lib/janet/jpm/pm.janet] on line 114, column 11
in resolve-bundle [/opt/homebrew/Cellar/janet/1.24.1/lib/janet/jpm/pm.janet] on line 148, column 9
in bundle-install [/opt/homebrew/Cellar/janet/1.24.1/lib/janet/jpm/pm.janet] on line 216, column 4
in update-installed [/opt/homebrew/Cellar/janet/1.24.1/lib/janet/jpm/pm.janet] (tailcall) on line 308, column 5
in run-main [boot.janet] on line 3792, column 16
in cli-main [boot.janet] on line 3937, column 17
I've played around with this a bunch of different ways including several times reinstalling different components from scratch:
-
jpm uninstall pkgs, -
jpm install pkgs -
brew reinstall janet -
jpm uninstall jpm -
brew reinstall janet
Here are the full logs: https://gist.github.com/Techcable/70b62f4a91a5168f4ca6adbfa7c8b28e
No matter what I try, I still get essentially the same error for jpm install-update. However at this point only output is that final stacktrace error: bad slot #1, expected string|symbol|keyword|buffer, got nil
This could be homebrew specific, and it might not be. I don't consider homebrew a particularly good package manager, but it's the de-facto standard for Macs and we should probably support it.
@Techcable Does this still happen for you?
The code may have changed since you posted, but FWIW, I was looking through the logs you shared and went spelunking. It looks like bundle-install is only called here inside update-installed.
It seems possible that the first argument, new-bundle, may have some unexpected value. That in turn looks like it may have originated from a file in the manifest directory.
Perhaps it's possible that there is some file in the manifests directory that has some bad data in it? Or may be some unexpected file is living in that directory?