tarao / el-get-lock Goto Github PK
View Code? Open in Web Editor NEWLock El-Get package repository versions
Lock El-Get package repository versions
Hi,
If I initialize like the below:
(el-get-bundle tarao/el-get-lock (el-get-lock))
I get an error on the 2nd and subsequent loads of emacs:
error: El-get can not find a recipe for package "auth-source-xoauth2"
However if I change only this single line to the below keeping everything else identical:
(el-get-bundle tarao/el-get-lock)
(el-get-lock)
This works fine.
I know the instructions recommend the later way - just wondering why the doing the initialization inside the el-get-bundle
call doesn't work?
Also can you confirm if the order of el-get-lock-package-versions
in the el-get.lock
file is expected to make any difference when loading?
Thanks - and great package by the way :-)
el-get-bundle
と el-get-lock
を組み合わせて導入すると、二回目移行の起動時に初期化が行われない場合があります。
el-get.lock
が生成されていない状態で、 (el-get-lock)
をした上で (el-get-bundle)
を使ってパッケージのインストールを行うと、
el-get-status-file
には :checksum
が無く :after
は nil
の状態で保存されます。
この状態で再起動すると、初期化の際に https://github.com/dimitri/el-get/blob/master/el-get.el#L381 が呼ばれ、これは el-get-status-file
から読み込まれます。
直前の https://github.com/dimitri/el-get/blob/master/el-get.el#L377-L378 この部分で el-get-status-file
が更新されていれば問題ないのですが、 el-get-bundle
のスコープで定義された el-get-sources
( :after
と :checksum
つき)と el-get-status-file
の内容をマージするとき https://github.com/dimitri/el-get/blob/master/el-get-status.el#L364-L373 に、 :checksum
の有無が異なるために更新が行われず、
結果として :after nil
で :checksum
が無い source
を元に初期化が行われてしまいます。
el-get-read-package-status-recipe
に :checksum
をつけるようアドバイスする:
(defun el-get-lock-ad-read-package-status-recipe (orig-func &rest args)
(let* ((recipe (apply orig-func args))
(package (first args))
(checksum (el-get-checksum package)))
(if (plist-get recipe :checksum)
recipe
(plist-put recipe :checksum checksum))))
(advice-add #'el-get-read-package-status-recipe :around #'el-get-lock-ad-read-package-status-recipe)
もしくは、el-get-status-file
に checksum
も記録するように hook を仕込む:
(defun el-get-lock-save-installed-version-to-status (package)
(let* ((name (if (stringp package) package (el-get-source-name package)))
(checksum (ignore-errors (el-get-checksum name)))
(version (and checksum (list :checksum checksum)))
(recipe (el-get-package-def name)))
(when (and version (not (plist-get recipe :checksum)))
(el-get-save-package-status name "installed" (append version recipe)))))
(add-hook 'el-get-post-install-hooks #'el-get-lock-save-installed-version-to-status)
どちらかで対応できそうでした。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.