You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: I'm not doing (. "" (join abc)), which is probably a more typical syntax. That version does work! (Evaluates to "abc" as I'd expect)
My intended meaning is (''.join)(abc) in Python. Pretty sure I got the syntax right -- I tried it with a non-empty string literal e.g. ((. "," join) abc) and that did work as I expected, evaluating to "a,b,c".)
Traceback (most recent call last):
File "stdin-3d4361c4adda2e092f2deff083d8b83bf335d68f", line 1, in <module>
((. "" join) abc)
hy.errors.HyCompileError: Internal Compiler Bug
Traceback (most recent call last):
File "/usr/local/Cellar/hy/1.0.0/libexec/lib/python3.13/site-packages/hy/compiler.py", line 411, in compile
ret = self.compile_atom(tree)
File "/usr/local/Cellar/hy/1.0.0/libexec/lib/python3.13/site-packages/hy/compiler.py", line 405, in compile_atom
return Result() + _model_compilers[type(atom)](self, atom)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/usr/local/Cellar/hy/1.0.0/libexec/lib/python3.13/site-packages/hy/compiler.py", line 566, in compile_expression
expr = macroexpand(expr, self.module, self)
File "/usr/local/Cellar/hy/1.0.0/libexec/lib/python3.13/site-packages/hy/macros.py", line 361, in macroexpand
fn = ".".join(map(mangle, fn[1:]))
File "/usr/local/Cellar/hy/1.0.0/libexec/lib/python3.13/site-packages/hy/reader/mangling.py", line 32, in mangle
assert s
^
AssertionError
Hello! This project is awesome :)
This bug isn't causing a problem for me (and there are workarounds, see below), but sharing in case the report is helpful.
Hy version:
Hy 1.0.0 (Afternoon Review) using CPython(main) 3.13.1 on Darwin
(I tried it in the web console too, with the same result.)Repro instructions
In the REPL:
Expected result:
"abc"
Actual: Compile-time error (below)
Note: I'm not doing
(. "" (join abc))
, which is probably a more typical syntax. That version does work! (Evaluates to"abc"
as I'd expect)My intended meaning is
(''.join)(abc)
in Python. Pretty sure I got the syntax right -- I tried it with a non-empty string literal e.g.((. "," join) abc)
and that did work as I expected, evaluating to"a,b,c"
.)Workarounds
For my use case, this is a good workaround:
The text was updated successfully, but these errors were encountered: