Fork me on GitHub

(alias 'sn (create-ns 'some-namespace))
::sn/foo ;=> :some-namespace/foo
... Unresolved namespace sn. Are you missing a require?


How to avoid this warning? Note: there is no file some_namespace.clj so I can't require it.


(alias 'sn (create-ns 'some-namespace))
::sn/foo ;; false positive
sn/foo ;; works
yes, this seems a bug, feel free to post an issue

👍 2

ah no, I was fooled, clj-kondo only reports the first occurrence of the unresolved namespace


this does seem to work:

(alias 'sn 'foo #_(create-ns 'some-namespace))


this could be improved though, so issue still welcome


for now you could write:

(create-ns 'foo)
(alias 'sn 'foo)


Ok, I will post an issue. Thx for workaround.

Joshua Suskalo22:06:18

Are there any common causes for unsupported binding form errors to occur in code generated by hooks?


@suskeyhose it's usually best to just print the node to see what it looks like

Joshua Suskalo22:06:06

Like right now I'm just putting a symbol into a vector used in an argument list to a fn

Joshua Suskalo22:06:13

Yeah, I'm printing the node, and it looks fine

Joshua Suskalo22:06:58

<list: (fn [] (fn [field value second item timestamp] [field value second item timestamp] [second field] {:type :http :method :get :body {:field field :value value :timestamp timestam}} ()))>

Joshua Suskalo22:06:02

This is what's being generated

Joshua Suskalo22:06:23

And it's saying timestamp is an unsupported binding form.

Joshua Suskalo22:06:46

Oh, I think I might know

Joshua Suskalo22:06:53

I forgot to turn the symbol into a token node


right, that's a common thing

Joshua Suskalo22:06:07

yup, that was it