eastwood

Slackbot 2022-06-15T19:39:42.333229Z

This message was deleted.

seancorfield 2022-06-15T20:04:54.781999Z

What is alng aliased to? What ns/library is that from?

seancorfield 2022-06-15T20:07:04.493729Z

Whatever alng/http expands to (it's a macro) has the construct that Eastwood is complaining about.

Yuner Bekir 2022-06-15T20:24:10.441719Z

alng is aliesed to afw.apilang. The thing is that I use the same construct on other places and eastwood doesnt complain there

seancorfield 2022-06-15T20:25:14.822819Z

Right, but it's a macro and it's going to expand to different things in different contexts. So this is a context where that macro expands to, essentially, a degenerate condition.

seancorfield 2022-06-15T20:26:43.681809Z

Without seeing the source of that macro, it's hard to say what specifically is going on...

seancorfield 2022-06-15T20:32:42.945779Z

I think it's the :parse expression -- ~(:parse desc) is going to cause that expression to be evaluated by the macro, yielding nil if you pass a literal hash map that doesn't contain :parse -- also, why is the alt in that or evaluated?

seancorfield 2022-06-15T20:33:25.227659Z

In addition, you are potentially evaluating desc multiple times -- it would be better to bind it once to a local symbol and then use that instead.

seancorfield 2022-06-15T20:33:34.295549Z

Assuming this is your macro and you can change it?

seancorfield 2022-06-15T20:34:21.187089Z

I'm not entirely sure I see why this is a macro at all -- I think it could be a regular function?

seancorfield 2022-06-15T20:35:55.083369Z

Ah, because you want :request in desc to be a symbolic expression and for it to be walked and have functions resolved in a different context?

Yuner Bekir 2022-06-15T20:39:45.367809Z

yup for the last one, and parse is a required part of the so called apidesc, I just missed it since its getting late

Yuner Bekir 2022-06-15T20:40:01.776609Z

the issue is resolved thank you soo much

seancorfield 2022-06-15T20:40:52.465579Z

Might be worth adding an assert into the macro so you can't forget :parse

🙌 1
Yuner Bekir 2022-06-15T20:43:16.481229Z

thanks

vemv 2022-06-15T21:37:39.065709Z

set the channel topic: Discussion around the Eastwood linter. â„šī¸ support requests are best posted as github issues - thanks for your help!