<< Back to previous view

[TANAL-97] analyze+eval throws exception with Clojure 1.7.0-alpha3 but not 1.6.0 for project utf8 Created: 28/Oct/14  Updated: 28/Oct/14  Resolved: 28/Oct/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: Declined Votes: 0
Labels: None


 Description   

I haven't tracked down what is going on here. I am using tools.analyzer(.jvm) 0.6.1 with the latest Eastwood where I've noticed this (but also saw it with the 0.2.x version of tools.analyzer(.jvm) used by Eastwood 0.1.4). I haven't yet checked whether the latest released tools.analyzer(.jvm) improves on this behavior.

This might also be a bug introduced in Clojure 1.7.0-alpha3 vs. 1.6.0.

To see the issue, get latest Eastwood, pull all of the crucible projects, or at least the one that gets renamed utf8-2013-11-15, and run these two commands after doing 'mvm install' on the latest Clojure master as of 1.7.0-alpha3. The last command below will use 1.7.0-master-SNAPSHOT of Clojure, so it needs to be installed in your ~/.m2 named as that, or change the project.clj file to name 1.7.0-alpha3 instead.

% lein clean
% lein with-profile +1.6 eastwood
% lein clean
% leon with-profile +1.7 eastwood

With the last command I see an exception like this:

Exception thrown during phase :analyze+eval of linting namespace pjstadig.utf8
Got exception with extra ex-data:
    msg='Could not resolve var: Charset'
    (keys dat)=(:end-line :line :column :end-column :file :var)
ExceptionInfo Could not resolve var: Charset
	clojure.core/ex-info (core.clj:4566)
	eastwood.copieddeps.dep2.clojure.tools.analyzer.passes.jvm.validate/eval1973/fn--1975 (validate.clj:29)
	clojure.lang.MultiFn.invoke (MultiFn.java:229)


 Comments   
Comment by Nicola Mometto [ 28/Oct/14 12:03 PM ]

This appears to be caused because clojure 1.7.0-alpha3 fails to compile nio.core, thus the ns expression is not evaluated.

This is a regression introduced with clojure 1.7.0-alpha2, I'm investigating the cause and will open a CLJ ticket

Comment by Nicola Mometto [ 28/Oct/14 12:14 PM ]

turns out it's not even a clojure reggression, it's a bug in the last released version of nio that has been fixed in the SNAPSHOT version: https://github.com/pjstadig/nio/issues/4

clojure <=1.7.0-alpha2 silently ignored this bug but commit https://github.com/clojure/clojure/commit/85169b785c5dd59e89c0bd12600eebe5f6172874 had the side effect of exposing the bug

Comment by Andy Fingerhut [ 28/Oct/14 2:24 PM ]

Thanks for tracking that down! (inc Bronsa)

Comment by Andy Fingerhut [ 28/Oct/14 5:18 PM ]

And this helped me discover that although I tried to stop Eastwood's linking at the point that analyze+eval returns an AST indicating that eval threw an exception, I was only checking the top-level AST. I should have been checking all sub-ASTs of top-level do forms, and do forms nested inside those, etc. Soon Eastwood will stop earlier, closer to the real problem in this case.





Generated at Thu Oct 30 08:44:09 CDT 2014 using JIRA 4.4#649-r158309.