(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 issueah 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))
::sn/foo
this could be improved though, so issue still welcome
for now you could write:
(create-ns 'foo)
(alias 'sn 'foo)
::sn/foo
Ok, I will post an issue. Thx for workaround.
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
Like right now I'm just putting a symbol into a vector used in an argument list to a fn
Yeah, I'm printing the node, and it looks fine
<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}} ()))>
This is what's being generated
And it's saying timestamp
is an unsupported binding form.
Oh, I think I might know
I forgot to turn the symbol into a token node
right, that's a common thing
yup, that was it