janet-lang / spork

Various Janet utility modules - the official "Contrib" library.
MIT License
123 stars 35 forks source link

`(use spork)` fails if installation done via `bundle/install` #188

Closed sogaiu closed 4 months ago

sogaiu commented 4 months ago

As hinted at by @pepe here and demoed here, (use spork) results in an error:

$ janet
Janet 1.35.2-3078686f linux/x64/gcc - '(doc)' for help
repl:1:> (bundle/install ".")
running hook build for bundle spork
done!
running hook install for bundle spork
add /home/user/.local/lib/janet/tarray.h
add /home/user/.local/lib/janet/spork
add /home/user/.local/lib/janet/spork/build-rules.janet
add /home/user/.local/lib/janet/spork/schema.janet
add /home/user/.local/lib/janet/spork/test.janet
add /home/user/.local/lib/janet/spork/sh.janet
add /home/user/.local/lib/janet/spork/services.janet
add /home/user/.local/lib/janet/spork/cjanet.janet
add /home/user/.local/lib/janet/spork/misc.janet
add /home/user/.local/lib/janet/spork/getline.janet
add /home/user/.local/lib/janet/spork/data.janet
add /home/user/.local/lib/janet/spork/randgen.janet
add /home/user/.local/lib/janet/spork/generators.janet
add /home/user/.local/lib/janet/spork/htmlgen.janet
add /home/user/.local/lib/janet/spork/init.janet
add /home/user/.local/lib/janet/spork/argparse.janet
add /home/user/.local/lib/janet/spork/ev-utils.janet
add /home/user/.local/lib/janet/spork/temple.janet
add /home/user/.local/lib/janet/spork/channel.janet
add /home/user/.local/lib/janet/spork/cc.janet
add /home/user/.local/lib/janet/spork/rpc.janet
add /home/user/.local/lib/janet/spork/mdz.janet
add /home/user/.local/lib/janet/spork/pgp.janet
add /home/user/.local/lib/janet/spork/http.janet
add /home/user/.local/lib/janet/spork/infix.janet
add /home/user/.local/lib/janet/spork/httpf.janet
add /home/user/.local/lib/janet/spork/path.janet
add /home/user/.local/lib/janet/spork/math.janet
add /home/user/.local/lib/janet/spork/regex.janet
add /home/user/.local/lib/janet/spork/stream.janet
add /home/user/.local/lib/janet/spork/fmt.janet
add /home/user/.local/lib/janet/spork/cron.janet
add /home/user/.local/lib/janet/spork/msg.janet
add /home/user/.local/lib/janet/spork/tasker.janet
add /home/user/.local/lib/janet/spork/netrepl.janet
add /home/user/.local/lib/janet/spork/cmath.a
add /home/user/.local/lib/janet/spork/cmath.so
add /home/user/.local/lib/janet/spork/src___tarray.o
add /home/user/.local/lib/janet/spork/src___cmath.static.o
add /home/user/.local/lib/janet/spork/tarray.so
add /home/user/.local/lib/janet/spork/tarray.a
add /home/user/.local/lib/janet/spork/rawterm.a
add /home/user/.local/lib/janet/spork/src___zip.o
add /home/user/.local/lib/janet/spork/crc.so
add /home/user/.local/lib/janet/spork/zip.a
add /home/user/.local/lib/janet/spork/rawterm.so
add /home/user/.local/lib/janet/spork/crc.a
add /home/user/.local/lib/janet/spork/src___rawterm.o
add /home/user/.local/lib/janet/spork/src___tarray.static.o
add /home/user/.local/lib/janet/spork/json.a
add /home/user/.local/lib/janet/spork/deps___miniz___miniz.static.o
add /home/user/.local/lib/janet/spork/src___rawterm.static.o
add /home/user/.local/lib/janet/spork/deps___miniz___miniz.o
add /home/user/.local/lib/janet/spork/src___utf8.static.o
add /home/user/.local/lib/janet/spork/src___cmath.o
add /home/user/.local/lib/janet/spork/src___base64.static.o
add /home/user/.local/lib/janet/spork/json.so
add /home/user/.local/lib/janet/spork/src___crc.o
add /home/user/.local/lib/janet/spork/src___utf8.o
add /home/user/.local/lib/janet/spork/utf8.a
add /home/user/.local/lib/janet/spork/zip.so
add /home/user/.local/lib/janet/spork/src___json.static.o
add /home/user/.local/lib/janet/spork/src___json.o
add /home/user/.local/lib/janet/spork/utf8.so
add /home/user/.local/lib/janet/spork/src___crc.static.o
add /home/user/.local/lib/janet/spork/src___zip.static.o
add /home/user/.local/lib/janet/spork/src___base64.o
installed spork
"spork"
repl:2:> (use spork)
error: could not find module ./base64:
    /home/user/.local/lib/janet/spork/base64.jimage
    /home/user/.local/lib/janet/spork/base64.janet
    /home/user/.local/lib/janet/spork/base64/init.janet
    /home/user/.local/lib/janet/spork/base64.so
  in require-1 [boot.janet] on line 3017, column 20
  in import* [boot.janet] on line 3061, column 15
  in thunk [/home/user/.local/lib/janet/spork/init.janet] (tail call) on line 4, column 1
  in dofile [boot.janet] (tail call) on line 2992, column 7
  in source-loader [boot.janet] on line 3004, column 15
  in require-1 [boot.janet] on line 3028, column 18
  in import* [boot.janet] (tail call) on line 3061, column 15

FWIW, there is some related discussion here.