Open unsafe-andrew-old opened 2 years ago
Also getting these same errors! Very curious if there's any workaround in the meantime
I'm also trying this out, but I have the feeling the language changed in the meantime
this is the source of =hy-jedhy.el= to load the jedhy instance
(defconst hy-jedhy--setup-code
"(import hy [hy.core.language [*]] [hy.core.macros [*]]) (require [hy.extra.anaphoric [*]]) (try (do (import jedhy jedhy.api) (setv --JEDHY (jedhy.api.API)) \"Started jedhy\") (except [e Exception] \"Failed to start jedhy\"))"
which translates in
(import hy [hy.core.language [*]] [hy.core.macros [*]])
(require [hy.extra.anaphoric [*]])
(try
(do (import jedhy jedhy.api)
(setv --JEDHY (jedhy.api.API))
"Started jedhy")
(except [e Exception]
"Failed to start jedhy"))
which does not work at all for a newly checkout version of =Hy= for me
=> (import hy [hy.core.language [*]] [hy.core.macros [*]])
=> Traceback (most recent call last):
File "stdin-4ed2839626872f28f7164ebdcc3e117f1e4842f7", line 1, in <module>
(import hy [hy.core.language [*]] [hy.core.macros [*]])
File "<stdin>", line 1
(import hy [hy.core.language [*]] [hy.core.macros [*]])
^
hy.errors.HySyntaxError: parse error for pattern macro 'import': got unexpected token: hy.models.Symbol('hy'), expected: end of file
heck I thing the code is not valid v1 Hy, but I just started using it and I'm not sure. Is this the case?
BTW I am using
hy --version
hy 1.0a4
@alejandrogallo yeah I think that is the issue. Try with hy 0.20.0.
I use Doom Emacs and company-mode. I think, no additional notes should be added