radian-software / straight.el

🍀 Next-generation, purely functional package manager for the Emacs hacker.
MIT License
2.75k stars 151 forks source link

[Support] Malformed protocol detected: (:host github :repo \"...") #1052

Closed wakatara closed 1 year ago

wakatara commented 1 year ago

What's wrong

When I try to grab xeft from sourcehut I am getting a malformed protocol detected error. This was working fine previously, but I just nuked my straight directory and recompiled everything when moving between diff emacsen. Strangely, this worked quite fine last week.

Directions to reproduce

(straight-use-package
 '(xeft :repo "https://git.sr.ht/~casouri/xeft"
        :files  (:defaults "*.h" "Makefile" "xapian-lite.cc")))

Yields the following error report:

Debugger entered--Lisp error: (error "Malformed protocol detected: (:host github :repo \"...")
  signal(error ("Malformed protocol detected: (:host github :repo \"..."))
  error("Malformed protocol detected: (:host %S :repo %S)" github "https://git.sr.ht/~casouri/xeft")
  straight-vc-git--encode-url("https://git.sr.ht/~casouri/xeft" github nil)
  straight-vc-git-clone((:repo "https://git.sr.ht/~casouri/xeft" :files (:defaults "*.h" "Makefile" "xapian-lite.cc") :host github :package "xeft" :type git :local-repo "xeft") nil)
  apply(straight-vc-git-clone ((:repo "https://git.sr.ht/~casouri/xeft" :files (:defaults "*.h" "Makefile" "xapian-lite.cc") :host github :package "xeft" :type git :local-repo "xeft") nil))
  straight-vc(clone git (:repo "https://git.sr.ht/~casouri/xeft" :files (:defaults "*.h" "Makefile" "xapian-lite.cc") :host github :package "xeft" :type git :local-repo "xeft") nil)
  straight-vc-clone((:repo "https://git.sr.ht/~casouri/xeft" :files (:defaults "*.h" "Makefile" "xapian-lite.cc") :host github :package "xeft" :type git :local-repo "xeft"))
  straight--clone-repository((:repo "https://git.sr.ht/~casouri/xeft" :files (:defaults "*.h" "Makefile" "xapian-lite.cc") :host github :package "xeft" :type git :local-repo "xeft") nil)
  #f(compiled-function () #<bytecode -0xd5284995cf30642>)()
  straight--transaction-exec(use-package-\"493d4b2b246542307dbd7ea26d139c8e\"-nil-nil :now #f(compiled-function () #<bytecode -0xd5284995cf30642>))
  straight-use-package((xeft :repo "https://git.sr.ht/~casouri/xeft" :files (:defaults "*.h" "Makefile" "xapian-lite.cc") :host github))
  eval((straight-use-package '(xeft :repo "https://git.sr.ht/~casouri/xeft" :files (:defaults "*.h" "Makefile" "xapian-lite.cc") :host github)) nil)
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

Latest version of straight.el as I just rebuilt everything from scratch a few minutes ago.

Version information

progfolio commented 1 year ago

Your recipe is inherting the :host keyword from the gnu-elpa-mirror for xeft. Adding :host nil or :inherit nil should bypass the inheritance.

Test Case ```emacs-lisp (straight-bug-report :post-bootstrap (condition-case nil (straight-use-package '(xeft :repo "https://git.sr.ht/~casouri/xeft" :inherit nil :files (:defaults "*.h" "Makefile" "xapian-lite.cc"))) (error (message "recipe source: %S" (straight-recipe-source "xeft"))))) ```
Output ```emacs-lisp Bootstrapping straight.el... Bootstrapping straight.el...done Looking for gnu-elpa-mirror recipe → Cloning melpa... Looking for gnu-elpa-mirror recipe → Cloning melpa...done Looking for nongnu-elpa recipe → Cloning gnu-elpa-mirror... Looking for nongnu-elpa recipe → Cloning gnu-elpa-mirror...done Looking for emacsmirror-mirror recipe → Cloning nongnu-elpa... Looking for emacsmirror-mirror recipe → Cloning nongnu-elpa...done Looking for emacsmirror-mirror recipe → Cloning el-get... Looking for emacsmirror-mirror recipe → Cloning el-get...done Looking for straight recipe → Cloning emacsmirror-mirror... Looking for straight recipe → Cloning emacsmirror-mirror...done Building straight... Building straight...done Test run with version: prerelease (HEAD -> develop, origin/develop) 56a8b6c 2023-02-04 Cloning xeft... Cloning xeft...done Building xeft... Building xeft...done Packages: "straight" n/a develop 56a8b6c 2023-02-04 "org-elpa" n/a n/a "melpa" n/a master cbf839b7 2023-02-14 "gnu-elpa-mirror" n/a master c1eac9a 2023-02-16 "nongnu-elpa" n/a main 85c7a060c6 2023-01-26 "el-get" melpa master bc429903 2023-02-11 "emacsmirror-mirror" n/a master b342c8a 2023-02-16 "xeft" n/a master ea4fa85 2023-02-04 ```
wakatara commented 1 year ago

Worked like a charm. Thank you !!! I was unaware of that switch in that case.