<< Back to previous view

[TANAL-75] t.a(.jvm) form emitted from AST has ^{:tag Object} where original source had ^clojure.lang.IPersistentCollection Created: 30/Mar/14  Updated: 31/Mar/14  Resolved: 31/Mar/14

Status: Closed
Project: tools.analyzer
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Andy Fingerhut Assignee: Nicola Mometto
Resolution: Completed Votes: 0
Labels: None


With latest t.a(.jvm) (0.1.0-beta9 for both), latest Eastwood master, and latest core.rrb-vector repo as of today, 'lein check' gives no reflection warnings, but the following command does:

% lein with-profile +1.6 eastwood '{:namespaces [clojure.core.rrb-vector]}'
Reflection warning, clojure/data/priority_map.clj:215:19 - call to method equiv on java.lang.Object can't be resolved (no such method).
Reflection warning, clojure/core/memoize.clj:72:23 - reference to field cache can't be resolved.
== Eastwood 0.1.2-SNAPSHOT Clojure 1.6.0 JVM 1.7.0_51
== Linting clojure.core.rrb-vector ==
Reflection warning, clojure/core/rrb_vector.clj:100:17 - call to method cons on java.lang.Object can't be resolved (no such method).
Reflection warning, clojure/core/rrb_vector.clj:150:17 - call to method cons on java.lang.Object can't be resolved (no such method).

Ignore the first two reflection warnings. It is the two in clojure/core/rrb_vector.clj that are the reason for this ticket. Use the following command to get voluminous debug output from Eastwood, including the emitted forms just before they are eval's, to see the java.lang.Object tag in place of the clojure.lang.IPersistentCollection in the source code:

% lein with-profile +1.6 eastwood '{:namespaces [clojure.core.rrb-vector] :debug #{:all}}' > out.txt

Comment by Nicola Mometto [ 30/Mar/14 3:02 AM ]

Thanks for the feedback, I need to do a complete overhaul of the validate-loop-locals pass, hopefully there might be room for a small performance enhancement too.

Comment by Nicola Mometto [ 30/Mar/14 10:57 PM ]

This fixes it, https://github.com/clojure/tools.analyzer.jvm/commit/a95b72a1ce519150816d45b8fea0317d35e7ca32

Since I honestly can't figure out why I was overriding :form there, I'll let this ticket open until more testing confirms that this commit hasn't introduced some other issues.

Comment by Nicola Mometto [ 31/Mar/14 12:53 PM ]

More testing hasn't found any case where this commit caused a regression so I feel confident to close this ticket.

Comment by Andy Fingerhut [ 31/Mar/14 1:09 PM ]

Agreed that after this change I have seen no new problems in the Eastwood crucible set of projects using t.a(.jvm).

Generated at Tue Oct 17 03:02:48 CDT 2017 using JIRA 4.4#649-r158309.