Fork me on GitHub
#clj-kondo
<
2020-09-20
>
sogaiu10:09:21

@borkdude so i tried working on a hook for libpython-clj: https://gist.github.com/sogaiu/b6aa01efbd4006bbcab8decf2d5889aa in this case the construct is similar to a defn. is there something i can do to make the defined name show up in the analysis so i can use that toward indexing?

borkdude10:09:50

if you expand to a defn that uses that name, I think it should also show up in the analysis? if it doesn't, it might be a bug or there's some reason I don't know off the top of my head

borkdude10:09:06

could also be metadata related, forgetting to restore a position - not sure.

sogaiu10:09:53

thanks for the tips

sogaiu10:09:17

ah i see rum's example tries to maintain metadata and i have not done so

sogaiu11:09:56

@borkdude using with-meta made a difference in whether row, col info had something numeric. thanks!

sogaiu14:09:25

there was another piece to the puzzle. it turns out libpython-clj uses a construct similar to import-vars from potemkin (though it's not exactly the same), so i think if i write a hook for that, the indexing may work.

borkdude14:09:36

@sogaiu clj-kondo also has support for import-vars so if you rewrite to that, may also work