Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intern throws exception when used #724

Closed
ikappaki opened this issue Dec 1, 2023 · 1 comment
Closed

intern throws exception when used #724

ikappaki opened this issue Dec 1, 2023 · 1 comment

Comments

@ikappaki
Copy link
Contributor

ikappaki commented Dec 1, 2023

Hi,

basilisp.core/intern throws an error when used:

AttributeError: 'Var' object has no attribute 'set_root'

To reproduce

  1. Open the REPL, and try to intern a symbol:
basilisp.user=> (intern 'basilisp/user 'x "Foobar")
Traceback (most recent call last):
  File "C:\src\basilisp\src\basilisp\cli.py", line 306, in repl
    result = eval_str(lsrc, ctx, ns, eof)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\src\basilisp\src\basilisp\cli.py", line 52, in eval_str
    last = compiler.compile_and_exec_form(form, ctx, ns)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\src\basilisp\src\basilisp\lang\compiler\__init__.py", line 165, in compile_and_exec_form
    return getattr(ns.module, final_wrapped_name)()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<REPL Input>", line 1, in __lisp_expr___5878
  File "C:\src\basilisp\src\basilisp\core.lpy", line 4531, in intern
    (defn intern
  File "C:\src\basilisp\src\basilisp\core.lpy", line 4542, in intern__arity3
    (.intern ns v))))
AttributeError: 'Var' object has no attribute 'set_root'

Patch to follow.

@ikappaki ikappaki changed the title interrn throws exception when used intern throws exception when used Dec 1, 2023
chrisrink10 pushed a commit that referenced this issue Dec 5, 2023
Hi,

could you please review patch to fix `intern`. It addresses #724.

It was using var methods such as `.set-root` that don't exist.

Tests included.

Thanks

---------

Co-authored-by: ikappaki <[email protected]>
@chrisrink10
Copy link
Member

Fixed in #725

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants