@@ -46,6 +46,8 @@ endif::[]
4646:since-0-4: image:https://img.shields.io/badge/since-0.4-8be[Since 0.4,float=right]
4747:since-0-5: image:https://img.shields.io/badge/since-0.5-8be[Since 0.5,float=right]
4848:since-0-6: image:https://img.shields.io/badge/since-0.6-8be[Since 0.6,float=right]
49+ :since-0-7: image:https://img.shields.io/badge/since-0.7-8be[Since 0.7,float=right]
50+ :since-0-8: image:https://img.shields.io/badge/since-0.8-8be[Since 0.8,float=right]
4951
5052= Eldev
5153
@@ -297,7 +299,8 @@ Two most important global options to remember are `--trace` (`-t`) and
297299information about what it is doing to stdout. With the second, Eldev
298300prints stacktraces for most errors. These options will often help you
299301figure out what’s going wrong without requesting any external
300- assistance.
302+ assistance. Also check out section on <<debugging-features,various
303+ debugging features>> discussed later.
301304
302305Eldev mostly follows GNU conventions in its command line. Perhaps the
303306only exception is that global options must be specified before command
@@ -399,6 +402,38 @@ from affecting your Emacs and, finally, to simplify testing of certain
399402* Eldev supports <<different-emacs-versions,executing on different
400403 Emacs version>> for the same project without any additional steps.
401404
405+ === Using preinstalled dependencies
406+
407+ {since-0-8} Starting with version 0.8 you can opt out of some of the
408+ default project isolation features and use preinstalled dependencies,
409+ e.g. those from your normal Emacs. To activate this mode, use global
410+ option `--external` (`-X`), e.g.:
411+
412+ $ eldev -X test
413+
414+ In this mode Eldev will expect dependencies to be installed in given
415+ directory (standard Emacs location — `~/.emacs.d/elpa` — is only the
416+ default: you can use another directory). If a dependency is not
417+ installed, Eldev _will not_ install it on its own: it doesn’t know
418+ which package archives should be used. Likewise, it will not upgrade
419+ anything. In all such cases, i.e. when required dependencies are not
420+ correctly preinstalled in the specified external directory, Eldev will
421+ simply fail.
422+
423+ <<local-dependencies,Local dependencies>> discussed later take
424+ precedence even in this mode: anything declared as local will override
425+ dependencies available from an external directory, just like it will
426+ in usual full isolation mode.
427+
428+ This mode can be useful to load exactly the same dependency versions
429+ as those installed in your normal Emacs. However, it is not suitable
430+ for continuous integration or for working on packages that you do not
431+ have — for whatever reason — installed normally. It is also difficult
432+ to test on <<different-emacs-versions,different Emacs versions>> in
433+ external directory mode. Therefore, it is not the default. But, as
434+ usual in Eldev, you can make it the default in file `~/.eldev/config`
435+ if you want.
436+
402437
403438== Project dependencies
404439
@@ -594,9 +629,9 @@ dependencies, but also with common development tools used by the
594629project during development, for example <<buttercup,Buttercup>> or
595630<<linting,various linters>>. This works exactly the same as for
596631project dependencies, with the only exception that the tool must be
597- installed first. E.g, for Buttercup you need to <<testing,test>> your
598- project at least once, so that Eldev knows about the need for this
599- tool.
632+ installed first. E.g. , for Buttercup you need to <<testing,test>>
633+ your project at least once, so that Eldev knows about the need for
634+ this tool.
600635
601636Development tools are installed from package archives hardcoded inside
602637Eldev, regardless of which archives you have configured for your
@@ -1087,8 +1122,10 @@ When a test is failing, a backtrace of the failure is printed. You
10871122can affect its readability and completeness using options `-b`
10881123(`--print-backtrace`, the default) and `-B` (`--omit-backtraces`).
10891124The first option accepts your screen width as an optional parameter;
1090- backtrace lines get cut to the specified width. Special value of 0
1091- (the default in Eldev) disables truncation of backtrace lines. Second
1125+ backtrace lines get cut to the specified width. (Since 0.7 this can
1126+ also be specified as a global option that additionally affects all
1127+ other backtraces that are printed by Eldev.) Special value of 0 (the
1128+ default in Eldev) disables truncation of backtrace lines. Second
10921129option, `-B`, is surprisingly useful. In many cases backtraces don’t
10931130actually give any useful information, especially when the tests
10941131contain only a single assertion, and only clutter the output. If you
@@ -1147,8 +1184,7 @@ Things that won’t work with Buttercup at the moment:
11471184
11481185* option `--stop-on-unexpected` (`-s`);
11491186* specifying screen width with option `--print-backtraces` (`-b`): it
1150- will always work as if 80 was specified;
1151- * option `--omit-backtraces` (`-B`).
1187+ will always work as if 80 was specified.
11521188
11531189Unlike <<ert,ERT>>, Buttercup also has no special selectors that base
11541190on the previous run’s results.
@@ -1616,6 +1652,60 @@ your source warning-free today, it might detect problems tomorrow.
16161652 $ eldev -dtT lint re
16171653
16181654
1655+ [#debugging-features]
1656+ == Debugging features
1657+
1658+ Eldev comes with lots of different options and other features that can
1659+ help you debug problems both in your project, Eldev itself or your
1660+ Eldev scripts.
1661+
1662+ * Global options `-t` (`--trace`), `-v` (`--verbose`) and `-q`
1663+ (`--quiet`) control the amount of output Eldev generates. The first
1664+ one makes Eldev extra verbose, helping you to understand what it is
1665+ doing and at which step something goes wrong.
1666+
1667+ * Global option `-d` (`--debug`) makes Eldev print backtrace if it
1668+ dies with a Elisp signal (except certain well-defined and explained
1669+ errors like missing dependency).
1670+
1671+ * {since-0-3} Global option `-Q` (`--backtrace-on-abort`) makes Eldev
1672+ print backtrace if it is aborted with `^C`. This is useful if your
1673+ project freezes or has very bad performance, and you want to figure
1674+ where exactly this happens.
1675+
1676+ * {since-0-7} Global option `-b` (`--backtrace`) lets you adapt
1677+ backtraces to your screen width and thus make them more readable at
1678+ the expense of completeness (by default, Eldev doesn’t truncate
1679+ backtrace lines). It is a good idea to change the default in file
1680+ `.eldev/config`.
1681+
1682+ * Global option `-T` (`--time`) prepends timestamps to all lines of
1683+ Eldev output, making it easier to spot performance problems.
1684+
1685+ * Command `prepare` can be used to install all project dependencies —
1686+ and thus check if they and package archives are specified correctly
1687+ — without doing anything else.
1688+
1689+ * Commands `deps` (`dependencies`) and `dtree` (`dependency-tree`) can
1690+ be used to display list or tree of project dependencies, which is
1691+ especially useful for large projects unfamiliar to you.
1692+
1693+ * For many errors, Eldev will print additional hints (unless you
1694+ specify option `--quiet`). For example: if an error happens during
1695+ evaluating file `Eldev`, the tool will mention this; if a dependency
1696+ cannot be installed, Eldev will mention what required this
1697+ dependency (can be non-obvious in larger packages).
1698+
1699+ * While not a direct feature of Eldev itself, file `Eldev-local`
1700+ provides a good place to install temporary advices, overwrite Emacs
1701+ functions etc. in the process of debugging certain problems.
1702+
1703+ * You can temporarily add calls to `eldev-warn`, `eldev-backtrace` and
1704+ other Eldev functions to the tests in your project to provide
1705+ additional output. But it is a good idea to do this only while
1706+ debugging and avoid committing such changes.
1707+
1708+
16191709== Plugins
16201710
16211711{since-0-3} Plugins are activatable extensions to Eldev functionality.
0 commit comments