-
-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Labels
component:compilerIssue pertaining to compilerIssue pertaining to compiler
Description
Hi,
I can't seem to be able to require a namespace as and use it simultaneously in a try form
exception: <class 'basilisp.lang.compiler.exception.CompilerException'>
phase: :analyzing
message: unable to resolve symbol 'abc/read-string' in this context
To reproduce
- Open up the REPL and attempt to require and use
basilisp.ednwith an alias, an unable to resolve symbol error is thrown
basilisp.user=> (try (require '[basilisp.edn :as abc])
(println :x abc/read-string)
(finally :done))
exception: <class 'basilisp.lang.compiler.exception.CompilerException'>
phase: :analyzing
message: unable to resolve symbol 'abc/read-string' in this context
form: abc/read-string
location: <REPL Input>:2The same works fine in a do block
basilisp.user=> (do (require '[basilisp.edn :as abc])
(println :x abc/read-string))
:x <function read_string at 0x0000019460C6E520>
ilA workaround is to use requiring-resolve
basilisp.user=> (try (let [rs (requiring-resolve 'basilisp.edn/read-string)]
(println :x @rs))
(finally :done))
:x <function read_string at 0x0000019460C6E520>
nil(maybe has the same root cause as #1065?)
Thanks
Metadata
Metadata
Assignees
Labels
component:compilerIssue pertaining to compilerIssue pertaining to compiler