<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions tagged tools.analyzer</title>
<link>https://ask.clojure.org/index.php/tag/tools.analyzer</link>
<description></description>
<item>
<title>Sub-optimal coding technique in clojure.tools.analyzer.utils ?</title>
<link>https://ask.clojure.org/index.php/12962/sub-optimal-coding-technique-clojure-tools-analyzer-utils</link>
<description>&lt;p&gt;Nearly nine years ago, when making tools.analyzer cross-platform (JVM/CLR), we did not yet have reader conditionalization.  Leading to this bit of inelegance:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.analyzer/blob/726ab4f085f00c1c03f564dec359d50362efc846/src/main/clojure/clojure/tools/analyzer/utils.clj#LL81C1-L95C1&quot;&gt;https://github.com/clojure/tools.analyzer/blob/726ab4f085f00c1c03f564dec359d50362efc846/src/main/clojure/clojure/tools/analyzer/utils.clj#LL81C1-L95C1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The commit actually has the comment &quot;until we have feature expressions&quot;.&lt;/p&gt;
&lt;p&gt;(- Since there needs to be question -):   Isn't time to get rid ourselves of the affliction of throwing an exception to detect the platform and convert to reader conditionalization?  &lt;/p&gt;
&lt;p&gt;If there is Jira issue, I can submit a patch.  &lt;/p&gt;
</description>
<category>tools.analyzer</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12962/sub-optimal-coding-technique-clojure-tools-analyzer-utils</guid>
<pubDate>Fri, 26 May 2023 13:23:58 +0000</pubDate>
</item>
<item>
<title>`Ambiguous method signature for method: close` thrown where clojure.core wouldn't</title>
<link>https://ask.clojure.org/index.php/10391/ambiguous-method-signature-method-thrown-clojure-wouldnt</link>
<description>&lt;p&gt;The following code will throw an exception:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ana.jvm/analyze '(reify
                    java.io.Closeable
                    (close [_])
                    example.foo/EventClient
                    (close [_])))
                    ;; =&amp;gt; clojure.lang.ExceptionInfo: Ambiguous method signature for method: close
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;...where &lt;code&gt;example.foo/EventClient&lt;/code&gt; is a a real, resolvable defprotocol that does in fact define a &lt;code&gt;close [_]&lt;/code&gt; method.&lt;/p&gt;
&lt;p&gt;Here is a reproducible patch that can be applied over &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.analyzer.jvm/commit/f00d92317307c3e9e326fd99d337292925dc9db1&quot;&gt;https://github.com/clojure/tools.analyzer.jvm/commit/f00d92317307c3e9e326fd99d337292925dc9db1&lt;/a&gt; :&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://gist.githubusercontent.com/vemv/ae450c380ac96683bc06275323e7e322/raw/91ad4b60502b32f4f57bd0d5707bcf51740f8e7b/gistfile1.patch&quot;&gt;https://gist.githubusercontent.com/vemv/ae450c380ac96683bc06275323e7e322/raw/91ad4b60502b32f4f57bd0d5707bcf51740f8e7b/gistfile1.patch&lt;/a&gt;&lt;/p&gt;
</description>
<category>tools.analyzer</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10391/ambiguous-method-signature-method-thrown-clojure-wouldnt</guid>
<pubDate>Thu, 01 Apr 2021 17:15:51 +0000</pubDate>
</item>
</channel>
</rss>