Cant' install codeberg package with package! macro

What happened?

I’ve tried to run doom sync but the package! macro, fails like this:

> Synchronizing "default" profile...
  > Regenerating envvars file
    ✓ Generated ~/.emacs.d/.local/env
  > Installing packages...
    > Updating recipe repos...
    > Cloning tree-sitter-indent.el.git (for tree-sitter-indent)...
    x There was an unexpected runtime error
      Message: Malformed protocol detected: (:host codeberg :repo "")
        (error "Malformed protocol detected: (:host %S :repo %S)" codeberg "
        (progn (error "Malformed protocol detected: (:host %S :repo %S)" host repo))
        (if (string-match-p ":" repo) (progn (error "Malformed protocol detected: (:host %S :repo %...
        (let nil (if (string-match-p ":" repo) (progn (error "Malformed protocol detected: (:host %...
        (cond ((null host) (let nil repo)) ((let ((host host)) (alist-get host straight-hosts)) (le...
        (straight-vc-git--encode-url "" co...
        (let ((success nil) (repo-dir (straight--repos-dir local-repo)) (url (straight-vc-git--enco...
        (let ((package (plist-get --recipe-- ':package)) (local-repo (plist-get --recipe-- ':local-...
        (let ((--recipe-- recipe)) (let* ((--cl-rest-- --recipe--) (upstream (car (cdr (plist-membe...
        (straight-vc-git-clone (:type git :repo "
        (apply straight-vc-git-clone ((:type git :repo "
        (let ((func (intern (format "straight-vc-%S-%S" type method)))) (if (fboundp func) nil (let...
      ! Wrote extended backtrace to ~/.emacs.d/.local/logs/cli.doom.220909112137.76716.error
    ! Script was abruptly aborted, leaving Doom in an incomplete state!
    - Run 'doom sync' to repair it.

This is the recipe

(package! tree-sitter-indent
  :recipe (:type git
           :repo ""
           :branch "main"
           :files ("tree-sitter-indent.el")))

This recipe was previously working.

What did you expect to happen?

I expected the package to be installed.

Steps to reproduce

  1. Copy this recipe:
(package! tree-sitter-indent
  :recipe (:type git
           :repo ""
           :branch "main"
           :files ("tree-sitter-indent.el")))
  1. Add it to your packages.el
  2. Run doom sync.

System information

Loading data dump...

This was already fixed as part of

If updating Doom does not fix it, try reinstalling your packages. Straight seems to refuse to update for some folks.

$ rm -rf ~/.emacs.d/.local/straight
$ doom sync

Hi Henrik!

Thanks for answering.

I’ve commented the package recipe and then did doom upgrade, deleted the .local/straight folder, and then ran doom sync and everything worked fine.

I then uncommented the package but it still does not work, I get the same output.

When the full :repo URL is passed, we have to pass :host nil as well. I learned that from straight’s .

That worked! :smiley:

Thank you very much

1 Like

Glad it was resolved! As an addendum, straight also has a new codeberg fetcher (which is what was added in the commit I linked), so this recipe will work too:

(package! tree-sitter-indent
  :recipe (:host codeberg
           :repo "FelipeLema/tree-sitter-indent.el"
           :branch "main"
           :files ("tree-sitter-indent.el")))

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.