• Stars
    star
    198
  • Rank 196,898 (Top 4 %)
  • Language
    Emacs Lisp
  • License
    GNU General Publi...
  • Created almost 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Elisp development tool

Eldev

License: GPL 3 Latest release MELPA Stable CI

Eldev (Elisp development tool) is an Emacs-based build tool, targeted solely at Elisp projects. It is an alternative to Cask. Unlike Cask, Eldev itself is fully written in Elisp and its configuration files are also Elisp programs. If you are familiar with Java world, Cask can be seen as a parallel to Maven β€” it uses project description, while Eldev is sort of a parallel to Gradle β€” its configuration is a program on its own.

Documentation

πŸ“Ž
Detailed documentation on Eldev features is available online. This page intentionally provides only a brief overview.

Eldev features

Eldev source code itself comes with no examples, but there is a short list of real-world projects in the documentation.

πŸ’‘
If you are using Flycheck, check out flycheck-eldev package. It provides integration between Flycheck and Eldev, allowing the former to automatically use proper dependencies in Eldev projects.

Installation

The easiest and most common way to install Eldev on Linux, macOS, etc. is this shell oneliner:

$ curl -fsSL https://raw.github.com/doublep/eldev/master/webinstall/eldev | sh

This will install eldev script to ~/.local/bin. Usually, this directory should already be in your PATH. But if not, e.g. in ~/.profile add this:

export PATH="$HOME/.local/bin:$PATH"

Documentation lists several other ways to install Eldev, including on Windows. They are not more difficult than the one above.

Safety concerns

πŸ’‘
In general, it is not recommended to execute Eldev, GNU Make, Scons, any other build tool or anything based on one in a directory that contains untrusted code.

Like many (if not most) other development tools, Eldev is unsafe when executed on untrusted code. For example, simply running eldev in a project you have just downloaded from hackerden.org can result in anything, including emptied home directory. For that matter, running make or gradle is not better in this regard. Eldev is perhaps a bit more dangerous, because even eldev help reads file Eldev, thus executing arbitrary code.

Even seemingly harmless things, like opening a .el file in Emacs can lead to unforeseen consequences. If you e.g. have Flycheck enabled everywhere, this will result in byte-compiling said file, which also can execute arbitrary code, for example using (eval-when-compile …​) form. The same holds for installing (not even using!) Elisp packages.

Only use build tools on code that you trust. Better yet, don’t even touch code that you don’t plan running.

Getting started

Eldev comes with built-in help. Just run:

$ eldev help

This will list all the commands Eldev supports. To see detailed description of any of those, type:

$ eldev help COMMAND

In the help you can also see lots of options β€” both global and specific to certain commands. Many common things are possible just out of the box, but later we will discuss how to define additional commands and options or change defaults for the existing.

Two most important global options to remember are --trace (-t) and --debug (-d). With the first one, Eldev prints lots of additional information about what it is doing to stdout. With the second, Eldev prints stacktraces for most errors. These options will often help you figure out what’s going wrong without requesting any external assistance. Also check out section on various debugging features discussed later.

Eldev mostly follows GNU conventions in its command line. Perhaps the only exception is that global options must be specified before command name and command-specific options β€” after it.



















Modifying filesets

❗
Please refer to the full documentation for the reasons of the warning that sent you here. If you are here not because of a warning, just ignore this message.