Hi, I am developing a library that easily transforms JSON alists into EIEIO objects, jeison. It sounds pretty obvious and a duplicate of json.el functionality, but it is a bit trickier than that. Jeison defines more of a declarative way of mapping alist onto an object by specifying how certain EIEIO class slots can be fetched in JSON object.

I had no dependencies till the very last moment where it became too hard avoiding dash.el. I ran my tests in Travis using the following command:

emacs -batch -l jeison.el -l jeison-tests.el -f ert-run-tests-batch-and-exit

dash.el in Travis CI

I found out that magit downloads dash.el like this:

curl -fsSkL -O https://raw.githubusercontent.com/magnars/dash.el/master/dash.el

and byte compiles it in the following manner:

emacs -Q --batch -f batch-byte-compile dash.el

I didn't quite get what I should do after, but even this command fails on my MacOSX:

>>Error occurred processing dash.el: File error (("Cannot open load file" "No such file or directory" "warnings"))

More naive approach:

emacs -batch -l dash.el -l jeison.el -l jeison-tests.el -f ert-run-tests-batch-and-exit

also fails with the following error:

Eager macro-expansion failure: (file-error "Cannot open load file" "No such file or directory" "cl")
Eager macro-expansion failure: (file-error "Cannot open load file" "No such file or directory" "cl")
Cannot open load file: No such file or directory, cl

So the question is: What is the easiest way to download and use an external package while testing your package in Travis?

  • The builtin Emacs on macOS is v22.1 which is very old (2007) and you probably don't need to support, nowadays people usually requires at least v24.1 which adds the package system and the lexical binding. Many packages even requires much recent version, e.g., Magit requires v25.1. – xuchunyang Jul 13 at 12:36
  • I'm not using default macOS Emacs, I use 26.2. But all experiments I run with 25.1 installed with evm because it's the earliest version supported by my package. – Valeriy Savchenko Jul 13 at 20:59
  • Not sure why your Emacs lacks the warnings and cl library, I'm sure they are presented in Emacs 25.1, I think there is something wrong with your Emacs installation. – xuchunyang Jul 14 at 4:06
  • have you seen github.com/flycheck/emacs-travis? – John Kitchin Jul 14 at 12:24
  • @JohnKitchin no, I haven't, but in the end I went with a similar solution: cask + EVM + ert-runner. I guess I'll post the answer so it's easier for people in the future to find this solution. – Valeriy Savchenko Jul 14 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.