janet-lang / jpm

Janet Project Manager
MIT License
72 stars 22 forks source link

Bug: `--local` is not recognized by `jpm build` #8

Closed subsetpark closed 3 years ago

subsetpark commented 3 years ago

jpm version: cf6086ae3b282046141fd7b6fbd1d08edcb85fdd

encountered behaviour

jpm -l deps installs dependencies to the local tree:

code-src/bagatto [master!] ⊕ jpm -l deps
...
copying mago.janet to /home/zax/code-src/bagatto/jpm_tree/lib...

However, build looks in the central tree:

code-src/bagatto [master!] ⊕ jpm -l build                                                                                                         generating executable c source build/bag.c from main.janet...                                                                  
error: could not find module temple:
    /usr/lib64/janet/temple.jimage
    /usr/lib64/janet/temple.janet
    /usr/lib64/janet/temple/init.janet
    /usr/lib64/janet/temple.so
  in require-1 [boot.janet] on line 2675, column 20
  in import* [boot.janet] on line 2714, column 15
  in _thunk [main.janet] (tailcall) on line 1, column 1
  in dofile [boot.janet] on line 2652, column 7
  in <anonymous> [/usr/lib64/janet/jpm/cc.janet] on line 265, column 24
  in <anonymous> [/usr/lib64/janet/jpm/rules.janet] on line 18, column 20
  in executor [/usr/lib64/janet/jpm/rules.janet] on line 25, column 8
  in worker [/usr/lib64/janet/jpm/dagbuild.janet] on line 65, column 23
  in <anonymous> [/usr/lib64/janet/jpm/dagbuild.janet] on line 21, column 43
  in pmap [/usr/lib64/janet/jpm/dagbuild.janet] on line 26, column 7
  in pdag [/usr/lib64/janet/jpm/dagbuild.janet] (tailcall) on line 71, column 3
  in _thunk [/usr/local/bin/jpm] on line -1, column -1
  in cli-main [boot.janet] on line 3618, column 39

expected behaviour

when running jpm -l build, Janet should set syspath to ./jpm_tree/lib.

pepe commented 3 years ago

I just went here with the same issue as I tried to reproduce your baggato thread woes from https://github.com/janet-lang/janet/issues/778#issuecomment-910478541.

But for some other projects of mine, jpm -l build works as intended.

It did, only because I had the libraries installed globally.

OT: Now, I cannot uninstall global pkgs with jpm installed with the old bundled version. I will investigate more and report on another issue if this is the case.