Closed camsaul closed 2 months ago
I have some work planned around metadata soon, so I'll roll this into it. I guess with cloverage you can't get at the option that tells HoneySQL to ignore :original
?
Back at my desk, so I can give a more detailed answer.
Right now, HoneySQL assumes it can call sql-kw
on metadata keys and values which in turn means called name
on them. That's not a very robust approach, but I want to expand what can be provided as metadata in several contexts. My plan is to make it ignore all "non-scalar" data, so it will accept numbers, strings, symbols, and keywords but skip over everything else, in addition to the "standard" location metadata that popular tooling uses. With that approach, :original
would be ignored since it is a map.
See if the head of develop
bf34a23e6874c0c7c03b81e69b9eaddf06c2caa9 or the latest 2.6.9999-SNAPSHOT solves this for you.
Hey @seancorfield I gave that a try and it seems to work. Thanks for the quick fix!
Hi Sean, sorry to bother you with nonsense, but after bumping my Honey SQL version to the latest I'm running into issues running tests with Cloverage because it adds an
:original
key to metadata for instruments forms, and:original
itself has:line
/:column
/:end-line
/:end-column
metadata.Here's a repro for the error:
I enabled tracing on a few vars and
*print-meta*
and this is the failing callHow would you feel about updating
https://github.com/seancorfield/honeysql/blob/a3ef21548520636168a970d780ff46a4be4fa002/src/honey/sql.cljc#L558-L576
to recursively ignore metadata inside metadata to handle weird edge cases like this? I can submit a PR if you'd like.
Thanks!