tools.analyzer

t.a(.jvm) form emitted from AST has ^{:tag Object} where original source had ^clojure.lang.IPersistentCollection

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

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

Activity

Hide
Nicola Mometto added a comment -

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.

Show
Nicola Mometto added a comment - 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.
Hide
Nicola Mometto added a comment -

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.

Show
Nicola Mometto added a comment - 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.
Hide
Nicola Mometto added a comment -

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

Show
Nicola Mometto added a comment - More testing hasn't found any case where this commit caused a regression so I feel confident to close this ticket.
Nicola Mometto made changes -
Field Original Value New Value
Resolution Completed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]
Hide
Andy Fingerhut added a comment -

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

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

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: