<< Back to previous view

[CLJ-775] Test clojure.test-clojure.rt fails Created: 20/Apr/11  Updated: 01/Mar/13  Resolved: 09/Nov/12

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Steven E. Harris Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Windows XP, Cygwin, with Clojure built against the tip of the published "clojure/clojure" repository on GitHub


When I run the mvn test command against Clojure built from source, I
encounter the following error in the test clojure.test-clojure.rt,
which appears to be due to the bare-rt-print function's use of the
var clojure.core/print-initialized:

{{Testing clojure.test-clojure.rt

ERROR in (rt-print-prior-to-print-initialize) (Var.java:339)
expected: (= "#\"foo\"" (bare-rt-print #"foo"))
actual: java.lang.IllegalStateException: Can't dynamically bind non-dynamic var: clojure.core/print-initialized
at clojure.lang.Var.pushThreadBindings (Var.java:339)
clojure.core$push_thread_bindings.invoke (core.clj:1656)
clojure.test_clojure.rt$bare_rt_print$fn__14891.invoke (rt.clj:46)
clojure.test_clojure.rt$bare_rt_print.invoke (rt.clj:45)
clojure.test_clojure.rt/fn (rt.clj:53)
clojure.test$test_var$fn__1762.invoke (test.clj:693)
clojure.test$test_var.invoke (test.clj:693)
clojure.test$test_all_vars$fn_1766$fn_1773.invoke (test.clj:709)
clojure.test$default_fixture.invoke (test.clj:663)
clojure.test$test_all_vars$fn__1766.invoke (test.clj:709)
clojure.test$default_fixture.invoke (test.clj:663)
clojure.test$test_all_vars.invoke (test.clj:705)
clojure.test$test_ns.invoke (test.clj:728)
clojure.core$map$fn__2231.invoke (core.clj:2371)
clojure.lang.LazySeq.sval (LazySeq.java:42)
clojure.lang.LazySeq.seq (LazySeq.java:60)
clojure.lang.ChunkedCons.chunkedNext (ChunkedCons.java:59)
clojure.core$chunk_next.invoke (core.clj:643)
clojure.core$reException in thread "main" java.lang.IllegalStateException: Pop without matching push
at clojure.lang.Var.popThreadBindings(Var.java:350)
at clojure.core$pop_thread_bindings.invoke(core.clj:1658)
at clojure.main$script_opt.invoke(main.clj:338)
at clojure.main$main.doInvoke(main.clj:426)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.lang.Var.invoke(Var.java:401)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.Var.applyTo(Var.java:518)
at clojure.main.main(main.java:37)
duce1.invoke (core.clj:878)
clojure.core$reduce1.invoke (core.clj:870)
clojure.core$merge_with.doInvoke (core.clj:2588)
clojure.lang.RestFn.applyTo (RestFn.java:139)
clojure.core$apply.invoke (core.clj:602)
clojure.test$run_tests.doInvoke (test.clj:743)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invoke (core.clj:600)
clojure.test_clojure$eval19718.invoke (run_tests.clj:58)
clojure.lang.Compiler.eval (Compiler.java:6328)
clojure.lang.Compiler.load (Compiler.java:6765)
clojure.lang.Compiler.loadFile (Compiler.java:6726)
clojure.main$load_script.invoke (main.clj:282)
clojure.main$script_opt.invoke (main.clj:342)
clojure.main$main.doInvoke (main.clj:426)
clojure.lang.RestFn.invoke (RestFn.java:408)
clojure.lang.Var.invoke (Var.java:401)
clojure.lang.AFn.applyToHelper (AFn.java:161)
clojure.lang.Var.applyTo (Var.java:518)
clojure.main.main (main.java:37)}}

Comment by Andy Fingerhut [ 24/Feb/12 1:02 PM ]

With latest Clojure master as of Feb 24, 2012, and with "git checkout 1.3.x" in a Clojure tree, "mvn test" builds and passes all tests for me on a Windows XP system with Cygwin, Java 1.7.0, and Maven 3.0.4. Similarly on Mac OS X 10.6.8 with Java 1.6.0_29 and Maven 3.0.3.

This may have been fixed already in 1.3.0, but it would be good for Steven to confirm.

Comment by Andy Fingerhut [ 24/Feb/12 1:03 PM ]

Sorry, I should have said Windows Vista, but everything else applies.

Comment by Steven E. Harris [ 24/Feb/12 1:15 PM ]

I'm ecstatic to report that at present, I don't have access to a computer running Windows with Cygwin, so I can't help verify the fix at present.

Comment by Andy Fingerhut [ 11/Apr/12 5:34 PM ]

I have just today experienced this same exception today with the following versions of software:

$ uname -a
Linux ubuntu 2.6.38-13-generic #57-Ubuntu SMP Mon Mar 5 18:10:14 UTC 2012 i686 i686 i386 GNU/Linux
$ java -version
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) Client VM (build 22.0-b10, mixed mode)
$ ant -version
Apache Ant version 1.8.1 compiled on October 13 2010

With latest Clojure master as of Apr 11 2012.

Note: I saw this problem when I had tar'ed a .tar.gz file of the Clojure source code on one machine with a current date, then untar'ed it on a machine with its clock set a few days earlier. Thus there were many warnings during compilation about file dates being in the future. This may have had something to do with the failures, because when I updated the system's time, the compile and tests passed.

Comment by Stuart Sierra [ 09/Nov/12 8:31 AM ]

It appears that this issue has been resolved. The clojure.core/print-initialized Var is declared dynamic in commit b9b1a094499b69a94bd47fc94c4f082d80239fa9

Generated at Tue Apr 25 00:03:02 CDT 2017 using JIRA 4.4#649-r158309.