cask / cask Goto Github PK
View Code? Open in Web Editor NEWProject management tool for Emacs
Home Page: http://cask.readthedocs.io
License: GNU General Public License v3.0
Project management tool for Emacs
Home Page: http://cask.readthedocs.io
License: GNU General Public License v3.0
Add doc command and directive that generates documentation.
files
directivecask doc
or cask docs
doc
or docs
folder(setq package-user-dir (expand-file-name "elpa" carton-project-path))
clobbers the the user's custom package-user-dir
. It'd probably be better if it derived its value from the existing value.
Add Travis CI support. I'm thinking something like this:
carton travis [options]
Let's discuss the new directives and commands that should be added to make Cask useful as a project management tool instead of a dependency management tool (see #82). When we all agree, we create one issue per directive/command and add to the 0.6
milestone.
build
- byte compile projectdoc
- create documentationtest
- run testslink
- link to local package (see #25)package
- create tar package of project, including documentationfiles
- list of files to include in builddocs
- list of doc filesMake a command to easily upgrade Cask and its dependencies.
bin/cask uses $EMACS as the emacs executable if it is set. Inside an emacs shell EMACS is set to a string that is not the path for the emacs executable.
When I start an emacs shell or term, EMACS is set to 24.3.50.1 (term:0.96)
. According to the Emacs manual, EMACS should be set to t
:
Emacs also sets the
EMACS' environment variable to
t' if it is not
already defined. Warning: This environment variable is deprecated.
Programs that check this variable should be changed to check
`INSIDE_EMACS' instead.
Could a different name be used for the variable that contains the path the emacs so that cask can work inside an emacs shell?
Add packages such as s
, f
and dash
as bootstrap packages and use them in cask-cli.el
and cask.el
.
It would be great if I can install packages for development against multiple Emacs versions. My idea is to use .carton/$EMACS/
directory instead of elpa/
. Probably it's better to use version number instead of $EMACS
as it can be full path to the Emacs executable.
This needs to be done before a v0.4
release:
It just came to my attention, that Emacs snapshot tracks all versions of a package across all archives. However, EPL ignores any but the most recent package.
In and by itself that's no problem, because package.el returns the most recent package front up, hence updates incidentally work well, hence labeled as “enhancement”, and not assigned to 0.4 milestone.
epl-find-available-package
should be renamed to epl-find-available-packages
, and return a list of all packages for the given name, by version number in descending order. The legacy EPL would just return a list containing the single available package.
Primarily a reminder to myself.
Add package command that build a tar file of files and docs.
cask package
dist
directory. Add option to change this path.From http://melpa.milkbox.net/. Something we need to take care of?
In Emacs < 24, you'll also need to explicitly include the GNU ELPA archive, which provides important compatibility libraries like cl-lib:
(when (< emacs-major-version 24) (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
Add doc/docs directive.
(doc &rest files)
or (docs &rest files)
doc
/docs
be default path for documentation?In bin-carton-in-emacs-lisp
(https://github.com/rejeep/carton/tree/bin-carton-in-emacs-lisp), Carton depends on commander.el
to parse commands and options.
When installing Carton, to be able to use it, a carton install
is required. But how is that done without Carton installed...?
One solution is to include commander.el
in Carton and remove s
and dash
as dependencies from commander.el
.
Any other solutions?
i mean, can such package managing like carton be implemented purely in .el file? so that it shall work for emacs version for all OSs?
thanks!
Do you think anything can be done about noisy output like this in travis logs?:
Reading [application/x-tar]... 2k of 103k (2%)
Reading [application/x-tar]... 5k of 103k (5%)
Reading [application/x-tar]... 6k of 103k (6%)
Reading [application/x-tar]... 7k of 103k (7%)
Reading [application/x-tar]... 10k of 103k (10%)
Reading [application/x-tar]... 13k of 103k (13%)
Reading [application/x-tar]... 14k of 103k (14%)
Reading [application/x-tar]... 17k of 103k (17%)
Reading [application/x-tar]... 18k of 103k (18%)
Reading [application/x-tar]... 21k of 103k (21%)
Reading [application/x-tar]... 25k of 103k (25%)
Reading [application/x-tar]... 25k of 103k (25%)
Reading [application/x-tar]... 27k of 103k (26%)
Reading [application/x-tar]... 28k of 103k (28%)
Reading [application/x-tar]... 32k of 103k (31%)
Reading [application/x-tar]... 32k of 103k (32%)
Reading [application/x-tar]... 34k of 103k (33%)
Reading [application/x-tar]... 35k of 103k (34%)
Reading [application/x-tar]... 39k of 103k (38%)
Reading [application/x-tar]... 41k of 103k (40%)
Reading [application/x-tar]... 42k of 103k (41%)
Reading [application/x-tar]... 44k of 103k (43%)
Reading [application/x-tar]... 47k of 103k (45%)
Reading [application/x-tar]... 49k of 103k (48%)
Reading [application/x-tar]... 51k of 103k (49%)
Reading [application/x-tar]... 52k of 103k (51%)
Reading [application/x-tar]... 55k of 103k (53%)
Reading [application/x-tar]... 56k of 103k (55%)
Reading [application/x-tar]... 59k of 103k (58%)
Reading [application/x-tar]... 61k of 103k (59%)
Reading [application/x-tar]... 65k of 103k (63%)
Reading [application/x-tar]... 66k of 103k (64%)
Reading [application/x-tar]... 68k of 103k (66%)
Reading [application/x-tar]... 71k of 103k (68%)
Reading [application/x-tar]... 72k of 103k (70%)
Reading [application/x-tar]... 76k of 103k (74%)
Reading [application/x-tar]... 78k of 103k (75%)
Reading [application/x-tar]... 82k of 103k (79%)
Reading [application/x-tar]... 82k of 103k (79%)
Reading [application/x-tar]... 83k of 103k (81%)
Reading [application/x-tar]... 85k of 103k (82%)
Reading [application/x-tar]... 86k of 103k (83%)
Reading [application/x-tar]... 88k of 103k (85%)
Reading [application/x-tar]... 89k of 103k (86%)
Reading [application/x-tar]... 92k of 103k (89%)
Reading [application/x-tar]... 93k of 103k (90%)
Reading [application/x-tar]... 96k of 103k (93%)
Reading [application/x-tar]... 97k of 103k (94%)
Reading [application/x-tar]... 99k of 103k (96%)
Reading [application/x-tar]... 102k of 103k (98%)
Reading [application/x-tar]... 103k of 103k (100%)
Reading... done.
Wrote /home/travis/build/tarsius/emacs-plugin-template/elpa/ert-0/ert.el
Wrote /home/travis/build/tarsius/emacs-plugin-template/elpa/ert-0/ert-pkg.el
Start fake ELPA server (make server
) automatically running tests and stop after.
I'd like to do some development based on carton, but I would need it to be available via Emacs' package system. Is there any reason why it's not (I'm guessing this might be to do with the presence of the binary carton
command)?
See #83
Add support for hooks. This basically means that another package should be able to hook in to Cask.
A concrete example of this is the cask test
command (not yet implemented), which should run tests, but Cask should not know of any specific test frameworks. Instead, the testing framework should add a testing hook which will register what to do when running tests for that framework.
There were perl command named carton before this project. I have seen users confusing the project and perl people complaining because they can't have two commands with the same name.
As the perl project is older and has more starts, I suggest to rename this project. What do you think?
During a carton
, I get this:
Contacting host: melpa.milkbox.net:80
Error during download request: Not Found
It doesn't say what package isn't found, however. I guess it tries to download dependencies in order, and that I can then decipher which package was install prior by deciphering the output of the compilation, but it would be very nice to know up front what packages are being fetched. Maybe just a header printed out "Downloading dash 1.3.2" or something. :)
Add test command that runs all tests. This command requires hooks (see #84). A testing framework (ecukes
, ert-runner
) can then add a test hook so that when the cask test command runs, the tests runs.
cask test [args]
cask test [args] --build
cask test [args] --package
Add outdated
command that show list of outdated packages.
I think there are two decent unit tests (that both happen to use mocker.el): test-carton-package-user-dir-when-not-custom and test-carton-package-user-dir-when-custom. These should be written as Ecukes tests instead.
-- @rejeep (#38 (comment))
Add alias for most common sources:
(source "melpa" "http://melpa.milkbox.net/packages/")
(source "marmalade" "http://marmalade-repo.org/packages/")
vs.
(source 'melpa)
(source 'marmalade)
How do we make sure bootstrap packages are up to date?
Hide hideous (mostly package) output and only print our own. On fail, write to log for debugging.
Add make compile
task which is a part of the test suite. This is to make sure there are no compilation warnings/errors.
... or environment variable, if it is easier.
If we have this, we can run test with multiple Emacs versions in parallel.
Discussion branched from #38 (comment)
carton install
should take arguments which are packages to install.
There has been already a tool named carton and it provides features like Bundler to Perl.
carton has been widely used in Perl community, of course including Emacs users like me ;), so it'll be happy to everyone if you change the name of this tool.
Add link command (like npm link
).
cask link [package]
v0.4
Make sure carton exec
returns proper exit code.
Ideally we would be able to create a Cask.lock
file with exact versions, but ELPA does not support multiple versions (madness I say). It's obviously really annoying that a bug in some other project can break my project when I install or update. So many times have I done an update to break my Emacs configuration without being able to go back and the only solution is to disable some plugin until the bug is fixed.
Here are a few solutions that makes things a little bit better.
--archive
option (a message could be used instead of a date)archive/stash/...
that saves the current build with a message.For all solutions, we would add a command apply/checkout/...
that replaces the current build with the saved one.
Thoughts?
Hey there!
Thanks for the great emacs package manager! Just what I was looking for :3 Excited to continue to use it as I rewrite my dotfiles from scratch :)
After installing, I noticed that my version of emacs was complaining about a missing package.el (which I've read is built into emacs24). Attempting to run carton commands resulted in the following:
Loading 00debian-vars...
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...
Cannot open load file: package
I suspect that this was because running carton was doing so through the emacs batch mode, which was not loading my personal emacs configuration (~/.emacs nor ~/.emacs.d/init.el)
I resolved this by running adding a --user option to the batch command, which apparently loads my emacs configuration :P
I'll attach a corresponding pull request shortly, though the solution does feel a bit brittle; just a quick fix so that I can continue fixing my emacs config :)
I am getting a "Symbol's function definition is void: package-desc-vers" error when running carton agaist Emacs trunk.
GNU Emacs 24.3.50.1 (i386-apple-darwin12.4.0, NS apple-appkit-1187.39) of 2013-07-28
This is just a reminder to update the ZSH completion with newly added commands before releasing v0.4
.
A few suggestions.
Currently, writing an incorrect Cask file (missing paren, for example) gives a not very helpful message.
Plus, the new syntax (source melpa)
is handy but the command (source "melpa")
should also be valid as it is more consistent with other statements of the DSL.
What do you think?
Add files directive.
(files &rest patterns)
f-glob
patternsbin/*
*.el
templates/*.tpl
Running carton exec elpa/ecukes-20121008.1707/ecukes features
on Ubuntu with emacs snapshot gives:
Invalid function: #[0 "��" [nil] 1 "
(fn)"]
make: *** [all] Error 255
Since I run my CI-tests on Emacs 23 (no package.el) and emacs-snapshot, I couldn't get carton to work on either one. :-P
The full trace can be found here:
https://travis-ci.org/magnars/js2-refactor.el/builds/3254297
In my CI scripts today, Cask fetches all dependencies from melpa. However, the package under test is run from the checked out source code.
Now, sometimes thing break in byte compilation. Other times the melpa receipe is wrong. This results in green CI, and failing package installs.
What I would like to accomplish is this:
This way we get to check both byte compilation and melpa receipe in CI.
Now, I'm not sure if this belongs in Cask. Or in Melpa. Or someplace else entirely. But it would certainly have avoided yesterdays nasty business (melpa/melpa#957)
Add build command that byte compiles the specified files.
cask build
files
directivebuild
directoryfiles
directive that are not Elisp files be moved to the build directory?Must be able to force update single package.
$ carton update package
In the README, the recommended method to use Carton is:
(require 'package)
(setq package-user-dir
(locate-user-emacs-file (format ".carton/%s/elpa/" emacs-version)))
(package-initialize)
and the alternate is:
(require 'carton "~/.carton/carton.el")
(carton-initialize)
There is a downside with the default, which is that the sources are not added. I still want to be able to install packages from within Emacs, mostly for trying it out before adding it to the Carton file.
Packages such as https://github.com/rdallasgray/pallet also need the source and for that it needs Carton, which in the primary method is not required.
Should we use the alternate version and not even include primary?
When running carton update
, when done, show list of updated packages and their new (and old) version.
Cask 0.4 does not longer work when installed as root, but used from a normal account, because it attempts to write to its installation directory during the bootstrap process.
I didn't think of this before, but now that I do, I don't like this. Programs should just not write to their installation directory, and Cask is no exception to the rule.
Instead of bootstrapping at $INSTALLDIR/.cask
, we should rather bootstrap at $XDG_DATA_HOME/.cask
, defaulting to $HOME/.local/share/.cask
, in compliance with XDG Base Directory Spec.
In any case, we broke root installations. They used to work, but they don't work anymore now. So I'd like to make clear once and for all, whether we should actually support Cask being installed as root (or generally, system-wide as opposed to $HOME
).
I think we definitely should, for various reasons, but YMMV. Opinions?
If we decide to support root installs, we should fix them asap. Basically, redirecting the bootstrap directory should be all that needs to be done.
The branch bin-carton-in-emacs-lisp is slowly shaping up. It would be awesome if someone else could take a look (ping @tkf, @lunaryorn). There are most likely a few issues I have not found myself, but I could use some help finding them.
@lunaryorn I noticed that the Ecukes tests do not pass for snapshot (see https://travis-ci.org/rejeep/carton/jobs/8474140). I think you mentioned you are running snapshot. It would be awesome if you could take a look at it. I'll try to install it myself and see as well.
Related issues:
Windows support
Carton bootstrap dependencies
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.