radian-software / straight.el

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

Cannot install vc-fossil #528

Closed dertuxmalwieder closed 4 years ago

dertuxmalwieder commented 4 years ago

What's wrong

I'm trying to migrate from use-package to straight.el. However, two packages fail. (edit: I fixed the other one myself, it was a configuration mistake.) Trying to install vc-fossil fails:

(use-package vc-fossil
  :ensure t
  :config
  (add-to-list 'vc-handled-backends 'Fossil t))

While use-package worked just well, straight doesn't:

Warning (straight): Could not check out branch "master" of repository "emacs-fossil"

How can I fix that?

Version information

igroen commented 4 years ago

It's just a warning. straight.el cloned the repository but couldn't checkout the master branch because it doesn't exist. Instead the HEAD branch is checked out which points to origin/trunk. So vc-fossil is installed. If you want to get rid of the warning (which you probably only see on initial install) you can specify the repository and branch to use:

(use-package vc-fossil
  :straight (:host github :branch "trunk")
  :config
  (add-to-list 'vc-handled-backends 'Fossil))
dertuxmalwieder commented 4 years ago

Indeed, that fixed it and no further errors appear on pull-all. Thank you!

raxod502 commented 4 years ago

This is actually a long-standing MELPA compatibility bug in straight.el, see #279. That said, it is easy to work around as @igroen outlined. (You actually should be able to get away with just :straight (:branch "trunk") in the use-package form, unless there's a bug.)

CGenie commented 3 years ago

Hello, It turns out the github repository for vc-fossil is not very often maintained. Main development goes on in the fossil repo. See this thread: https://fossil-scm.org/forum/info/428ddb50ea7d8b73761e5ac876f07acd6addc6fefcc4d530a5eaeb1b3cd0978a The repository is here: https://tumbleweed.nu/r/vc-fossil/doc/tip/README.md

Is it possible to have straight.el pull from fossil instead of github? (https://fossil-scm.org/forum/forumpost/8228c6bc7df76eed?t=h)

progfolio commented 3 years ago

It's possible to extend straight.el to utilize other version control systems, but support for fossil is not currently implemented. How to go about that (this would probably make a good separate package, e.g. straight-vc-fossil) is partially documented here:

https://github.com/raxod502/straight.el#version-control-backends

I would be happy to help if you have any interest in writing a package which implements a fossil vc backend.

Another option would be side-stepping all that by creating your own git mirror. You could script it to be updated as often as you want and have straight use that.

https://fossil-scm.org/home/doc/trunk/www/inout.wiki