eslisp icon indicating copy to clipboard operation
eslisp copied to clipboard

eslisp 0.7.5 breaks eslisp-camelify and eslisp-propertify (and maybe eslisp-fancy-function)

Open raymond-w-ko opened this issue 8 years ago • 5 comments

Hello, I recently upgraded my project's dependencies and noticed this error when trying to compile *.esl files.

eslisp-camelify is checkout from the official Git repo.

It seems like something has changed, and this is no longer bound to the eslisp object, so that this.multi() fails because this is null?

git clean -fxd
npm install
make clean
make
make test 
node test.js
TAP version 13
# var
/home/rko/src/eslisp-camelify/node_modules/eslisp/lib/compile.js:189
        throw e;
        ^

TypeError: Error evaluating macro `camelify` (called at line 1, column 40): Cannot read property 'apply' of undefined
    at env.module.exports (/home/rko/src/eslisp-camelify/index.js:35:22)
    at /home/rko/src/eslisp-camelify/node_modules/eslisp/lib/compile.js:184:35
    at listToEstree (/home/rko/src/eslisp-camelify/node_modules/eslisp/lib/compile.js:191:6)
    at astToEstree (/home/rko/src/eslisp-camelify/node_modules/eslisp/lib/compile.js:250:25)
    at /home/rko/src/eslisp-camelify/node_modules/eslisp/lib/translate.js:36:14
    at /home/rko/src/eslisp-camelify/node_modules/prelude-ls/lib/List.js:158:21
    at /home/rko/src/eslisp-camelify/node_modules/prelude-ls/lib/List.js:161:4
    at /home/rko/src/eslisp-camelify/node_modules/prelude-ls/lib/List.js:665:42
    at module.exports (/home/rko/src/eslisp-camelify/node_modules/eslisp/lib/translate.js:37:7)
    at toEstree (/home/rko/src/eslisp-camelify/node_modules/eslisp/lib/index.js:9:10)
make: *** [makefile:12: test] Error 1

raymond-w-ko avatar May 04 '17 19:05 raymond-w-ko

No, it is probably related to this commit where this.multi() was removed in favor of using JS Array.

eec8e6f40262b733adf1cd116efd80c438e75c82

raymond-w-ko avatar May 04 '17 19:05 raymond-w-ko

I've created pull requests to fix the two transforms

anko/eslisp-propertify#4 anko/eslisp-camelify#4

raymond-w-ko avatar May 04 '17 19:05 raymond-w-ko

I don't personally use anko/eslisp-fancy-function but this may need a review after the two plugins are updated. It depends on those two.

raymond-w-ko avatar May 04 '17 19:05 raymond-w-ko

Thanks—I'll have a look tomorrow.

I really should put together a script that tests all packages on npm tagged eslisp-macro against current eslisp HEAD before I publish.

anko avatar May 04 '17 21:05 anko

I merged your PRs https://github.com/anko/eslisp-camelify/pull/4 and https://github.com/anko/eslisp-propertify/pull/4, and released corresponding [email protected] and [email protected] with them. Thanks for your help! :sparkles:

I'll leave this open for now, while I check how eslisp-fancy-function is doing.

anko avatar May 05 '17 15:05 anko