error message for platform not available is misleading
When running pkgx ollama (on Ubuntu 23.10 x86-64):
× unexpected error invalid version:
│ Error: invalid version:
│ at https://deno.land/x/[email protected]/src/utils/semver.ts:44:17
│ at Array.flatMap (<anonymous>)
│ at new SemVer (https://deno.land/x/[email protected]/src/utils/semver.ts:25:31)
│ at https://deno.land/x/[email protected]/src/hooks/useInventory.ts:24:55
│ at Array.map (<anonymous>)
│ at Object.get (https://deno.land/x/[email protected]/src/hooks/useInventory.ts:24:46)
│ at eventLoopTick (ext:core/01_core.js:182:7)
│ at async Object.select (https://deno.land/x/[email protected]/src/hooks/useInventory.ts:7:20)
│ at async Promise.all (index 0)
│ at async resolve (https://deno.land/x/[email protected]/src/plumbing/resolve.ts:55:3)
╰─➤ https://github.com/pkgxdev/pkgx/issues/new
worksforme, does this happen every time? It's possible there was an API error. If so then I'll improve the error.
Happens every time for me, yeah. First tried it last week, and tried it again today. Other packages work fine (tested pkgx julia and pkgx zig zen, both of which work as expected); it's just ollama that's giving me trouble.
I don't think this is likely something fixed, but please check your pkgx is the latest version.
After that try getting rid of the http cache: rm -rf ~/.cache/pkgx or XDG_ equivalent. If that fixes it then we have a cache bug.
platforms:
- darwin # Available for macOS Windows & Linux support coming soon. <= from https://ollama.ai/
if it works on linux, we need to remove this and get it built.
I don't think this is likely something fixed, but please check your
pkgxis the latest version.
pkgx --version reports pkgx 1.1.6 (latest AFAICT).
After that try getting rid of the http cache:
rm -rf ~/.cache/pkgxorXDG_equivalent. If that fixes it then we have a cache bug.
Same behavior after running rm -rf ~/.cache/pkgx && pkgx ollama. Also tried rm -rf ~/.cache/pkgx && pkgx --sync && pkgx ollama for good measure, to no avail.
if it works on linux, we need to remove this and get it built.
Ah, then that'd explain it. Yes, it does indeed work on Linux (and I was able to install it manually on this machine, i.e. outside of pkgx). There's allegedly a preview version for Windows nowadays as well (but I haven't tested it).
Is it as simple as removing the platforms: key entirely? Or adding linux to the list? I'd be happy to kick off the PR either way :)
removing the platforms key, assuming that builds cleanly. it might need tweaks, but we won't know until we try. ;)
Seems to build cleanly, but ollama serve and ollama create mario -f ./Modelfile throw segfaults in CI (only for *nix64; *nix-ARM64 seems to be okay).
yeah, go required a -buildmode=pie flag. just wrestling with platform-specific testing foibles now.
Yeah, I think pkill is matching on the test runner; using pkill -x instead should behave more like killall. Hopefully that's the last piece to get the tests passing (we'll find out in a few minutes; fingers crossed :crossed_fingers: ).
(Though I'm surprised that killall ain't available; is that not a standard Linux command?)
ugh, I'm sorry. That I should have checked for rather than have you jump through hoops.
I will reopen to improve the error message.