janet-lang / jpm

Janet Project Manager
MIT License
68 stars 22 forks source link

Unable to install dependencies from lockfile #25

Closed Jakski closed 2 years ago

Jakski commented 2 years ago

Problem description

JPM fails to use lockfile, e.g.:

$ jpm -l deps
...
$ jpm -l make-lockfile
created lockfile.jdn
$ rm -rf jpm_tree/
$ jpm -l load-lockfile
cloning repository https://github.com/janet-lang/spork.git
 to /opt/dev/project1/jpm_tree/lib/.cache/git_c1953f6d01cedfaea78a0c54b7748e33823a8592
_https___github.com_janet-lang_spork.git

Cloning into '/opt/dev/project1/jpm_tree/lib/.cache/git_c1953f6d01cedfaea78a0c54b7748e33823a8592
_https___github.com_janet-lang_spork.git
'...
warning: url contains a newline in its path component: https://github.com/janet-lang/spork.git
/
fatal: credential url cannot be parsed: https://github.com/janet-lang/spork.git
/
error: command failed with non-zero exit code 128
  in os/execute [src/core/os.c] on line 1031
  in shell [/opt/installs/janet/ref-f0da793f9988a053b1dff61d2e6acc5edd0ac94b/lib/janet/jpm/shutil.janet] (tailcall) on line 109, column 5
  in download-git-bundle [/opt/installs/janet/ref-f0da793f9988a053b1dff61d2e6acc5edd0ac94b/lib/janet/jpm/pm.janet] on line 136, column 7
  in download-bundle [/opt/installs/janet/ref-f0da793f9988a053b1dff61d2e6acc5edd0ac94b/lib/janet/jpm/pm.janet] on line 165, column 10
  in bundle-install [/opt/installs/janet/ref-f0da793f9988a053b1dff61d2e6acc5edd0ac94b/lib/janet/jpm/pm.janet] on line 177, column 13
  in load-lockfile [/opt/installs/janet/ref-f0da793f9988a053b1dff61d2e6acc5edd0ac94b/lib/janet/jpm/pm.janet] (tailcall) on line 244, column 5
  in _thunk [/opt/installs/janet/ref-f0da793f9988a053b1dff61d2e6acc5edd0ac94b/bin/jpm] (tailcall) on line -1, column -1
  in cli-main [boot.janet] on line 3644, column 17

project.janet

(declare-project
  :name "project1"
  :description "<hidden>"
  :dependencies [
                 {
                  :url "https://github.com/janet-lang/spork.git"
                  :tag "c1953f6d01cedfaea78a0c54b7748e33823a8592"
                  }
                 {
                  :url "https://github.com/janet-lang/json.git"
                  :tag "c24d1b7b15f9c576e0d48bb78b351e88ce51cfcd"
                  }
                 ])

(declare-source
  :source ["main.janet" "util.janet"])

(declare-executable
  :name "project1"
  :entry "main.janet")

Environment

Janet installation commit: https://github.com/janet-lang/janet/commit/f0da793f9988a053b1dff61d2e6acc5edd0ac94b (latest as of today) JPM installation commit: https://github.com/janet-lang/jpm/commit/46c6fc8304f1f18b2af778b037f49426751705e0 (latest as of today) Operating system: Debian GNU/Linux 11 (bullseye) Architecture: x86_64

Jakski commented 2 years ago

jpm -l load-lockfile works properly after merging https://github.com/janet-lang/jpm/pull/26 .