<< Back to previous view

[CLJ-423] make sure future clears closed-overs Created: 11/Aug/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Rich Hickey
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

As lazy-seq and delay already do.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 9:55 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/423
Attachments:
future-clear.diff - https://www.assembla.com/spaces/clojure/documents/a_Lg6WPBGr37ZBeJe5cbCb/download/a_Lg6WPBGr37ZBeJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 9:55 AM ]

richhickey said: [file:a_Lg6WPBGr37ZBeJe5cbCb]: patch for 423

Comment by Assembla Importer [ 24/Aug/10 9:55 AM ]

stu said: Updating tickets (#404, #422, #382, #423)

Comment by Assembla Importer [ 24/Aug/10 9:55 AM ]

richhickey said: (In [[r:0c0e9c5a0bd5ec511462553298e67b816a9284cc]]) make sure future clears closed-overs, fixes #423

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>

Branch: master





[CLJ-422] code in finally clauses is sometimes run twice Created: 11/Aug/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Chouser
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

When an exception is thrown in a finally clause, the code inside that finally clause is run twice:

(try (prn 1) (finally (prn 2) (prn 3) (throw (Exception.))))

That prints 1 2 3 2 3, when it should simply print 1 2 3. This has been the case since revision:5e9f2b293b307aa7953cd390360d24549e542b92

But simply reverting that commit causes problems in other cases, such as:

(try (prn 1) (throw (Exception. "one"))
(catch Exception e (throw (Exception. "two")))
(finally (prn 2) (prn 3)))

...which should print 1 2 3 as well, but used to print just 1 instead.

This was discussed in http://groups.google.com/group/clojure/browse_thread/thread/43d2dcb2505e8915



 Comments   
Comment by Assembla Importer [ 24/Aug/10 12:55 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/422
Attachments:
0001-Emit-finally-exception-table-entry-for-each-try-catc.patch - https://www.assembla.com/spaces/clojure/documents/d9le_6Pvar35I1eJe5cbLr/download/d9le_6Pvar35I1eJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 12:55 AM ]

chouser@n01se.net said: [file:d9le_6Pvar35I1eJe5cbLr]: initial fix for #422

Comment by Assembla Importer [ 24/Aug/10 12:55 AM ]

chouser@n01se.net said: It looks like javac protects the try block and each catch block individually with separate entries in the exception table, all of them pointing to the final finally block.

This patch attempts to do the same thing, and also fully reverses the "endTryCatch" commit mentioned in the ticket description. Both the examples in the ticket description work correctly, each printing just 1 2 3.

Comment by Assembla Importer [ 24/Aug/10 12:55 AM ]

richhickey said: Thanks!

This could use some tests

Comment by Assembla Importer [ 24/Aug/10 12:55 AM ]

chouser@n01se.net said: Joe Gallo wrote some. He said his CA is in the mail.

Comment by Assembla Importer [ 24/Aug/10 12:55 AM ]

richhickey said: Where are they? We can try them without including them for now

Comment by Assembla Importer [ 24/Aug/10 12:55 AM ]

chouser@n01se.net said: They were linked from the ggroup discussion. They pass.

http://gist.github.com/517871

Comment by Assembla Importer [ 24/Aug/10 12:55 AM ]

richhickey said: Thanks, I missed that, I was looking for them in messages from Joe

Comment by Assembla Importer [ 24/Aug/10 12:55 AM ]

stu said: Updating tickets (#404, #422, #382, #423)

Comment by Assembla Importer [ 24/Aug/10 12:55 AM ]

chouser@n01se.net said: (In [[r:5d4022276177d562906700c428f544110a0d0f1f]]) Emit finally exception table entry for each try/catch clause. Refs #422

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>

Branch: master





[CLJ-418] fix record equality with other maps Created: 30/Jul/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Rich Hickey
Resolution: Completed Votes: 0
Labels: None


 Description   

Record equality is non-symmetric with maps, due to record equality using type and map equality not. Make it so record equiv uses type but equals doesn't, and make Util.equiv use IPersistentCollection's equiv if on either side. Add marker interface for records. Make APersistentMap check for record marker interface.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 5:42 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/418

Comment by Assembla Importer [ 24/Aug/10 5:42 PM ]

richhickey said: (In [[r:ac484ba40cc1d94d42ce59e9df92b13e98ed0b6e]]) fix record equality with other maps, = includes type, .equals doesn't. see #418

Branch: master

Comment by Assembla Importer [ 24/Aug/10 5:42 PM ]

richhickey said: Used a marker interface for MapEquivalence, applied to APersistentMaps instead of for records.





[CLJ-417] Add more information to changes.txt for case and vector-of Created: 30/Jul/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

The information for case and vector-of could stand to be a little more detailed. I've attached a diff (against the RC1 changes.txt) that adds a little more information.
:f



 Comments   
Comment by Assembla Importer [ 24/Aug/10 12:42 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/417
Attachments:
changes-changes.diff - https://www.assembla.com/spaces/clojure/documents/dMKBLgM-Cr37o8eJe5cbLA/download/dMKBLgM-Cr37o8eJe5cbLA





[CLJ-413] clojure.java.shell/sh in-enc doesn't default to UTF-8 Created: 24/Jul/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

clojure.java.shell/sh was recently updated (changed) to say that it defaults to UTF-8 for both in-enc and out-enc, but it does not do so for in-enc.

On line 122 of the current build:

(with-open [osw (OutputStreamWriter. (.getOutputStream proc) ^String in-enc)]

in-enc is nil by default, but OutputStreamWriter needs to be passed "UTF-8" instead if in-enc is nil. I would add a patch but I still need to submit the CLA.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 12:35 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/413
Attachments:
413-parse-args-defaults-in-enc-and-out-enc-to-UTF-8.patch - https://www.assembla.com/spaces/clojure/documents/a1Pm9AL2ar351-eJe5cbCb/download/a1Pm9AL2ar351-eJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 12:35 AM ]

bpsm said: It was tough verifying that out-enc is even honored: If out-enc is not specified, it's nil. This gets passed to the two-argument stream-to-enc. The two-argument stream-to-enc calls (stream-to-string stream nil) since nil is not equal to :bytes. This in turn calls java.io/copy with :encoding nil, which gets passed on up a chain of do-copy calls until we finally try to extract the encoding from the opts map. The accessor function (java.io/encoding opts) does the actual defaulting to UTF-8.

Maybe the implementation in shell should be more explicit?

Side note: the stream-to-enc, stream-to-bytes, stream-to-string smells like it's reinventing parts of java.io, but I've probably overlooked something. It's late where I am.

Comment by Assembla Importer [ 24/Aug/10 12:35 AM ]

bpsm said: [file:a1Pm9AL2ar351-eJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 12:35 AM ]

bpsm said: My analysis from last night was wrong. The defaulting of :in-enc and :out-enc actually occurs in parse-args. parse-args was still defaulting to platform default encoding despite the fact that sh clearly wants to default to UTF-8.

This likely wasn't noticed because the unit test for parse-args was not updated when it was decided to use UTF-8 for clojure.java.shell in place of the previous decision to use platform default encoding.

Comment by Assembla Importer [ 24/Aug/10 12:35 AM ]

stu said: Thanks Marcus and Ben!

Comment by Assembla Importer [ 24/Aug/10 12:35 AM ]

stu said: Updating tickets (#340, #399, #402, #403, #413)





[CLJ-407] Function names not munged in :gen-class Created: 22/Jul/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

A function name with a dash in the :methods list isn't properly munged when using compile/gen-class. This results in a method in the byte code that is not callable from Java.

Offending code:

(ns foo.bar
(:gen-class
:methods [[foo-bar [] void]]))

(defn -foo-bar [] (println "a"))



 Comments   
Comment by Assembla Importer [ 24/Aug/10 6:32 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/407
Attachments:
0407-no-hyphens-in-genclass-method-names.patch - https://www.assembla.com/spaces/clojure/documents/by19VCMomr360aeJe5cbCb/download/by19VCMomr360aeJe5cbCb
0407-prevent-bad-genclass-methods-with-munge.patch - https://www.assembla.com/spaces/clojure/documents/cje20uM0Cr35VBeJe5cbLA/download/cje20uM0Cr35VBeJe5cbLA

Comment by Assembla Importer [ 24/Aug/10 6:32 PM ]

stu said: [file:by19VCMomr360aeJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 6:32 PM ]

stu said: patch fixes this by disallowing it. I don't think we should munged in methods names in gen-class – callers are already forced to Java names by any Java methods they implement, so better to be consistent.

patch also piggybacks some unrelated test refactoring

Comment by Assembla Importer [ 24/Aug/10 6:32 PM ]

richhickey said: Seems to specifically single out '-' rather than ensure a valid Java name

Comment by Assembla Importer [ 24/Aug/10 6:32 PM ]

stu said: How far do we go here? A complete implementation would need to

  • use the isJavaIdentifierPart / isJavaIdentifierStart methods of Character
  • enumerate the characters as code points (bring in c.c.string/codepoints? if so, as public fn?)
  • blacklist keywords, boolean literals, null literal
Comment by Assembla Importer [ 24/Aug/10 6:32 PM ]

stu said: [file:cje20uM0Cr35VBeJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 6:32 PM ]

stu said: second patch uses munge





[CLJ-404] Making a writer from a Socket with clojure.java.io/writer fails Created: 15/Jul/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

In clojure.java.io, IOFactory is extended to java.net.Sockets. The make-input-stream method is implemented correctly, but the make-output-stream method is missing. Actually, there is another key in the map named :output-stream. That is probably some old code lying around that didn't get refactored.

How to reproduce

(use 'clojure.java.io)
(writer (java.net.Socket. "google.com" 80))

When evaluated, the following is thrown: java.lang.IllegalArgumentException: Cannot open <#<Socket Socket[addr=google.com/66.102.13.147,port=80,localport=55335]>> as an OutputStream. (NO_SOURCE_FILE:0)
Any host/port combination that is open will do. I chose Google's HTTP server as an arbitrary example of an open port.

Expected Output

An instance of java.io.BufferedWriter.

Affected Versions

All versions of Clojure 1.2 since commit cd8fc7c11213fbe99355 "promote clojure.contrib.io to clojure.java.io (with api changes)" by Stuart Halloway.

Group Discussions

I mentioned this on the Clojure mail list at the end of this thread: http://groups.google.com/group/clojure/browse_thread/thread/898f5dbe14057277/8fe69b1d2104f8b4?lnk=gst&q=code+review#8fe69b1d2104f8b4

Proposed Solution

I signed the CA and posted it in the middle of June, but my name has not appeared on the list of contributors yet. I take the liberty of demonstrating how simple the fix should be:
<pre>diff --git a/src/clj/clojure/java/io.clj b/src/clj/clojure/java/io.clj
index 4d6c551..0151482 100644
— a/src/clj/clojure/java/io.clj
+++ b/src/clj/clojure/java/io.clj
@@ -260,7 +260,7 @@
(extend Socket
IOFactory
(assoc default-streams-impl
:make-input-stream (fn [^Socket x opts] (.getInputStream x))

  • :output-stream (fn [^Socket x opts] (output-stream (.getOutputStream x) opt
    + :make-output-stream (fn [^Socket x opts] (.getOutputStream x))))</pre>

Possible Unit Tests

A simple test that demonstrates this bug would be to check that the result of clojure.java.io/writer returns a java.net.Writer. Preferably, there should be unit tests for all the classes IOFactory is extended to.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 12:22 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/404
Attachments:
bug404_fix01_raek.diff - https://www.assembla.com/spaces/clojure/documents/d4GJvSONmr367JeJe5cbLA/download/d4GJvSONmr367JeJe5cbLA
0404-socket-with-opts.patch - https://www.assembla.com/spaces/clojure/documents/beVUnwPvOr3780eJe5cbLr/download/beVUnwPvOr3780eJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 12:22 AM ]

rasmus.svensson said: Patch and test that fails for the current version and passes for the fixed one.

Comment by Assembla Importer [ 24/Aug/10 12:22 AM ]

rasmus.svensson said: [file:d4GJvSONmr367JeJe5cbLA]: Patch and test for iissue #404

Comment by Assembla Importer [ 24/Aug/10 12:22 AM ]

stu said: [file:beVUnwPvOr3780eJe5cbLr]

Comment by Assembla Importer [ 24/Aug/10 12:22 AM ]

stu said: second patch subsumes first and preserves options passed in via opts

Comment by Assembla Importer [ 24/Aug/10 12:22 AM ]

rasmus.svensson said: Should the tests check for instances of Buffered(Input|Output)Stream rather than (Input|Output)Stream, too?

Comment by Assembla Importer [ 24/Aug/10 12:22 AM ]

stu said: Updating tickets (#404, #422, #382, #423)





[CLJ-403] extend-protocol doc is out of date Created: 14/Jul/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: David Powell
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

The documentation to extend-protocol is out of date. It refers to extend-class, which was merged into extend-type, and it shows the old ::TypeName notation.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 6:21 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/403
Attachments:
0001-fixed-extend-protocol-doc.patch - https://www.assembla.com/spaces/clojure/documents/biQTisJ48r37lheJe5cbLA/download/biQTisJ48r37lheJe5cbLA

Comment by Assembla Importer [ 24/Aug/10 6:21 PM ]

djpowell said: [file:biQTisJ48r37lheJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 6:21 PM ]

djpowell said: added patch to documentation

Comment by Assembla Importer [ 24/Aug/10 6:21 PM ]

stu said: Updating tickets (#403, #402)

Comment by Assembla Importer [ 24/Aug/10 6:21 PM ]

stu said: Updating tickets (#340, #399, #402, #403, #413)





[CLJ-402] degenerate defrecords should act like empty maps Created: 14/Jul/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

In the 1.2 beta1, empty defrecords misbehave, e.g.

(defrecord Foo [])
(seq (Foo.)) => () ; should be nil!

This also contributes to the broken .containsValue mentioned in http://groups.google.com/group/clojure/browse_thread/thread/5d27195d45b2d214/fb51906b2f960d4c



 Comments   
Comment by Assembla Importer [ 24/Aug/10 6:21 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/402
Attachments:
0402-degenerate-defrecords.patch - https://www.assembla.com/spaces/clojure/documents/bBn3fMJ3ar34yWeJe5cbLr/download/bBn3fMJ3ar34yWeJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 6:21 PM ]

stu said: [file:bBn3fMJ3ar34yWeJe5cbLr]

Comment by Assembla Importer [ 24/Aug/10 6:21 PM ]

stu said: Updating tickets (#403, #402)

Comment by Assembla Importer [ 24/Aug/10 6:21 PM ]

stu said: Updating tickets (#340, #399, #402, #403, #413)





[CLJ-399] make sure shell out and err handled in parallel Created: 10/Jul/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Comments   
Comment by Assembla Importer [ 24/Aug/10 12:16 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/399
Attachments:
0001-read-stdout-and-stderr-in-parallel.patch - https://www.assembla.com/spaces/clojure/documents/aNASvGJnar34lEeJe5cbCb/download/aNASvGJnar34lEeJe5cbCb
0001-read-stdout-and-stderr-in-parallel-using-futures.patch - https://www.assembla.com/spaces/clojure/documents/cFtkrCJTar37uZeJe5cbLr/download/cFtkrCJTar37uZeJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 12:16 AM ]

djpowell said: [file:aNASvGJnar34lEeJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 12:16 AM ]

djpowell said: [file:cFtkrCJTar37uZeJe5cbLr]: replacement patch

Comment by Assembla Importer [ 24/Aug/10 12:16 AM ]

djpowell said: Original patch was fine, but pvalues isn't really needed - probably easier to use futures directly as in second patch. Doesn't make too much difference.

Comment by Assembla Importer [ 24/Aug/10 12:16 AM ]

stu said: second patch good

Comment by Assembla Importer [ 24/Aug/10 12:16 AM ]

stu said: Updating tickets (#340, #399, #402, #403, #413)





[CLJ-398] Stray println snuck into clojure.java.shell/sh Created: 08/Jul/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Aaron Bedra
Resolution: Completed Votes: 0
Labels: None


 Description   

Line 94 in the current build; let's get rid of that, shall we? =)



 Comments   
Comment by Assembla Importer [ 24/Aug/10 12:08 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/398
Attachments:
0398_remove_extra_println_in_java_shell.patch - https://www.assembla.com/spaces/clojure/documents/am8VPYIX0r36-ieJe5cbLA/download/am8VPYIX0r36-ieJe5cbLA

Comment by Assembla Importer [ 24/Aug/10 12:08 AM ]

aaron said: [file:am8VPYIX0r36-ieJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 12:08 AM ]

stu said: duplicate of #392





[CLJ-393] Fix rename-keys to work with defrecords Created: 30/Jun/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Assembla Importer
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

clojure.set/rename-keys does not work with defrecords, because they do not implement IFn. rename-keys uses (map key) rather than (get map key).



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:59 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/393
Attachments:
0001-Fix-rename-keys-to-work-with-defrecords.patch - https://www.assembla.com/spaces/clojure/documents/c5AE6yHkqr36FEeJe5cbLA/download/c5AE6yHkqr36FEeJe5cbLA
0393-Fix-rename-keys-plus-tests.patch - https://www.assembla.com/spaces/clojure/documents/aTY3guHlKr3795eJe5cbLr/download/aTY3guHlKr3795eJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 10:59 AM ]

importer said: [file:c5AE6yHkqr36FEeJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 10:59 AM ]

stu said: [file:aTY3guHlKr3795eJe5cbLr]

Comment by Assembla Importer [ 24/Aug/10 10:59 AM ]

stu said: second patch subsumes first and adds test

Comment by Assembla Importer [ 24/Aug/10 10:59 AM ]

stu said: Updating tickets (#376, #392, #393)





[CLJ-392] Numerous fixes for clojure.java.shell Created: 30/Jun/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: David Powell
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

I have posted a patch to a number of issues discussed on the mailing list:

  • read stdout and stderr simultanously from separate threads to prevent stderr filling the buffer and hanging the process
  • removed stray println
  • use clojure.java.io to copy streams, avoiding byte-at-a-time copying
  • added :inenc option, specifying the input character set
  • renamed :out input option to :outenc
  • changed default encoding to 'platform default encoding'
  • write to stdin from a separate thread to prevent stdout blocking before we write anything

Additionally I have added support for a feature mentioned in the post, but not implemented in the original patch set:

  • added support for passing a byte array to :in

Original post:
http://groups.google.com/group/clojure-dev/browse_thread/thread/b4a4d6eca3fd9b9d/b12cc9e47f03f617#b12cc9e47f03f617

Followup discussion:
http://groups.google.com/group/clojure-dev/browse_thread/thread/dde2b5311212c072/3b24749935cfa4aa#3b24749935cfa4aa



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:59 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/392
Attachments:
0001-read-stdout-and-stderr-simultanously-from-separate-t.patch - https://www.assembla.com/spaces/clojure/documents/acCMkwHiCr34P8eJe5cbLr/download/acCMkwHiCr34P8eJe5cbLr
0392-shell-api-changes-and-fixes.patch - https://www.assembla.com/spaces/clojure/documents/a5qDGmHtOr34HNeJe5cbLA/download/a5qDGmHtOr34HNeJe5cbLA
0392-shell-api-changes-and-fixes-2.patch - https://www.assembla.com/spaces/clojure/documents/bWzYhgIDar36rceJe5cbLA/download/bWzYhgIDar36rceJe5cbLA

Comment by Assembla Importer [ 24/Aug/10 10:59 AM ]

djpowell said: [file:acCMkwHiCr34P8eJe5cbLr]: Numerous fixes for clojure.java.shell

Comment by Assembla Importer [ 24/Aug/10 10:59 AM ]

stu said: [file:a5qDGmHtOr34HNeJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 10:59 AM ]

stu said: second patch subsumes first, fixes errors, reflection warnings, and tests

Comment by Assembla Importer [ 24/Aug/10 10:59 AM ]

stu said: [file:bWzYhgIDar36rceJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 10:59 AM ]

stu said: Third patch (July 7) is inclusive and includes name change suggested by Rich.

Comment by Assembla Importer [ 24/Aug/10 10:59 AM ]

stu said: Updating tickets (#376, #392, #393)





[CLJ-391] namespaces should be able to replace their own vars Created: 29/Jun/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

The code that prevents vars from replacing vars referred in from other namespaces is too strict: it also prevents the :reload-all scenario for a single namespace by spotting collisions between the old and new versions of the same var.

See http://groups.google.com/group/clojure-dev/msg/13978a18923e3356



 Comments   
Comment by Assembla Importer [ 24/Aug/10 11:58 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/391
Attachments:
0391-namespaces-replace-own-vars.patch - https://www.assembla.com/spaces/clojure/documents/aUQI5kG_qr37uieJe5cbCb/download/aUQI5kG_qr37uieJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 11:58 AM ]

stu said: [file:aUQI5kG_qr37uieJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 11:58 AM ]

stu said: Updating tickets (#381, #386, #388, #391, #377)





[CLJ-388] fix gvec reflection warnings Created: 23/Jun/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

quick fix while I investigate followon issues...



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:52 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/388
Attachments:
0388-quick-fix.patch - https://www.assembla.com/spaces/clojure/documents/cuW8FoFWer37iDeJe5cbCb/download/cuW8FoFWer37iDeJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 10:52 AM ]

stu said: [file:cuW8FoFWer37iDeJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 10:52 AM ]

stu said: Updating tickets (#381, #386, #388, #391, #377)





[CLJ-387] clojure.java.shell needs different byte coercion Created: 22/Jun/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None


 Description   

Same as contrib issue https://www.assembla.com/spaces/clojure-contrib/tickets/83-clojure-contrib-shell-broken-with-clojure-commit-37d8f7a



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:50 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/387

Comment by Assembla Importer [ 24/Aug/10 10:50 AM ]

stu said: Fix for #392 fixes this as well. (See http://github.com/clojure/clojure/commit/7def88afe28221ad78f8d045ddbd87b5230cb03e)





[CLJ-386] spit works only on strings Created: 20/Jun/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Tom Faulhaber
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

As reported by Kevin Downey (http://groups.google.com/group/clojure-dev/browse_thread/thread/36e1fa06d91e1ee1):

user=> (spit "/tmp/foo" {:a 1})
java.lang.IllegalArgumentException: No matching method found: write
for class java.io.BufferedWriter
(NO_SOURCE_FILE:0)
user=>

This happens because the argument to spit isn't converted to a string before calling BufferedWriter.write



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:47 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/386
Attachments:
spit-fix.diff - https://www.assembla.com/spaces/clojure/documents/deEMXaFdKr35cIeJe5cbLr/download/deEMXaFdKr35cIeJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 10:47 AM ]

tomfaulhaber said: [file:deEMXaFdKr35cIeJe5cbLr]: A patch that converts arg to string (and adds some doc)

Comment by Assembla Importer [ 24/Aug/10 10:47 AM ]

stu said: Updating tickets (#381, #386, #388, #391, #377)





[CLJ-382] fix underive for multiple inheritance Created: 16/Jun/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Underive is incorrect: not all maps are updated, and the wrong key is used. See http://groups.google.com/group/clojure/browse_thread/thread/b70f8bf16de2216



 Comments   
Comment by Assembla Importer [ 24/Aug/10 11:43 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/382
Attachments:
382_underive_and_tests.patch - https://www.assembla.com/spaces/clojure/documents/bjcuyUNgSr37DFeJe5cbLr/download/bjcuyUNgSr37DFeJe5cbLr
0382-underive-more-tests-and-reorg-helpers.patch - https://www.assembla.com/spaces/clojure/documents/aGQTwUOW4r36MseJe5cbLr/download/aGQTwUOW4r36MseJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 11:43 AM ]

rob_lachlan said: [file:bjcuyUNgSr37DFeJe5cbLr]: Patch for underive fixing several issues, to core.clj. Also tests in multimethods.clj

Comment by Assembla Importer [ 24/Aug/10 11:43 AM ]

stu said: [file:aGQTwUOW4r36MseJe5cbLr]

Comment by Assembla Importer [ 24/Aug/10 11:43 AM ]

stu said: The second patch adds (hopefully) improved tests, plus a third commit that is just some needed reorg of test helpers.

This may look like a big change during RC, but I am going to argue that it isn't really, because (1) it is entirely localized to underive, (2) introduces no new behavior, and (3) the current underive is trivially broken, so how could this be worse?

Comment by Assembla Importer [ 24/Aug/10 11:43 AM ]

stu said: Updating tickets (#404, #422, #382, #423)





[CLJ-381] pprint: logical-block macro uses private vars Created: 15/Jun/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Tom Faulhaber
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Alex Ott noticed that the logical-block macro that's used to build dispatch tables uses two vars and a function that are private to clojure pprint. This makes it more difficult for programmers to build custom dispatch.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 11:43 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/381
Attachments:
level-in-macros.diff - https://www.assembla.com/spaces/clojure/documents/clc8hqEl4r35dfeJe5cbCb/download/clc8hqEl4r35dfeJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 11:43 AM ]

tomfaulhaber said: [file:clc8hqEl4r35dfeJe5cbCb]: Access private vars correctly

Comment by Assembla Importer [ 24/Aug/10 11:43 AM ]

tomfaulhaber said: This patch will use the #'ns/var idiom to access the private vars from the macro. It's a little tricky because binding doesn't seem to support that idiom, so we use push-thread-bindings directly.

Comment by Assembla Importer [ 24/Aug/10 11:43 AM ]

stu said: I have two questions for Rich:

1. I have hit the same issue with binding a private var. Is this approach idiomatic?

2. The patch uses var-get. What's the difference between var-get and deref? They follow a different code path in Var.java.

Patch works, and unless the answer to #1 or #2 is a problem this patch looks good.

Comment by Assembla Importer [ 24/Aug/10 11:43 AM ]

richhickey said: 1) yes
2) get has a slight optimization

Comment by Assembla Importer [ 24/Aug/10 11:43 AM ]

stu said: Updating tickets (#381, #386, #388, #391, #377)





[CLJ-377] fix file/line reporting in ant builds Created: 08/Jun/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

clojure.test figures out where a failing test is by manufacturing an exception instance during reporting, then crawling back up the stack a fixed distance to find the test.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 11:35 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/377
Attachments:
0377-fix-file-line-reporting.patch - https://www.assembla.com/spaces/clojure/documents/aV-RgEC0ur35QUeJe5cbCb/download/aV-RgEC0ur35QUeJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 11:35 AM ]

stu said: [file:aV-RgEC0ur35QUeJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 11:35 AM ]

stu said: This fix introduces a (tiny) API change for advanced users of clojure.test. If you are writing your own assert-expr method, you must call the new do-report instead of report. do-report adds :file and :line info to the result map, so that later code doesn't have to guess how far up the stack to crawl.

We can't change report to do this work, because it is rebound by several consumers.

We are unaware of any users who have actually written an assert-expr, so the impact of this change may be zero.

Comment by Assembla Importer [ 24/Aug/10 11:35 AM ]

richhickey said: This is still not quite right. When an unanticipated exception happens, it reports the exception cause line, not the test line. I think it should always say:

I was running this test here:
test file + line

and this bad thing happened:
stacktrace with cause up top

Comment by Assembla Importer [ 24/Aug/10 11:35 AM ]

stu said: Updating tickets (#381, #386, #388, #391, #377)





[CLJ-376] make sure tests pass on Windows Created: 08/Jun/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Aaron Bedra
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Comments   
Comment by Assembla Importer [ 24/Aug/10 11:35 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/376
Attachments:
376_windows_tests.diff - https://www.assembla.com/spaces/clojure/documents/dbJ0tUHSGr356VeJe5cbLA/download/dbJ0tUHSGr356VeJe5cbLA

Comment by Assembla Importer [ 24/Aug/10 11:35 AM ]

aaron said: 4bec81db4ee4e9e4227a Tested and working with Sun JDK 1.6.0_20 on Windows Home Premium 7 and ant 1.8.1

Comment by Assembla Importer [ 24/Aug/10 11:35 AM ]

aaron said: Correction:

Tests are still failing. Setting back to

Comment by Assembla Importer [ 24/Aug/10 11:35 AM ]

aaron said: [file:dbJ0tUHSGr356VeJe5cbLA]: Fixes tests on windows

Comment by Assembla Importer [ 24/Aug/10 11:35 AM ]

aaron said: Patch tested against 4bec81db4ee4e9e4227a66bb1a04ba06e95ea9b6

Comment by Assembla Importer [ 24/Aug/10 11:35 AM ]

stu said: Updating tickets (#376, #392, #393)

Comment by Assembla Importer [ 24/Aug/10 11:35 AM ]

importer said: (In [[r:4630d025d2101d13e626b56b3b2ba01950bd0ac9]]) Tests are now passing on windows refs #376

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>

Branch: master





[CLJ-367] defrecord doesn't work with certain field names Created: 28/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Konrad Hinsen
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

When a field name in a defrecord coincides with an argument name in one of the method implementations, strange things happen:

(defrecord Foo [o])
java.lang.RuntimeException: java.lang.IllegalArgumentException: Unable to resolve classname: Foo
at clojure.lang.Compiler.maybePrimitiveType(Compiler.java:1118)
at clojure.lang.Compiler$MethodExpr.emitTypedArgs(Compiler.java:1142)
...

(defrecord Foo [this that])
(let [a-foo (new Foo :a :b)]
(with-meta a-foo {:foo :bar}))
java.lang.StackOverflowError

The attached patch introduces gensyms for all the critical method argument names, such that clashes are no longer possible.

In Clojure-Dev: http://groups.google.com/group/clojure-dev/browse_thread/thread/9e4c1956d75588b8/8261a8d112f1eadf?lnk=gst&q=defrecord#8261a8d112f1eadf



 Comments   
Comment by Assembla Importer [ 24/Aug/10 8:21 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/367
Attachments:
defrecord-patch.diff - https://www.assembla.com/spaces/clojure/documents/bldqvQAM8r35_YeJe5cbLr/download/bldqvQAM8r35_YeJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 8:21 AM ]

stu said: This patch seems to work fine, but I have two questions for Rich:

  • Should the outer let gensym a symbol for all the thises, i.e. is there any memory/perf benefit to not generating a different autogensym for every method? Assuming no, but thought I would check.
  • Do I need to go back in git history and compare this to the point where defrecord worked like this originally, if it ever did? If so, can you point me to the commit?
Comment by Assembla Importer [ 24/Aug/10 8:21 AM ]

stu said: Updating tickets (#256, #257, #367, #358)





[CLJ-365] better defn error messages Created: 28/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

better error message for (defn foo (not an arg-vec)), plus a place to hang other arg validations for defn



 Comments   
Comment by Assembla Importer [ 24/Aug/10 12:21 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/365
Attachments:
0365-better-defn-error-messages.patch - https://www.assembla.com/spaces/clojure/documents/cHal4IAGur347HeJe5cbLr/download/cHal4IAGur347HeJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 12:21 AM ]

stu said: [file:cHal4IAGur347HeJe5cbLr]

Comment by Assembla Importer [ 24/Aug/10 12:21 AM ]

stu said: Updating tickets (#330, #357, #358, #365)





[CLJ-362] incorrect result of reductions for empty input sequences Created: 27/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

reductions does not return the correct result in case of an empty input sequence.

(reductions + nil)
actual: 0
expected: (0)



 Comments   
Comment by Assembla Importer [ 24/Aug/10 12:20 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/362
Attachments:
0001-Fix-reductions-on-empty-input-sequence.patch - https://www.assembla.com/spaces/clojure/documents/b5G536ABer36SaeJe5cbLr/download/b5G536ABer36SaeJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 12:20 AM ]

meikelbrandmeyer said: [file:b5G536ABer36SaeJe5cbLr]: Fix for ticket #362

Comment by Assembla Importer [ 24/Aug/10 12:20 AM ]

meikelbrandmeyer said: Fixed bug and added appropriate test

Comment by Assembla Importer [ 24/Aug/10 12:20 AM ]

stu said: Updating tickets (#327, #359, #360, #361, #362)





[CLJ-361] clojure.core/merge-with doesn't work with defrecord types Created: 27/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Konrad Hinsen
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

clojure.core/merge-with works only with map types that implement clojure.lang.IFn for element lookup. In particular, it doesn't work with types defined by defrecord.

http://groups.google.com/group/clojure-dev/browse_thread/thread/8e546e595a4c4cab/aa47af1770183c56?lnk=gst&q=merge-with#aa47af1770183c56



 Comments   
Comment by Assembla Importer [ 24/Aug/10 12:20 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/361
Attachments:
improve-merge-with.diff - https://www.assembla.com/spaces/clojure/documents/aJX5CiAAGr36gUeJe5cbCb/download/aJX5CiAAGr36gUeJe5cbCb
0361-improve-merge-with-plus-test.diff - https://www.assembla.com/spaces/clojure/documents/akEK3iBO4r356HeJe5cbLr/download/akEK3iBO4r356HeJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 12:20 AM ]

stu said: Konrad,

Can you please add a pointer to the discussion on the mailing list or irc that led to a ticket being created? It doesn't seem like much, but it is as huge help for me having context when I have a bunch of patches to review.

Thanks!
Stu

Comment by Assembla Importer [ 24/Aug/10 12:20 AM ]

stu said: [file:akEK3iBO4r356HeJe5cbLr]

Comment by Assembla Importer [ 24/Aug/10 12:20 AM ]

stu said: second patch subsumes first and adds test

Comment by Assembla Importer [ 24/Aug/10 12:20 AM ]

khinsen said: Stu,

I just added the pointer to the description!

Konrad.

Comment by Assembla Importer [ 24/Aug/10 12:20 AM ]

stu said: Updating tickets (#327, #359, #360, #361, #362)





[CLJ-360] NullPointerException on disj Created: 27/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

disj throws a NPE when given a nil set. Tested using a build of clojure master branch as of 2010-05-26.

Clojure 1.2.0-master-SNAPSHOT
user=> (disj nil :test)
java.lang.NullPointerException (NO_SOURCE_FILE:0)

Expected result to be nil.

http://groups.google.com/group/clojure/browse_thread/thread/3090d34f9ccf75ea



 Comments   
Comment by Assembla Importer [ 24/Aug/10 12:20 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/360
Attachments:
0001-Make-disj-nil-aware.patch - https://www.assembla.com/spaces/clojure/documents/bt3H1QABar34xReJe5cbLr/download/bt3H1QABar34xReJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 12:20 AM ]

meikelbrandmeyer said: [file:bt3H1QABar34xReJe5cbLr]: Patch for ticket #360

Comment by Assembla Importer [ 24/Aug/10 12:20 AM ]

meikelbrandmeyer said: Fixed disj and added appropriate test cases.

Comment by Assembla Importer [ 24/Aug/10 12:20 AM ]

stu said: Updating tickets (#327, #359, #360, #361, #362)





[CLJ-359] promote contrib string Created: 26/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Promote the following from clojure.contrib.string to a new namespace, clojure.string

  • join
  • chop
  • chomp
  • split (fix perf, return vector)
  • replace (subsumes all replace- variants)
  • replace-first (subsumes all replace-first- variants)
  • reverse
  • capitalize
  • upper-case
  • lower-case
  • trim

Where necessary, change fns to take the string as first arg

Issues raised on mailing list:

  • perf test, particularly join
  • design guidelines for when nil works
  • arg order / point-free style?
  • trim options
  • trim modifiers at end


 Comments   
Comment by Assembla Importer [ 24/Aug/10 12:18 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/359
Attachments:
0359-promote-string.patch - https://www.assembla.com/spaces/clojure/documents/aColQyBFar36SeeJe5cbCb/download/aColQyBFar36SeeJe5cbCb
0359-promote-string-take-2.patch - https://www.assembla.com/spaces/clojure/documents/cggc9eBOOr34uaeJe5cbCb/download/cggc9eBOOr34uaeJe5cbCb
0359-promote-string-take-3.patch - https://www.assembla.com/spaces/clojure/documents/dZkYPeB08r36cLeJe5cbLr/download/dZkYPeB08r36cLeJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 12:18 AM ]

stu said: [file:aColQyBFar36SeeJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 12:18 AM ]

stu said: [file:cggc9eBOOr34uaeJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 12:18 AM ]

stu said: Second patch subsumes first, thanks Sean Devlin for the review!

Comment by Assembla Importer [ 24/Aug/10 12:18 AM ]

stuart.sierra said: Request: retain the type-specific, performant versions of replace[-first]-str/char/re/by. Consider making "replace" a multimethod, or at least add to doc string that it is not performant.

Comment by Assembla Importer [ 24/Aug/10 12:18 AM ]

stuart.sierra said: Halloway says the type-checking 'replace' peforms on par with the type-specific fns, so I retract my request.

Comment by Assembla Importer [ 24/Aug/10 12:18 AM ]

stu said: [file:dZkYPeB08r36cLeJe5cbLr]

Comment by Assembla Importer [ 24/Aug/10 12:18 AM ]

stu said: Third patch susbumes others and adds a few fns that Stuart Sierra really wanted.

Comment by Assembla Importer [ 24/Aug/10 12:18 AM ]

importer said: (In [[r:b7f211356c27ba099f3dbe116539dbd9efa421df]]) string perf tweaks, tests #359

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>

Branch: master

Comment by Assembla Importer [ 24/Aug/10 12:18 AM ]

stu said: Updating tickets (#327, #359, #360, #361, #362)





[CLJ-358] pop! on a 33-item-long transient vector returns a persisted transient vector Created: 26/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

user=> (-> (range 33) vec transient pop! count )
java.lang.IllegalAccessError: Transient used after persistent! call (NO_SOURCE_FILE:0)

Obviously persistent! is never called.

The applied patch doesn't solve a similar issue with transient vectors of size 33+32^n with n >= 2/



 Comments   
Comment by Assembla Importer [ 24/Aug/10 12:17 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/358
Attachments:
pop-33-item-long-transient-vector.diff - https://www.assembla.com/spaces/clojure/documents/aJWSRMAjCr35eseJe5cbLA/download/aJWSRMAjCr35eseJe5cbLA
0358-fix-pop-across-node-boundary.patch - https://www.assembla.com/spaces/clojure/documents/d-tOhgApGr34XueJe5cbLA/download/d-tOhgApGr34XueJe5cbLA
0001-fix-pop-when-the-tree-depth-decreases.patch - https://www.assembla.com/spaces/clojure/documents/b42sq8AIOr36DmeJe5cbCb/download/b42sq8AIOr36DmeJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 12:17 AM ]

cgrand said: [file:aJWSRMAjCr35eseJe5cbLA]: patch

Comment by Assembla Importer [ 24/Aug/10 12:17 AM ]

cgrand said: 1.1 has the same bug

Comment by Assembla Importer [ 24/Aug/10 12:17 AM ]

stu said: [file:d-tOhgApGr34XueJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 12:17 AM ]

stu said: second patch includes cgrand's fix plus a test

Comment by Assembla Importer [ 24/Aug/10 12:17 AM ]

cgrand said: (In [[r:7700d66d5a657d2102ddeb560d52bca758669ed9]]) fix pop! on 33-item-long transient vectors. See #358.

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
Signed-off-by: STUART HALLOWAY <stuart@STUART-HALLOWAYs-MacBook-Pro.local>

Branch: master

Comment by Assembla Importer [ 24/Aug/10 12:17 AM ]

cgrand said: [file:b42sq8AIOr36DmeJe5cbCb]: patch (and updated tests) for transient vectors of size 33+32^n

Comment by Assembla Importer [ 24/Aug/10 12:17 AM ]

stu said: Updating tickets (#330, #357, #358, #365)

Comment by Assembla Importer [ 24/Aug/10 12:17 AM ]

stu said: reopened: cgrand's 5/28 patch needs to be applied.

in general, I would prefer opening a new ticket, and never re-opening old ones. Thoughts?

Comment by Assembla Importer [ 24/Aug/10 12:17 AM ]

stu said: Updating tickets (#256, #257, #367, #358)





[CLJ-357] promote contrib javadoc Created: 26/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Aside: while at it, don't use the clojure.repl/*-fns at the repl



 Comments   
Comment by Assembla Importer [ 24/Aug/10 5:17 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/357
Attachments:
0357-promote-contrib-javadoc.patch - https://www.assembla.com/spaces/clojure/documents/dEhdi4AhKr365BeJe5cbCb/download/dEhdi4AhKr365BeJe5cbCb
0357-promote-contrib-javadoc-2.patch - https://www.assembla.com/spaces/clojure/documents/b8LexKAoqr34WYeJe5cbLr/download/b8LexKAoqr34WYeJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 5:17 PM ]

stu said: [file:dEhdi4AhKr365BeJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 5:17 PM ]

stu said: other fns that might be auto-referred at the repl: browse-url and sh

Comment by Assembla Importer [ 24/Aug/10 5:17 PM ]

stu said: [file:b8LexKAoqr34WYeJe5cbLr]

Comment by Assembla Importer [ 24/Aug/10 5:17 PM ]

stu said: second patch subsumes first, and lets 'name' handle strings

Comment by Assembla Importer [ 24/Aug/10 5:17 PM ]

richhickey said: I'm confused by this patch - what's clojure.shell?

Comment by Assembla Importer [ 24/Aug/10 5:17 PM ]

stu said: It's Chousers clojure.contrib.shell-out. Javadoc has a dependency on it. We could make it private, but it's darn useful of itself, and I have audited the code, making changes and exposing an API that I am comfortable supporting.

Comment by Assembla Importer [ 24/Aug/10 5:17 PM ]

stu said: Updating tickets (#330, #357, #358, #365)





[CLJ-356] better error message on failed refer Created: 23/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

error message "is not public" is misleading when usually the var doesn't even exist.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 5:14 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/356
Attachments:
0356-refer-error-message.patch - https://www.assembla.com/spaces/clojure/documents/dtquF6zQir36upeJe5cbLA/download/dtquF6zQir36upeJe5cbLA

Comment by Assembla Importer [ 24/Aug/10 5:14 PM ]

stu said: [file:dtquF6zQir36upeJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 5:14 PM ]

stu said: Updating tickets (#333, #349, #355, #356)





[CLJ-355] eliminate reflection from bit-shift slow path Created: 22/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

"slow path" doesn't have to be "cruelly slow path"



 Comments   
Comment by Assembla Importer [ 24/Aug/10 5:14 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/355
Attachments:
0355-eliminate-reflection-from-bitshift-slow-path.patch - https://www.assembla.com/spaces/clojure/documents/cwrtVszD4r37kdeJe5cbLr/download/cwrtVszD4r37kdeJe5cbLr
0355-eliminate-reflection-from-bitshift-take-2.patch - https://www.assembla.com/spaces/clojure/documents/cwhEQAzZ0r34goeJe5cbCb/download/cwhEQAzZ0r34goeJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 5:14 PM ]

stu said: [file:cwrtVszD4r37kdeJe5cbLr]

Comment by Assembla Importer [ 24/Aug/10 5:14 PM ]

richhickey said: You want to use intValue of n, rather than hardwire Integer

Comment by Assembla Importer [ 24/Aug/10 5:14 PM ]

stu said: [file:cwhEQAzZ0r34goeJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 5:14 PM ]

stu said: second patch only

Comment by Assembla Importer [ 24/Aug/10 5:14 PM ]

stu said: Updating tickets (#333, #349, #355, #356)





[CLJ-353] Deftypes not re-evaluated when protocols change; causes errors Created: 20/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Rich Hickey
Resolution: Completed Votes: 0
Labels: None


 Description   

I keep having to restart my JVM to avoid a puzzling issue when changing protocol definitions.

Here's the simplest way to reproduce the problem:

Start with file protoproblem/proto.clj:

(ns protoproblem.proto)

   (defprotocol Steps
     (one [x])
     (two [x]))
</code></pre>

and file protoproblem/impl.clj:
<pre><code>   (ns protoproblem.impl
     (:require [protoproblem.proto :as proto]))

   (deftype ArraySteps [a]
     proto/Steps
     (one [x] (first a))
     (two [x] (second a)))
</code></pre>

In the repl, everything works as expected:
<pre><code>   user> (load "protoproblem/proto")
   nil
   user> (load "protoproblem/impl")
   nil
   user> (protoproblem.proto/one (protoproblem.impl.ArraySteps. [1 2]))
   1
</code></pre>

Now, we redefine the protocol by commenting out the 'one' method def in proto.clj, and then reloading it:
<pre><code>   user=> (load "protoproblem/proto")
   nil
   user=> (protoproblem.proto/one (protoproblem.impl.ArraySteps. [1 2]))
   java.lang.NullPointerException (NO_SOURCE_FILE:9)
   user=> (load "protoproblem/impl")
   java.lang.IllegalArgumentException: Can't define method not in interfaces: one (impl.clj:5)
</code></pre>

That's pretty much as expected. But what if we try to get back to how things were, by reversing the changes in proto.clj, and reloading? This is where the problems arise:
<pre><code>   user=> (load "protoproblem/proto")
   nil
   user=> (load "protoproblem/impl")
   nil
   user=> (protoproblem.proto/one (protoproblem.impl.ArraySteps. [1 2]))
   java.lang.IllegalArgumentException: No implementation of method: :one of protocol: #'protoproblem.proto/Steps found for class: protoproblem.impl.ArraySteps (NO_SOURCE_FILE:0)

Ouch!

At this point, I have to restart my JVM to proceed, which is making incremental development of protocols-based code unusually tedious.

I initially encountered the behaviour using "C-c C-k" under slime/swank-clojure, but the above transcript is from a plain command-line repl, using a Clojure 1.2 snapshot from today. (The same thing happened with a snapshot from 2 weeks ago.)

When using "reify" inside a factory function instead of the constructor for a "deftype", everything works as expected.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 9:12 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/353

Comment by Assembla Importer [ 24/Aug/10 9:12 AM ]

cgrand said: Is this the same DynamicClassLoader caching problem as in #368?

Comment by Assembla Importer [ 24/Aug/10 9:12 AM ]

richhickey said: (In [[r:f47b3d6f028e0370c495383731a449092d0ae451]]) disable don't-recompile-if-same-source in DynamicClassLoader, fixes #353

Branch: master





[CLJ-352] clear macro meta when binding root of a var Created: 19/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Comments   
Comment by Assembla Importer [ 24/Aug/10 8:11 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/352
Attachments:
0352-clear-macro-meta.patch - https://www.assembla.com/spaces/clojure/documents/dcHhH2y60r36u-eJe5cbLA/download/dcHhH2y60r36u-eJe5cbLA

Comment by Assembla Importer [ 24/Aug/10 8:11 AM ]

stu said: [file:dcHhH2y60r36u-eJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 8:11 AM ]

stu said: Updating tickets (#311, #347, #352)





[CLJ-351] Disable transients after persistent! call Created: 19/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Unassigned
Resolution: Declined Votes: 0
Labels: None


 Comments   
Comment by Assembla Importer [ 24/Aug/10 8:10 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/351





[CLJ-349] propagate metadata on protocol fns Created: 13/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

return type hints, arg lists, docstrings



 Comments   
Comment by Assembla Importer [ 24/Aug/10 8:05 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/349
Attachments:
0349-propagate-protocol-fn-metadata.patch - https://www.assembla.com/spaces/clojure/documents/bQUYLEzDKr35o-eJe5cbCb/download/bQUYLEzDKr35o-eJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 8:05 AM ]

stu said: [file:bQUYLEzDKr35o-eJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 8:05 AM ]

stu said: Updating tickets (#333, #349, #355, #356)





[CLJ-347] Extend pprint to correctly handle data inside ref types Created: 12/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Tom Faulhaber
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

It's important that pprint can "see inside" all ref types so that it can format Clojure data inside them, This patch adds that, some more tests, and a little change to conform to the coding guidelines.

This is the last planned update to pprint for 1.2. Only approved bugs will be fixed from here on out.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 8:01 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/347
Attachments:
pprint-update.diff - https://www.assembla.com/spaces/clojure/documents/dw2yDkxE4r37MgeJe5cbLA/download/dw2yDkxE4r37MgeJe5cbLA
0347-pprint-update-2.diff - https://www.assembla.com/spaces/clojure/documents/b6MkCuy7ar36cDeJe5cbCb/download/b6MkCuy7ar36cDeJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 8:01 AM ]

stu said: [file:b6MkCuy7ar36cDeJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 8:01 AM ]

stu said: Second patch subsumes first and add tests.

Comment by Assembla Importer [ 24/Aug/10 8:01 AM ]

stu said: Updating tickets (#311, #347, #352)





[CLJ-344] reduce docstring args don't match docs Created: 10/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

The reduce docstring says lists the arg forms as ([f coll] [f start coll]) but the docstring uses "val" instead of "start" in the description. To fix, replace all "val" with "start".

clojure.core/reduce
([f coll] [f start coll])
f should be a function of 2 arguments. If val is not supplied,
returns the result of applying f to the first 2 items in coll, then
applying f to that result and the 3rd item, etc. If coll contains no
items, f must accept no arguments as well, and reduce returns the
result of calling f with no arguments. If coll has only 1 item, it
is returned and f is not called. If val is supplied, returns the
result of applying f to val and the first item in coll, then
applying f to that result and the 2nd item, etc. If coll contains no
items, returns val and f is not called.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 8:58 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/344
Attachments:
0344-reduce-var-names.patch - https://www.assembla.com/spaces/clojure/documents/aybc_syEOr37oxeJe5cbLA/download/aybc_syEOr37oxeJe5cbLA

Comment by Assembla Importer [ 24/Aug/10 8:58 AM ]

stu said: [file:aybc_syEOr37oxeJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 8:58 AM ]

stu said: Updating tickets (#317, #344)





[CLJ-343] duck type RT.err usage Created: 07/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Some tools rebind err to PrintWriters, others (e.g. swank) to merely Writers. Work with all of them.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 8:56 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/343
Attachments:
0343-duck-type-rt-err.patch - https://www.assembla.com/spaces/clojure/documents/cGfwMswAOr34greJe5cbLA/download/cGfwMswAOr34greJe5cbLA

Comment by Assembla Importer [ 24/Aug/10 8:56 AM ]

stu said: [file:cGfwMswAOr34greJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 8:56 AM ]

stu said: Updating tickets (#337, #338, #343)





[CLJ-341] Vec test bugs. Created: 06/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Daniel Solano Gómez
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

There are a couple of bugs in the tests defined in clojure.test-clojure.vectors:

1. There are two definitions of test-vec (from different patches), so the second overrides the first.

2. The rand-replace function for the compare tests should use (rand-int 99) instead of (rand-int 100). Currently, if 99 is chosen, it will append to the end of the sequence instead of replacing the last element.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 11:54 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/341
Attachments:
341-vec-tests.patch - https://www.assembla.com/spaces/clojure/documents/cXxBGuwl0r35ypeJe5cbLr/download/cXxBGuwl0r35ypeJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 11:54 AM ]

dsg said: [file:cXxBGuwl0r35ypeJe5cbLr]

Comment by Assembla Importer [ 24/Aug/10 11:54 AM ]

dsg said: Attached patch that should fix both issues.

Comment by Assembla Importer [ 24/Aug/10 11:54 AM ]

importer said: (In [[r:3f8be323e5b1c8ca3b51e946930174b90284ace7]]) Rename two vec-test to be distinct and fix upper bound on random sequence modifier, see #341

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>

Branch: master

Comment by Assembla Importer [ 24/Aug/10 11:54 AM ]

stu said: Updating tickets (#310, #318, #341)





[CLJ-340] reify doc string examples are missing the 'this' argument Created: 05/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

The reify doc string correctly discusses the need for a "this" argument, but fails to put it in the example usage it gives.

IIUC, the defprotocol examples are also missing the "this" argument.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 9:53 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/340
Attachments:
this-arg-patch1.diff - https://www.assembla.com/spaces/clojure/documents/dCGsi2wgar37ITeJe5cbLA/download/dCGsi2wgar37ITeJe5cbLA

Comment by Assembla Importer [ 24/Aug/10 9:53 AM ]

fogus said: [file:dCGsi2wgar37ITeJe5cbLA]: Adds the this arg and some verbiage to the reify and defprotocol docstrings.

Comment by Assembla Importer [ 24/Aug/10 9:53 AM ]

fogus said: Fixed the docstrings for reify and defprotocol to include the 'this' parameter. Also added some verbiage to the doc text to mention them. Also added results for the defprotocol examples.

Comment by Assembla Importer [ 24/Aug/10 9:53 AM ]

stu said: Updating tickets (#340, #399, #402, #403, #413)





[CLJ-338] promote c.c.set subset? and superset? to c.set Created: 05/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:23 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/338
Attachments:
0338-promote-subset-superset.patch - https://www.assembla.com/spaces/clojure/documents/aq4HQswdyr37VreJe5cbCb/download/aq4HQswdyr37VreJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 10:23 AM ]

stu said: [file:aq4HQswdyr37VreJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 10:23 AM ]

stu said: Updating tickets (#337, #338, #343)





[CLJ-337] mark deprecations Created: 04/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Last chance to care: Should the values for the deprecated tag be:

  • 'true' only?
  • a version number, just like the values of :added (Tom's original proposal)?
  • free text, allowing for suggestions and commentary

I (Stu) am ok with either of the first two.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:52 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/337
Attachments:
0337-mark-deprecations.patch - https://www.assembla.com/spaces/clojure/documents/dwbEi8wcSr37WCeJe5cbLA/download/dwbEi8wcSr37WCeJe5cbLA

Comment by Assembla Importer [ 24/Aug/10 10:52 AM ]

tomfaulhaber said: I think it should be the version number.

I did occur to me that we could add another field with human readable information :deprecation-info or something like that. That way, we have the raw version and if someone wants to put more, they can.

I'm not sure that field would need to go into clojure core right now, but could be something to add later. KISS!

Comment by Assembla Importer [ 24/Aug/10 10:52 AM ]

richhickey said: Version number. Doc can be updated with alternatives

Comment by Assembla Importer [ 24/Aug/10 10:52 AM ]

stu said: I scanned core to see if there was anything else I would want to deprecate... Basically no--could deprecate memfn if anybody cared enough.

Comment by Assembla Importer [ 24/Aug/10 10:52 AM ]

stu said: [file:dwbEi8wcSr37WCeJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 10:52 AM ]

stu said: Updating tickets (#337, #338, #343)





[CLJ-335] integrate pprint docs into clojure.org (?) Created: 04/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Tom Faulhaber
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Comments   
Comment by Assembla Importer [ 24/Aug/10 8:52 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/335
Attachments:
move-pprint-doc.diff - https://www.assembla.com/spaces/clojure/documents/aCegXezw4r37-XeJe5cbCb/download/aCegXezw4r37-XeJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 8:52 AM ]

tomfaulhaber said: This will happen automatically when I fix autodoc.

Creating the multi-branch version of autodoc meant that some things (like conversion of markdown files, etc.) which were written in ant stopped working (because the whole model that the ant stuff used was incompatible with thinking about multiple branches).

I am in the process of integrating all the stuff that was in ant into the CLojure code. This will make life better in all sorts of ways.

Once that's done, the pprint docs will be linked directly from the pprint API page.

Hopefully in a few days.

Comment by Assembla Importer [ 24/Aug/10 8:52 AM ]

tomfaulhaber said: I haven't gotten here yet, but this shouldn't hold back the release process since all the changes here will be in autodoc and not in Clojure itself.

Comment by Assembla Importer [ 24/Aug/10 8:52 AM ]

tomfaulhaber said: [file:aCegXezw4r37-XeJe5cbCb]: Move the pprint doc files down a directory level

Comment by Assembla Importer [ 24/Aug/10 8:52 AM ]

tomfaulhaber said: I realized that, because the autodoc generation is constructed a little bit differently for clojure than it is for clojure.contrib, we need to add an extra directory level under doc/.





[CLJ-334] double-colon with nonexistent alias throws NPE Created: 04/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

double-colon with nonexistent alias throws NPE

Clojure 1.1.0
user=> ::a/dig
java.lang.NullPointerException



 Comments   
Comment by Assembla Importer [ 24/Aug/10 8:52 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/334
Attachments:
0334-handle-bad-keyword-syntax.patch - https://www.assembla.com/spaces/clojure/documents/byL5qexd8r36eheJe5cbCb/download/byL5qexd8r36eheJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 8:52 AM ]

stu said: Updating tickets (#333, #334)

Comment by Assembla Importer [ 24/Aug/10 8:52 AM ]

stu said: [file:byL5qexd8r36eheJe5cbCb]





[CLJ-333] protocol redef NPE Created: 04/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

outgrowth of Mike's tests in #239.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 8:52 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/333
Attachments:
0333-protocol-redef-npe.patch - https://www.assembla.com/spaces/clojure/documents/aUPKaqzDar36GpeJe5cbLA/download/aUPKaqzDar36GpeJe5cbLA

Comment by Assembla Importer [ 24/Aug/10 8:52 AM ]

stu said: Updating tickets (#333, #334)

Comment by Assembla Importer [ 24/Aug/10 8:52 AM ]

stu said: [file:aUPKaqzDar36GpeJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 8:52 AM ]

richhickey said: It's hard for me to tell if this is the right way to fix this bug when I have no idea what the bug is from this ticket

Comment by Assembla Importer [ 24/Aug/10 8:52 AM ]

stu said: The (sortof) easy way to see the problem: Just run the new test without the compiler change in place.

The test is somewhat obfuscated by all the calls to eval (so the problem happens at test time instead of compile time). But extracting the evals you get

(defprotocol Elusive (old-method [x]))
(defprotocol Elusive (new-method [x])
(old-method (reify Elusive (new-method [x])))

Comment by Assembla Importer [ 24/Aug/10 8:52 AM ]

stu said: Updating tickets (#333, #349, #355, #356)





[CLJ-332] last var in wins Created: 03/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Rich Hickey
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

not sure we should import source-fn and dir-fn into repl



 Comments   
Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/332
Attachments:
0332-refer-cant-bean-intern.patch - https://www.assembla.com/spaces/clojure/documents/dwu7YMy7Or36MmeJe5cbLr/download/dwu7YMy7Or36MmeJe5cbLr
0332-last-var-wins-for-core-only.patch - https://www.assembla.com/spaces/clojure/documents/dSfMD6zoqr37LaeJe5cbLr/download/dSfMD6zoqr37LaeJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

stu said: [file:dwu7YMy7Or36MmeJe5cbLr]

Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

stu said: [file:dSfMD6zoqr37LaeJe5cbLr]

Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

stu said: "last var wins for core only" is the only patch that should be applied





[CLJ-331] Fix PersistentQueue equality methods Created: 03/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

(= (into clojure.lang.PersistentQueue/EMPTY (range 5)) (into clojure.lang.PersistentQueue/EMPTY (range 5)))
=> NPE



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:51 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/331
Attachments:
fix-q-equality.diff - https://www.assembla.com/spaces/clojure/documents/b1_H5qvTer36QjeJe5cbCb/download/b1_H5qvTer36QjeJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 10:51 AM ]

stu said: Added to 1.2 due to its relationship to #281.

Comment by Assembla Importer [ 24/Aug/10 10:51 AM ]

stu said: Updating tickets (#281, #331)





[CLJ-330] Declare wipes out existing var metadata Created: 03/May/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

If you call declare on a var that has already been defined, it wipes out the metadata on that var. While this is possible to avoid in most cases, it makes like difficult for automatic code generators or scanners. In particular, autodoc loses information in some cases because of this if it scans a file that has already been pulled in because of a dependency.

Here's an example. This code:

(defn hello "I like documentation!" [] (println "works"))
(hello)
(println (:doc (meta #'hello)))

(println "I do declare!")
(declare hello)

(hello)
(println (:doc (meta #'hello)))

Prints:

works
I like documentation!
I do declare!
works
nil

The last line should be "I like documentation!" again.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/330
Attachments:
declare-test.clj - https://www.assembla.com/spaces/clojure/documents/bZn8imvTer36QjeJe5cbCb/download/bZn8imvTer36QjeJe5cbCb
declare-preserve-meta.diff - https://www.assembla.com/spaces/clojure/documents/bwNFCIwMSr34TZeJe5cbCb/download/bwNFCIwMSr34TZeJe5cbCb
0330-def-sans-init-touches-no-meta.patch - https://www.assembla.com/spaces/clojure/documents/dRHbioAFCr34lYeJe5cbLA/download/dRHbioAFCr34lYeJe5cbLA

Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

tomfaulhaber said: [file:bwNFCIwMSr34TZeJe5cbCb]: Patch to preserve metadata in declare

Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

richhickey said: I'm not sure about this one. Are you evaluating code in autodoc? Otherwise, I don't see the issue for scanners/parsers

Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

tomfaulhaber said: Yeah, my immediate case is autodoc, which loads files without knowing the user desired load order (important for things like contrib or nowadays clojure itself where there is no "root" that would pull everything in).

But the other case I was thinking of was something more like yacc where code is being generated in little snippets. Rather than building all the dependency relationships between the snippets, a program may want to just add declares to the snippet for the "external" vars that it references. Then the individual generated snippets can be emitted independently without concern for order.

At a higher level, why would declare preserve the value of a var but squash the metadata? Seems like it should be all or nothing.

Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

richhickey said: >At a higher level, why would declare preserve the value of a var but squash the metadata? Seems like it should be all or nothing.

Quite possibly, but then I think it might become declare == unbind-root, which doesn't help you either, does it?

Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

tomfaulhaber said: Two issues with that, one short-term for autodoc and one more abstract:

1) With the current implementation of defmulti (even with my other patch in ticket #309), you wouldn't be able to correctly reload a file that had (declare foo) ... (defmulti foo ...). This is already causing autodoc to mis-document on of the contrib namespaces. (Because it gets loaded twice, once with a use and once with a load).

2) It means that any generation tool that wants to generate "order independent" snippets would be required to do all its own book-keeping in order to determine whether to emit a declare or not.

To me it feels like the more correct semantics would be to have declare be a no-op wrt binding. If we need something for explicitly unbinding, (def var) would be a more obvious candidate. (Right now, I think they are equivalent.)

Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

stu said: [file:dRHbioAFCr34lYeJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

stu said: Third patch takes a different approach, working at level of def instead of declare. Def forms without an init-expr set no metadata.

Questions:

(1) Tom, does this solve the problems you are seeing?

(2) Rich, can DefExpr's .meta be typed as MapExpr, instead of Expr?

(3) A further wrinkle would be to def-sans-init set metadata if no metadata is present yet. Too cute?

Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

stu said: Updating tickets (#330, #357, #358, #365)





[CLJ-329] Fix defrecord keyword lookup on fields matching no-arg methods Created: 30/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Rich Hickey
Resolution: Completed Votes: 0
Labels: None


 Description   

Current behaviour:

user=> (defrecord Foo [size seq])
user.Foo
user=> (:size (Foo. 42 :b))
2
user=> (:seq (Foo. 42 :b))
([:size 42]
 [:seq :b])

Patch attached, with a test. Thoughts:

1. filtering on base-fields would probably be cleaner, but it looks like (class ~'gtarget) isn't fully formed at that point?
2. this results in a .valAt lookup for any fields that collide with no-arg methods implemented by the defrecord's class. That's unavoidable AFAICT.
3. The best solution would be to disambiguate field access vs. no-arg method invocation, i.e. have a variant of (. obj field) that would be specifically for field access (which is very occasionally needed elsewhere as well). This would nullify # 2.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:50 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/329
Attachments:
no-arg-defrecord-fields.diff - https://www.assembla.com/spaces/clojure/documents/aLddOwvi8r35mPeJe5cbLr/download/aLddOwvi8r35mPeJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 10:50 AM ]

richhickey said: (In [[r:762d1531b6440722d5d1c0dfee4776d99289385e]]) Fix defrecord keyword lookup on fields matching no-arg methods, fixes #329

Branch: master





[CLJ-328] don't assume chunked seq will alway stay chunked Created: 30/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

optimized reduce always needs to check if underlying type can change as it walks the seq



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:49 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/328
Attachments:
unchunked-reduce-fix.patch - https://www.assembla.com/spaces/clojure/documents/c-E6fQvgSr34E_eJe5cbLr/download/c-E6fQvgSr34E_eJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 10:49 AM ]

stu said: [file:c-E6fQvgSr34E_eJe5cbLr]





[CLJ-327] core fns cannot use literal Patterns Created: 30/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Christophe Grand
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Discussed here: http://groups.google.com/group/clojure-dev/browse_thread/thread/6c6c5d8ced3c6bea

Before pr-on is ready to use, code using pattern literals fails on initialization because they weren't printed correctly by RT/print at compile-time.
This actually give such messages:

  • #"\." is a Character and cannot be cast to Pattern
  • #"[.]" is a PersistentVector and cannot be cast to Pattern

The current patch is simpler than print-method for Pattern because it only tries to print readably Patterns created by RegexReader and not any user-created Pattern.

For the record print-method for Pattern is buggy in trying to support \Q and \E:
Here is a pathological case:
user=> (re-pattern "\\Q\\\\E\"")
#"\Q\\E\E\"\Q" ; should be #"\Q\E\\\Q\E\""
There's an obvious quick fix for that but I doubt one can achieve proper printing of all Patterns



 Comments   
Comment by Assembla Importer [ 24/Aug/10 11:49 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/327
Attachments:
rt-print-pattern.patch - https://www.assembla.com/spaces/clojure/documents/bTsLh2vfir37ljeJe5cbLr/download/bTsLh2vfir37ljeJe5cbLr
0327-rt-print-pattern-with-test.patch - https://www.assembla.com/spaces/clojure/documents/anOsXqBYur363eeJe5cbLA/download/anOsXqBYur363eeJe5cbLA

Comment by Assembla Importer [ 24/Aug/10 11:49 AM ]

stu said: [file:anOsXqBYur363eeJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 11:49 AM ]

stu said: second patch subsumes first and adds test

Comment by Assembla Importer [ 24/Aug/10 11:49 AM ]

stu said: Updating tickets (#327, #359, #360, #361, #362)





[CLJ-325] mark :added for 1.0 vars Created: 29/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Followup to #321 but for all the original 1.0 vars.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 7:49 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/325
Attachments:
added-10-and-test-all-public-doced-fns-are-added.patch - https://www.assembla.com/spaces/clojure/documents/dupIcIu-er35HyeJe5cbLr/download/dupIcIu-er35HyeJe5cbLr
added-10-and-test-all-public-doced-fns-are-added.patch - https://www.assembla.com/spaces/clojure/documents/dxEu-au-er35HyeJe5cbLr/download/dxEu-au-er35HyeJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 7:49 AM ]

stu said: [file:dupIcIu-er35HyeJe5cbLr]

Comment by Assembla Importer [ 24/Aug/10 7:49 AM ]

stu said: [file:dxEu-au-er35HyeJe5cbLr]

Comment by Assembla Importer [ 24/Aug/10 7:49 AM ]

tomfaulhaber said: Also, we should put :deprecated tags on the functions that are deprecated.

Comment by Assembla Importer [ 24/Aug/10 7:49 AM ]

stu said: Updating tickets (#301, #325)





[CLJ-324] 1.2 release notes Created: 29/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Sean Devlin
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

The 1.1 release notes were very nice. We need someone to do the same for 1.2. Basically this means

  • walking through the git commit messages (and maybe some diffs)
  • walking through the assembla tickets

and producing a text file similar to the 1.1 change file.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 7:49 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/324

Comment by Assembla Importer [ 24/Aug/10 7:49 AM ]

stu said: Updating tickets (#324)





[CLJ-323] get annotation tests working regardless of jdk 5/later Created: 29/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Comments   
Comment by Assembla Importer [ 24/Aug/10 7:48 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/323
Attachments:
annotations-tests-working-on-5-and-later.patch - https://www.assembla.com/spaces/clojure/documents/dVf1JSu7er36UBeJe5cbLA/download/dVf1JSu7er36UBeJe5cbLA

Comment by Assembla Importer [ 24/Aug/10 7:48 AM ]

stu said: [file:dVf1JSu7er36UBeJe5cbLA]





[CLJ-321] mark when vars got added to clojure Created: 28/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Screened

 Description   

Third patch is the one. Adds metadata after docstring, public doc-ed vars only.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:17 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/321
Attachments:
added-metadata.patch - https://www.assembla.com/spaces/clojure/documents/adfZhGuYCr342jeJe5cbCb/download/adfZhGuYCr342jeJe5cbCb
meta-added-after-docstring.patch - https://www.assembla.com/spaces/clojure/documents/bKqdmMu5yr37KAeJe5cbLA/download/bKqdmMu5yr37KAeJe5cbLA
added-metadata-for-public-doced-vars.patch - https://www.assembla.com/spaces/clojure/documents/d-5xbmu50r363qeJe5cbLA/download/d-5xbmu50r363qeJe5cbLA

Comment by Assembla Importer [ 24/Aug/10 10:17 AM ]

stu said: # added from 1.0 to 1.1
clojure.core/assert
clojure.core/->>
clojure.core/assoc!
clojure.core/boolean-array
clojure.core/booleans
clojure.core/bound-fn
clojure.core/bound-fn*
clojure.core/byte-array
clojure.core/bytes
clojure.core/char-array
clojure.core/char?
clojure.core/chars
clojure.core/chunk
clojure.core/chunk-append
clojure.core/chunk-buffer
clojure.core/chunk-cons
clojure.core/chunk-first
clojure.core/chunk-next
clojure.core/chunk-rest
clojure.core/chunked-seq?
clojure.core/conj!
clojure.core/deliver
clojure.core/disj!
clojure.core/dissoc!
clojure.core/future-cancel
clojure.core/future-cancelled?
clojure.core/future-done?
clojure.core/future?
clojure.core/get-thread-bindings
clojure.core/juxt
clojure.core/persistent!
clojure.core/pop!
clojure.core/pop-thread-bindings
clojure.core/promise
clojure.core/push-thread-bindings
clojure.core/ref-history-count
clojure.core/ref-max-history
clojure.core/ref-min-history
clojure.core/short-array
clojure.core/shorts
clojure.core/sorted-set-by
clojure.core/take-last
clojure.core/transient
clojure.core/with-bindings
clojure.core/with-bindings*
clojure.core/with-loading-context
clojure.stacktrace/e
clojure.stacktrace/print-cause-trace
clojure.stacktrace/print-stack-trace
clojure.stacktrace/print-throwable
clojure.stacktrace/print-trace-element
clojure.stacktrace/root-cause
clojure.test/initial-report-counters
clojure.test/load-tests
clojure.test/report-counters
clojure.test/stack-trace-depth
clojure.test/test-out
clojure.test/testing-contexts
clojure.test/testing-vars
clojure.test/are
clojure.test/assert-any
clojure.test/assert-expr
clojure.test/assert-predicate
clojure.test/compose-fixtures
clojure.test/deftest
clojure.test/deftest-
clojure.test/file-position
clojure.test/function?
clojure.test/get-possibly-unbound-var
clojure.test/inc-report-counter
clojure.test/is
clojure.test/join-fixtures
clojure.test/report
clojure.test/run-all-tests
clojure.test/run-tests
clojure.test/set-test
clojure.test/successful?
clojure.test/test-all-vars
clojure.test/test-ns
clojure.test/test-var
clojure.test/testing
clojure.test/testing-contexts-str
clojure.test/testing-vars-str
clojure.test/try-expr
clojure.test/use-fixtures
clojure.test/with-test
clojure.test/with-test-out
clojure.walk/keywordize-keys
clojure.walk/macroexpand-all
clojure.walk/postwalk
clojure.walk/postwalk-demo
clojure.walk/postwalk-replace
clojure.walk/prewalk
clojure.walk/prewalk-demo
clojure.walk/prewalk-replace
clojure.walk/stringify-keys
clojure.walk/walk

Comment by Assembla Importer [ 24/Aug/10 10:17 AM ]

stu said: ; Added from 1.1 to 1.2
clojure.core/-cache-protocol-fn
clojure.core/-reset-methods
clojure.core/EMPTY-NODE
clojure.core/agent-error
clojure.core/bound?
clojure.core/case
clojure.core/definterface
clojure.core/defprotocol
clojure.core/defrecord
clojure.core/deftype
clojure.core/denominator
clojure.core/error-handler
clojure.core/error-mode
clojure.core/extend
clojure.core/extend-protocol
clojure.core/extend-type
clojure.core/extenders
clojure.core/extends?
clojure.core/find-protocol-impl
clojure.core/find-protocol-method
clojure.core/flatten
clojure.core/frequencies
clojure.core/group-by
clojure.core/hash-combine
clojure.core/munge
clojure.core/namespace-munge
clojure.core/numerator
clojure.core/object-array
clojure.core/partition-all
clojure.core/partition-by
clojure.core/rand-nth
clojure.core/reductions
clojure.core/reify
clojure.core/remove-all-methods
clojure.core/restart-agent
clojure.core/satisfies?
clojure.core/seq-contains?
clojure.core/set-error-handler!
clojure.core/set-error-mode!
clojure.core/shuffle
clojure.core/thread-bound?
clojure.core/vector-of

Comment by Assembla Importer [ 24/Aug/10 10:17 AM ]

stu said: [file:adfZhGuYCr342jeJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 10:17 AM ]

stu said: [file:bKqdmMu5yr37KAeJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 10:17 AM ]

stu said: April 29 patch puts metadata after docstring, and replaces previous patches.

Comment by Assembla Importer [ 24/Aug/10 10:17 AM ]

stu said: [file:d-5xbmu50r363qeJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 10:17 AM ]

stu said: Third patch is the one. Adds metadata after docstring, public doc-ed vars only.





[CLJ-318] add annotation support to gen-class Created: 26/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Daniel Solano Gómez
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Just call the same code used by definterface/type/record



 Comments   
Comment by Assembla Importer [ 24/Aug/10 3:44 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/318
Attachments:
add-annotation-support-to-gen-class.patch - https://www.assembla.com/spaces/clojure/documents/bK_ToyuHSr36E9eJe5cbLA/download/bK_ToyuHSr36E9eJe5cbLA
add-annotations-to-gen-class-v2.patch - https://www.assembla.com/spaces/clojure/documents/b1J4pcwjqr35cDeJe5cbCb/download/b1J4pcwjqr35cDeJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 3:44 PM ]

dsg said: Here is my implementation of annotations for gen-class. At present, it only adds annotations to the class, declared (not inherited) methods, and parameters in declared methods. The syntax mimics the syntax from deftype and is viewable in test/clojure/test_clojure/genclass/examples.clj.

Comment by Assembla Importer [ 24/Aug/10 3:44 PM ]

dsg said: [file:bK_ToyuHSr36E9eJe5cbLA]: Patch that adds annotation support to gen-class.

Comment by Assembla Importer [ 24/Aug/10 3:44 PM ]

stu said: Hi Daniel,

I found out the hard way that using a decent sample of annotation classes in the tests will break the official build (which has to run on Java 1.5). I finessed this issue by splitting the tests into separate Java 1.5 and Java 1.6 files, you can see this in clojure/test_clojure/annotations.clj

This patch will need something similar. Do you have time to get to it in the next few days?

Stu

Comment by Assembla Importer [ 24/Aug/10 3:44 PM ]

dsg said: Hello, Stu,

Yes, I noticed your other updates to the other bug, but haven't taken the time to look at it in detail, yet. I will make some time to fix this in the next day or two.

Sincerely,

Daniel Solano G��mez

Comment by Assembla Importer [ 24/Aug/10 3:44 PM ]

dsg said: Unfortunately, since gen-class depends on AOT compilation, fixing the Java 5 issue is not as simple for gen-class as it is for deftype. Most solutions will require changes to the build script. Here are my proposed solutions:

Option 1: Disable tests for Java 5

Simply don't try to compile the test class and skip the annotation tests if the VM is version 5. Given that Java 5 from Oracle has reached its end of life, this option has the appeal of simplicity.

Option 2: The deftype approach

Like deftype, create a simplified set of tests for Java 5. The build script will have to conditionally compile either a Java 5 test class or a Java 6+ test class.

Option 3: Custom annotations

Write a custom set of annotations (probably in Java). This way the tests will not be dependent on which JVM version is being used. This would keep the test code itself simple, and could be reused by the deftype tests.

Option 4: Restricted annotations

Restrict the annotations used to those available in Java 5. Unfortunately, there are not many, and I don't think that any of them allow features like nested annotations. I could be mistaken, though.

I appreciate any opinion on what is the preferred way to handle this problem.

Comment by Assembla Importer [ 24/Aug/10 3:44 PM ]

stu said: The official build of Clojure is still Java 5, so let's do Option 4 for now. If we ever get burned by it, we'll create a ticket for options 3.

Comment by Assembla Importer [ 24/Aug/10 3:44 PM ]

dsg said: OK, no problem. I will try to see if it's possible to do some things like nesting with the Java 5 annotation set. The annotations may not be semantically sound, but they may work nonetheless. Off-hand, it seems like many restrictions are enforced only at compile time.

I will submit an updated patch later this afternoon.

Comment by Assembla Importer [ 24/Aug/10 3:44 PM ]

dsg said: [file:b1J4pcwjqr35cDeJe5cbCb]: New patch, Java 5 compatible.

Comment by Assembla Importer [ 24/Aug/10 3:44 PM ]

dsg said: Updated patch, tested with both Sun JDK 1.5.0.22 and 1.6.0.20 on Linux.

Comment by Assembla Importer [ 24/Aug/10 3:44 PM ]

importer said: (In [[r:8b1ea574a61b105b9cbe9ffa3b05785cec0b3bc0]]) Add annotations support to gen-class, plus tests. See #318.

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>

Branch: master

Comment by Assembla Importer [ 24/Aug/10 3:44 PM ]

stu said: Updating tickets (#310, #318, #341)





[CLJ-317] clojure.main/repl isn't quite defensive enough Created: 25/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Because of an unguarded call to =, bad objects that get printed by the repl can cause the repl to crash if their equals method throws an exception.

For example:
java -cp clojure.jar clojure.main
user> (proxy [Object] [] (equals [o] (.toString nil)))



 Comments   
Comment by Assembla Importer [ 24/Aug/10 7:43 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/317
Attachments:
repl-crash.path - https://www.assembla.com/spaces/clojure/documents/bfOCZAujar36RreJe5cbCb/download/bfOCZAujar36RreJe5cbCb
test-for-317.patch - https://www.assembla.com/spaces/clojure/documents/dQVhZevpOr37JqeJe5cbLr/download/dQVhZevpOr37JqeJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 7:43 AM ]

remleduff said: [file:bfOCZAujar36RreJe5cbCb]: Candidate fix (it might be nice to separate the try/catches in repl into a macro someday)

Comment by Assembla Importer [ 24/Aug/10 7:43 AM ]

stu said: [file:dQVhZevpOr37JqeJe5cbLr]

Comment by Assembla Importer [ 24/Aug/10 7:43 AM ]

stu said: Committer should apply both patches (Apt 25 and May 01)

Comment by Assembla Importer [ 24/Aug/10 7:43 AM ]

richhickey said: We can't take patches from watchers. We need a CA, and then Assembla membership with a real name.

Comment by Assembla Importer [ 24/Aug/10 7:43 AM ]

richhickey said: I got Aaron's CA - thanks!

Comment by Assembla Importer [ 24/Aug/10 7:43 AM ]

stu said: Updating tickets (#317, #344)





[CLJ-316] tests for annotation support Created: 24/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

the hard part is extracting data from the annotations. Some variant of annotation->map might be of general use.

One nitpick with the API: If you said something like {Deprecated false} weirdness would ensue. Maybe barf on false/nil?



 Comments   
Comment by Assembla Importer [ 24/Aug/10 7:43 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/316
Attachments:
tests-for-annotations.patch - https://www.assembla.com/spaces/clojure/documents/c5PEf2t-ar3576eJe5cbCb/download/c5PEf2t-ar3576eJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 7:43 AM ]

stu said: [file:c5PEf2t-ar3576eJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 7:43 AM ]

richhickey said: Are people really going to start consuming annotations from Clojure?

As far as weirdness, what weirdness? Is it just that code testing for Deprecated will be looking for the presence of the attribute and not its value? Meh.

FYI annotations can't extend others so the:

(-> (into #{type} (supers type)) (disj java.lang.annotation.Annotation))

is overkill

Comment by Assembla Importer [ 24/Aug/10 7:43 AM ]

stu said: Updating tickets (#316, #264)





[CLJ-314] Vec contains AbstractMethodError Created: 23/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Daniel Solano Gómez
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   
user=> (def vi (into (vector-of :int) [1 2 3]))
#'user/vi
user=> (contains? vi 1)
java.lang.AbstractMethodError (NO_SOURCE_FILE:0)

Vec is does not implement the containsKey or entryAt methods of clojure.lang.Associative.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 7:42 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/314
Attachments:
complete-associative-support-to-vec.patch - https://www.assembla.com/spaces/clojure/documents/bhz7jqukqr364ReJe5dVir/download/bhz7jqukqr364ReJe5dVir

Comment by Assembla Importer [ 24/Aug/10 7:42 AM ]

dsg said: [file:bhz7jqukqr364ReJe5dVir]: Implements .containsKey and .entryAt methods for Vec, plus tests.

Comment by Assembla Importer [ 24/Aug/10 7:42 AM ]

dsg said: I added support and tests for both entryAt and containsKey, although I do not think entryAt is ever called.

This test code in this patch may conflict with #266. Once #266 is committed, I will check for this and resubmit if necessary.

Comment by Assembla Importer [ 24/Aug/10 7:42 AM ]

importer said: (In [[r:dc9429f5cb6a0d881bc0e4ee1ae030543bb72655]]) Add containsKey and entryAt support to Vec, plus tests. Fixes #314.

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>

Branch: master





[CLJ-313] add java.util.Map support to defrecord Created: 23/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:42 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/313
Attachments:
add-java-util-map-to-defrecord.patch - https://www.assembla.com/spaces/clojure/documents/axbdLstXOr34oReJe5dVir/download/axbdLstXOr34oReJe5dVir

Comment by Assembla Importer [ 24/Aug/10 10:42 AM ]

stu said: [file:axbdLstXOr34oReJe5dVir]

Comment by Assembla Importer [ 24/Aug/10 10:42 AM ]

stu said: Updating tickets (#231, #313, #303, #306)





[CLJ-312] audit & promote some clojure.contrib.seq fns Created: 22/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Rich Hickey
Resolution: Completed Votes: 0
Labels: None


 Description   

Proposed for promotion to clojure.core:

flatten, separate, indexed, group-by, partition-by, frequencies, reductions, positions



 Comments   
Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/312
Attachments:
0001-Reconsider-reductions-implementation.patch - https://www.assembla.com/spaces/clojure/documents/cy83XYuH8r36U-eJe5cbCb/download/cy83XYuH8r36U-eJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

jawolfe said: Sorry if this is the wrong place to leave this comment, but I wanted to make a quick note about group-by. I use it all the time, but in almost all cases I don't care that the map I get back is sorted by key. On the other hand, I have several times run into the case where group-by fails at runtime since the keys I want to group by are not comparable to each-other. So, I would humbly ask that you consider also adding a function that does the same thing with a regular old hash-map rather than sorted map, or adding an optional parameter to group-by that takes an empty map of the desired type, or some such. Thanks...

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

importer said: Similar to jawolfe's comment, I also don't care that the returned map is sorted, and I needed more performance out of group-by. By making the returned map unsorted, I was able to write my own version using transients.

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

meikelbrandmeyer said: [file:cy83XYuH8r36U-eJe5cbCb]: Rewritten version of reductions using lazy-seq

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

meikelbrandmeyer said: Added a patch for reductions. Uses now lazy-seq instead of rec-seq. See also here: http://groups.google.com/group/clojure/browse_thread/thread/3e37df49ce5edf44/cbde2d3f8b5296cd and here: http://groups.google.com/group/clojure-dev/msg/f0e2a1627a036bcd





[CLJ-311] clojure.java.io namespace Created: 22/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

audit and promote clojure.contrib.io to clojure.java.io.

  • all fns must be tested
  • fns that require consumption before closing are not idiomatic and will not be brought in (e.g. read-lines)
  • minimal set of fns is spit, input-stream, output-stream, reader, writer. others are welcome too

changes from the contrib version:

  • no dynamic vars magic (default-encoding, buffer-size, append all gone)
  • dynamic vars replaced by pervasive options arg (rest arg in public API)
  • protocol is named IOFactory (Streams mean something else)
  • protocol is not the public interface
  • use specific Javaland exceptions as appropriate, e.g. IllegalArgumentException
  • will not promote functions that magically close after consuming (e.g. write-lines)
  • no earmuffs on byte-array-type et al (these should never be rebound)
  • combine as-file and as-url into Coercions protocol


 Comments   
Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/311
Attachments:
0311-clojure-java-io.patch - https://www.assembla.com/spaces/clojure/documents/aZnllMxryr36XyeJe5cbCb/download/aZnllMxryr36XyeJe5cbCb
0311-clojure-java-io-2.patch - https://www.assembla.com/spaces/clojure/documents/d0Ox-uxIOr373CeJe5cbLA/download/d0Ox-uxIOr373CeJe5cbLA
0311-clojure-java-io-3.patch - https://www.assembla.com/spaces/clojure/documents/c5tP80xWir34zYeJe5cbLA/download/c5tP80xWir34zYeJe5cbLA

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

stu said: [file:aZnllMxryr36XyeJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

stu said: [file:d0Ox-uxIOr373CeJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

stu said: [file:c5tP80xWir34zYeJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

stu said: patch 3 subsumes the others

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

stu said: Updating tickets (#311, #347, #352)





[CLJ-310] clojure.repl namespace Created: 22/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

promote the following fns

  • clojure.contrib.repl-utils/source to clojure.repl/source
  • clojure.contrib.repl-utils/apropos to clojure.repl/apropos
  • clojure.contrib.ns-utils/dir to clojure.repl/dir

Also:

  • promote any necessary helper fns
  • make sure helper fns are private
  • promote and or write unit tests
  • make the clojure repl use these four fns


 Comments   
Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/310
Attachments:
clojure-promote-repl.diff - https://www.assembla.com/spaces/clojure/documents/c6elQ8u8ur34WNeJe5cbLA/download/c6elQ8u8ur34WNeJe5cbLA
clojure-contrib-promote-repl.diff - https://www.assembla.com/spaces/clojure/documents/c6qz7Ou8ur34WNeJe5cbLA/download/c6qz7Ou8ur34WNeJe5cbLA
0310-promote-repl-clojure-with-tweaks.patch - https://www.assembla.com/spaces/clojure/documents/cEvRP-wc8r36MfeJe5cbCb/download/cEvRP-wc8r36MfeJe5cbCb
0310-clojure-repl-with-fn-naming.patch - https://www.assembla.com/spaces/clojure/documents/d6k246wFSr35tLeJe5cbLr/download/d6k246wFSr35tLeJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

chouser@n01se.net said: Not interested in "show", perhaps with a better name? clojure.java/classinfo or something?

For tickets like this do you actually want a patch against clojure, or is this more of a placeholder for eventual work by someone else?

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

scgilardi said: - "show" is the repl-util I use most often. I think it should be included.

  • Abstractly I think these are more development tools than things particularly about a repl. Perhaps clojure.dev would be a better name than clojure.repl.
Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

stu said: updated description, hopefully now dev-able by anybody

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

stu said: pulling javadoc for now, due to the number of dependencies. May re-open it as a separate ticket.

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

tvachon said: [file:c6elQ8u8ur34WNeJe5cbLA]: Clojure core patch

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

tvachon said: [file:c6qz7Ou8ur34WNeJe5cbLA]: Clojure contrib patch

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

tvachon said: A couple items I'm not sure I got right:

  • promoting macros necessitated promoting the functions they used directly, but this could be avoided with * functions, I believe
  • some public contrib functions are now repeated verbatim as private functions in clojure.repl. I left comments in clojure.contrib, which may not be appropriate.

Let me know - happy to update the patches.

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

stu said: Wow, print-dir sure sucks in a lot of stuff. I think we can avoid it. Can you update the clojure patch to:

  • leave out throwable?, throwable, and throw-if, and get-ns
  • have print-dir call find-ns directly, do an if-let existence test, and throw an exception if the ns is not found

Thanks!

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

tvachon said: Indeed! Patches are updated, and I think they're much nicer.

I've also restored print-dir in contrib and added dir* in clojure.repl, which has slightly different semantics (in particular, it expects a symbol input, not a Namespace). We don't use print-dir anywhere in clojure-contrib now, but in case anyone else does this should minimize issues.

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

stu said: Thanks Travis,

Thanks to the new "last var in wins" feature in Clojure, there is no need to remove these fns from clojure-contrib. They can stay there, and not break people who already use them that way. So we will apply only Clojure-side patch.

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

stu said: [file:cEvRP-wc8r36MfeJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

stu said: My May 5 patch includes Travis' original patch for the Clojure side, and adds a second commit that puts the (use 'clojure.repl) in the right place in main.clj, and removes the dependency on the now-defunct "seq-contains?". The two patch approach preserves provenance but means that there is an intermediate commit where the build is broken.

Should we move towards a common convention for relating the names of macros and their driver fns? This patch has dir/dir* but source/get-source.

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

richhickey said: Whatever the convention is, I'm wary of blah*. In Clojure the * version is often a primitive thing. Something* is also a nice (as yet unused) variant for other meanings. Double leading underscore is pretty ugly and obviously internal to most people

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

richhickey said: blah-impl is fine too

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

tvachon said: I like the double leading underscore. Stuart - would you like me to update the original patch? I'd be happy to incorporate your changes as well if you think that's appropriate.

It's a minor matter, but I also noticed that I'm using my weatherbill.com email address, which maybe isn't ideal, as this work wasn't done in that scope. That leads to a second question, probably best taken out of this but, about corporate CLAs, but I'll bring that up in a different forum.

Thanks!

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

tvachon said: er - s/taken out of this but/taken out of this ticket/

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

stu said: In this case (and perhaps in many cases) the driver fns might actually need to be called, so I don't like the __. blah-impl is fine, if you would like to make that change please do.

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

richhickey said: If we are intending to have people call the fns, like dir* and get-source, then what is here is not ok.

If the macros are just macros for quoting purposes, I think we should establish a macro/macro-fn naming convention. Also, the dir* fn probably shouldn't print, i.e. the functions, if they are to have utility as functions, should be (real) functions, i.e. no side effects, return data structures, in which case the division of labor between dir and dir* (to be dir-fn) needs to change.

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

stu said: [file:d6k246wFSr35tLeJe5cbLr]

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

stu said: may 7 patch subsumes the others and is ready for review

Comment by Assembla Importer [ 24/Aug/10 7:41 AM ]

stu said: Updating tickets (#310, #318, #341)





[CLJ-309] Reloading a multimethod declaration strips off the metadata Created: 22/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None


 Description   

With commit 1b8d50, running past a defmulti twice (e.g., reloading),
causes the metadata to get squashed:

(defmulti add
"Add item to the accumulator acc. The exact meaning of adding an
an item depends on the type of the accumulator.")

(defmulti add
"Add item to the accumulator acc. The exact meaning of adding an
an item depends on the type of the accumulator.")

(doc add)

yields =>

-------------------------
user/add
nil
nil

To standard out. I assume that this is because of the def on line
1191:

`(let v# (def ~mm-name)
(when-not (and (.hasRoot v#) (instance? clojure.lang.MultiFn
(deref v#)))
(def ~(with-meta mm-name m)
(new clojure.lang.MultiFn ~(name mm-name) ~dispatch-fn
~default ~hierarchy)))))))

This is mucking up the autodoc stuff.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 3:40 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/309
Attachments:
defmulti-fix.diff - https://www.assembla.com/spaces/clojure/documents/a24DeetD4r34ureJe5dVir/download/a24DeetD4r34ureJe5dVir

Comment by Assembla Importer [ 24/Aug/10 3:40 PM ]

tomfaulhaber said: [file:a24DeetD4r34ureJe5dVir]: A patch that addresses the specific problem

Comment by Assembla Importer [ 24/Aug/10 3:40 PM ]

tomfaulhaber said: I've made a patch for this exact issue, but I'm not sure it's sufficient for the following reasons:

1) With the new mechanism created in 1b8d50 it is impossible to change a multimethod definition once it's been set up, so you can't modifiy the dispatch function and reload for instance (without doing a "def" in between to reset it).

2) If you use declare ahead of the defmulti it still strips off the metadata. Declare currently expands to (basically) def which has caused problems with metadata and reloading in other places as well. Declare should probably also be modified to preserve metadata as well.

Comment by Assembla Importer [ 24/Aug/10 3:40 PM ]

tomfaulhaber said: Ticket #330 (and the associated patch) addresses concern #2 above (declare also stripping metadata).

Comment by Assembla Importer [ 24/Aug/10 3:40 PM ]

tomfaulhaber said: I confirmed that the fix to ticket #330 fixed the problem shown in the test case here as well.

I will mark this fixed, as that does fix the immediate problem.

The inability to modify the dispatch function remains. Rich, go ahead and reopen the bug if that concerns you.





[CLJ-307] consistent deprecation strategy Created: 21/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Declined Votes: 0
Labels: None


 Description   

I am filing this as a Clojure ticket even though the problem currently occurs mostly in Contrib. That's because I think there needs to be an official "Clojure way" – this ticket is a request for documentation, not implementation.

Absent official guidelines, function and namespace deprecation has been handled in an ad hoc fashion. Sometimes functions move from one namespace to another, leaving no trace. Other times, something is left in the old namespace: either an error or a warning redirecting to the new namespace.

I would like to see a recommendation that leaves some kind of visible trace (for at least one point release) both in the source code tree and in the api docs.

Fallback namespaces (http://groups.google.com/group/clojure-dev/browse_thread/thread/9fde83ce4c06ed77) are out of scope for this ticket, but might be a separate ticket that builds on whatever is decided here.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:39 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/307

Comment by Assembla Importer [ 24/Aug/10 10:39 AM ]

stu said: Updating tickets (#303, #306, #307)

Comment by Assembla Importer [ 24/Aug/10 10:39 AM ]

stu said: We are sorting this out in contrib.





[CLJ-306] definterface does not convert - to _ Created: 20/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Hit this issue while writing a test for #104. The test paths include "test-clojure", and my generated interfaces are going to "test-clojure" while everything else goes to "test_clojure".

This conversion ought to be encapsulated in a fn instead of having str replacement all over the place.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:38 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/306
Attachments:
package-munge-names-in-definterface.patch - https://www.assembla.com/spaces/clojure/documents/a1-d_et5mr36teeJe5cbCb/download/a1-d_et5mr36teeJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 10:38 AM ]

stu said: Updating tickets (#303, #306, #307)

Comment by Assembla Importer [ 24/Aug/10 10:38 AM ]

stu said: I am marking this as screened, and it solves the immediate problem, but we could push it farther. E.g. should gen-class do a package-munge, instead of the :genclass option to the ns macro?

Comment by Assembla Importer [ 24/Aug/10 10:38 AM ]

richhickey said: no patch

Comment by Assembla Importer [ 24/Aug/10 10:38 AM ]

stu said: [file:a1-d_et5mr36teeJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 10:38 AM ]

stu said: Updating tickets (#231, #313, #303, #306)





[CLJ-303] re-import changed deftype should work at REPL Created: 20/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Current behavior:

(require :reload 'foo)
-> nil

(import foo.Bar)
-> foo.Bar

; make a change to Bar!

(require :reload 'foo)
-> nil

(import foo.Bar)
-> java.lang.IllegalStateException: Bar already refers to: class foo.Bar in namespace: user (NO_SOURCE_FILE:9)


 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:38 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/303
Attachments:
allow-reimport-of-changed-classes.patch - https://www.assembla.com/spaces/clojure/documents/c3oKVqtB4r36ZseJe5cbCb/download/c3oKVqtB4r36ZseJe5cbCb
reimport-changed-deftype-and-dont-ns-unmap.patch - https://www.assembla.com/spaces/clojure/documents/anJcYqtNOr37TyeJe5d-aX/download/anJcYqtNOr37TyeJe5d-aX

Comment by Assembla Importer [ 24/Aug/10 10:38 AM ]

stu said: Updating tickets (#303, #306, #307)

Comment by Assembla Importer [ 24/Aug/10 10:38 AM ]

stu said: [file:c3oKVqtB4r36ZseJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 10:38 AM ]

richhickey said: Per our email exchange, this patch should include removing ns-unmap calls from deftype/record/interface

Comment by Assembla Importer [ 24/Aug/10 10:38 AM ]

stu said: [file:anJcYqtNOr37TyeJe5d-aX]

Comment by Assembla Importer [ 24/Aug/10 10:38 AM ]

stu said: April 22 patch subsumes previous patch and removes ns-unmap calls.

Comment by Assembla Importer [ 24/Aug/10 10:38 AM ]

stu said: (In [[r:c73a4bad6297251ab5545affd6baf79d2390f8c6]]) re-import changed deftype, see #303

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>

Branch: master

Comment by Assembla Importer [ 24/Aug/10 10:38 AM ]

stu said: Updating tickets (#231, #313, #303, #306)





[CLJ-302] Prefer more derived interface in protocol Created: 17/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Rich Hickey
Resolution: Completed Votes: 0
Labels: None


 Description   

Currently if a protocol is extended to 2 interfaces with a derivation relationship, the more derived is not consistently chosen.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:33 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/302

Comment by Assembla Importer [ 24/Aug/10 10:33 AM ]

richhickey said: (In [[r:eba23dbdaf93bfb8d3e2549c7a82706705e80d8e]]) prefer more derived interface in protocol, fixes #302

Branch: master





[CLJ-301] (pr x & more) makes a self-call, which can lead to stack overflow Created: 17/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

When 'pr', or any related functions are called with a sequence of arguments, they can cause stack overflow.

Eg:

(apply pr (range 5000))



 Comments   
Comment by Assembla Importer [ 24/Aug/10 3:33 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/301
Attachments:
0001-fixed-stack-consumpton-in-pr-more.patch - https://www.assembla.com/spaces/clojure/documents/dTFEmksJur37KVeJe5d-aX/download/dTFEmksJur37KVeJe5d-aX

Comment by Assembla Importer [ 24/Aug/10 3:33 PM ]

stu said: Updating tickets (#301, #325)





[CLJ-299] clojure.main -e disables stdin Created: 17/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

As mentioned on the mailing list, using the -e argument of clojure.main rebinds in and makes stdin unavailable to other code:

http://groups.google.com/group/clojure/browse_thread/thread/fbb36bea2034bc7a/197fd51798de01e7?lnk=gst&q=stdin#197fd51798de01e7



 Comments   
Comment by Assembla Importer [ 24/Aug/10 4:33 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/299
Attachments:
0001-Allow-code-run-with-clojure.main-e-to-use-in-.-Fixes.patch - https://www.assembla.com/spaces/clojure/documents/d676NysDSr34t9eJe5d-aX/download/d676NysDSr34t9eJe5d-aX
tests-for-299.patch - https://www.assembla.com/spaces/clojure/documents/cyG_Qwtmar34G2eJe5cbCb/download/cyG_Qwtmar34G2eJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 4:33 PM ]

technomancy said: [file:d676NysDSr34t9eJe5d-aX]: Patch to fix

Comment by Assembla Importer [ 24/Aug/10 4:33 PM ]

technomancy said: Patch attached.

Comment by Assembla Importer [ 24/Aug/10 4:33 PM ]

stu said: [file:cyG_Qwtmar34G2eJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 4:33 PM ]

technomancy said: (In [[r:95faca8a942b0b95d9b8b896238802849d547a46]]) Allow code run with clojure.main -e to use in. Fixes #299.

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>

Branch: master





[CLJ-298] correct accessors for VecNode fields Created: 16/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Rich Hickey
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Accessors :arr and :edit should be .arr and .edit.

Holding InternalReduce (#289) due to test failures until this is approved



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:33 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/298
Attachments:
access-vecnode-as-type-not-record.patch - https://www.assembla.com/spaces/clojure/documents/aV5P4-szCr36ikeJe5d-aX/download/aV5P4-szCr36ikeJe5d-aX

Comment by Assembla Importer [ 24/Aug/10 10:33 AM ]

stu said: Updating tickets (#289, #298)





[CLJ-297] gvec comparison AbstractMethodError Created: 16/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   
(def iv (into (vector-of :int) [1 2 3]))
->#'user/iv

(= iv (range 1 4))
-> java.lang.AbstractMethodError (NO_SOURCE_FILE:0)


 Comments   
Comment by Assembla Importer [ 24/Aug/10 5:33 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/297
Attachments:
add-equiv-to-vecseq.patch - https://www.assembla.com/spaces/clojure/documents/chwBIesJKr35sNeJe5d-aX/download/chwBIesJKr35sNeJe5d-aX
ipersistentcollection-methods-for-vecseq.patch - https://www.assembla.com/spaces/clojure/documents/do1f6Etv4r37QzeJe5dVir/download/do1f6Etv4r37QzeJe5dVir

Comment by Assembla Importer [ 24/Aug/10 5:33 PM ]

stu said: VecSeq is missing the IPersistentCollection methods. Given vi, the four calls below all fail with an AbstractMethodError:

(def vi (into (vector-of :int) [1]))
(.equiv (seq vi) nil)
(.conj (seq vi) 2)
(.empty (seq vi))
(.count (seq vi))
Comment by Assembla Importer [ 24/Aug/10 5:33 PM ]

stu said: [file:chwBIesJKr35sNeJe5d-aX]

Comment by Assembla Importer [ 24/Aug/10 5:33 PM ]

stu said: Patch fixes the immediate problem. Wanted to stop and review before continuing to the other three methods. Feels like this code should be able to be shared, mirroring how ASeq is shared on the Java side.

Comment by Assembla Importer [ 24/Aug/10 5:33 PM ]

dsg said: Child association with ticket #266 was added

Comment by Assembla Importer [ 24/Aug/10 5:33 PM ]

richhickey said: You could share code by just using extend, instead of in-place impl, and a shared method map. For these low use, inherently low-perf methods that's fine.

Comment by Assembla Importer [ 24/Aug/10 5:33 PM ]

richhickey said: Urk, of course you can't use extend yet until IPersistentCollection becomes a protocol. For now you could put shared implementations in helper fns

Comment by Assembla Importer [ 24/Aug/10 5:33 PM ]

stu said: [file:do1f6Etv4r37QzeJe5dVir]

Comment by Assembla Importer [ 24/Aug/10 5:33 PM ]

stu said: the april 21 patch obsoletes the original april 17 patch

Comment by Assembla Importer [ 24/Aug/10 5:33 PM ]

stu said: (In [[r:15a2b2e553b078b7e482da822dcb9f8c28c2016c]]) IPersistentCollection methods for VecSeq (see #297)

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>

Branch: master





[CLJ-296] tests for case Created: 16/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

we need tests for case



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:32 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/296
Attachments:
tests-for-case.patch - https://www.assembla.com/spaces/clojure/documents/c6bgVCtoqr37JQeJe5dVir/download/c6bgVCtoqr37JQeJe5dVir

Comment by Assembla Importer [ 24/Aug/10 10:32 AM ]

djpowell said: Is it expected for this to fail at load-time?

(case "zz"
  "Aa" :a
  "BB" :b)
Comment by Assembla Importer [ 24/Aug/10 10:32 AM ]

richhickey said: For now, yes, case relies on distinct hashes and provides no secondary hash.

Comment by Assembla Importer [ 24/Aug/10 10:32 AM ]

richhickey said: I don't see a patch attached, so should not be "screened" yet.

Comment by Assembla Importer [ 24/Aug/10 10:32 AM ]

stu said: [file:c6bgVCtoqr37JQeJe5dVir]





[CLJ-295] disambiguate protocol extended to two interfaces Created: 15/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Rich Hickey
Resolution: Declined Votes: 0
Labels: None


 Description   

If a protocol is extended to two interfaces, and an object implements both, it will get one of them at random. I'd be happy if this case was simply an error.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:32 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/295





[CLJ-294] extend should check protocol is not implemented directly Created: 15/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Rich Hickey
Resolution: Completed Votes: 0
Labels: None


 Description   

The extend function should check and throw an exception if you try to extend a protocol into a class or type that already implements the protocol directly. The current behavior in this case is unintuitive: the extend succeeds, and a method is added to the :impls map, but you can never call it.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:32 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/294

Comment by Assembla Importer [ 24/Aug/10 10:32 AM ]

richhickey said: (In [[r:f47895ad8a4a8eac74ccc43c60645c9b121e7d0c]]) check that type does not already implement protocol interface when extending, fixes #294

Branch: master





[CLJ-290] bigint truncates large ratios Created: 07/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   
Clojure 1.2.0-master-SNAPSHOT
user=> (bigint (/ 1000000000000000000000000000 3))
9223372036854775807
</code></pre>
The correct result should be:
<pre><code>333333333333333333333333333

This is caused by clojure.core/bigint first converting the ratio to a long:
<pre><code>(defn bigint
"Coerce to BigInteger"
{:tag BigInteger}
[x] (cond
(instance? BigInteger x) x
(decimal? x) (.toBigInteger #^BigDecimal x)
(number? x) (BigInteger/valueOf (long x))
:else (BigInteger. x)))</code</pre>



 Comments   
Comment by Assembla Importer [ 24/Aug/10 10:16 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/290
Attachments:
0001-Don-t-truncate-large-ratios-when-converting-to-bigin.patch - https://www.assembla.com/spaces/clojure/documents/bjG79YqI4r34-reJe5d-aX/download/bjG79YqI4r34-reJe5d-aX
0002-Use-bigint-division-when-converting-ratios-to-longs.patch - https://www.assembla.com/spaces/clojure/documents/bM4IpeqJmr37F6eJe5avMc/download/bM4IpeqJmr37F6eJe5avMc
290-tweaked-to-apply-cleanly.patch - https://www.assembla.com/spaces/clojure/documents/aw7_EOszmr353-eJe5afGb/download/aw7_EOszmr353-eJe5afGb

Comment by Assembla Importer [ 24/Aug/10 10:16 AM ]

aosborne said: [file:bjG79YqI4r34-reJe5d-aX]: Proposed fix: add a ratio? case to the bigint cond

Comment by Assembla Importer [ 24/Aug/10 10:16 AM ]

aosborne said: Additionally I just noticed long conversion can also yield imprecise results:

(long 10000000000000000000/3)
    => 3333333333333332992

Attaching a patch with uses the bigIntegerValue() for longValue(). I'm unsure whether it's better to do it this way or to use BigDecimals and increase the precision.

Comment by Assembla Importer [ 24/Aug/10 10:16 AM ]

aosborne said: [file:bM4IpeqJmr37F6eJe5avMc]: Use bigint division when converting ratios to longs.

Comment by Assembla Importer [ 24/Aug/10 10:16 AM ]

stu said: [file:aw7_EOszmr353-eJe5afGb]

Comment by Assembla Importer [ 24/Aug/10 10:16 AM ]

stu said: April 16 patch subsumes the others and applies cleanly (for now...)

Comment by Assembla Importer [ 24/Aug/10 10:16 AM ]

aosborne said: (In [[r:8e916164ca3a57e5ce924ed153fe435356f8d4a0]]) Don't truncate large ratios when converting to bigint. Fixes #290.

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>

Branch: master





[CLJ-289] Add InternalReduce Created: 06/Apr/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

InternalReduce protocol lets seqs take advantage of structural details, make reduce run faster.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 5:14 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/289
Attachments:
internal-reduce.patch - https://www.assembla.com/spaces/clojure/documents/a45y7yqser379teJe5aVNr/download/a45y7yqser379teJe5aVNr

Comment by Assembla Importer [ 24/Aug/10 5:14 PM ]

stu said: [file:a45y7yqser379teJe5aVNr]: internal-reduce

Comment by Assembla Importer [ 24/Aug/10 5:14 PM ]

liwp said: Stuart,

Great stuff!

You could move the (alength arr) call in arr-impl from the loop form to the let-binding to avoid it getting called on each iteration.

– Lauri

Comment by Assembla Importer [ 24/Aug/10 5:14 PM ]

khinsen said: This looks like a very good idea!

Question: would it be preferable to pass the original coll to internal-reduce, rather than (seq coll)?

Advantages:

  • no need to create a seq before doing a reduce
  • more potential for optimization if the coll can implement reduce faster directly and the associated seq does not permit to retrieve the coll.

Disadvantage:

  • reduce needs to be implemented for seqs anyway, so the number of implementations would increase.

Konrad

Comment by Assembla Importer [ 24/Aug/10 5:14 PM ]

stu said: Lauri,

I tried lifting the alength calls and the code runs slightly slower (in my unscientific tests on a single laptop. Counterintuitive, huh?

Stu

Comment by Assembla Importer [ 24/Aug/10 5:14 PM ]

stu said: Konrad,

The chunking support is on seqs, and it is fast. Also the seq-before-reduce localizes the nil/empty check in reduce. I think Rich had another reason too but I can't remember what it was.

Stu

Comment by Assembla Importer [ 24/Aug/10 5:14 PM ]

stu said: Updating tickets (#289, #298)





[CLJ-281] Make more datastructures serializable Created: 14/Mar/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Chas Emerick
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Make several more core data structures serializable via java-serialization.

The attached patch is a minimal patch- serialVersionUIDs are not created, nor are redundant "implements Serializable" statements added to classes who already implement Serializable from some other interface. This patch also does not make functions, lazy lists, atoms, references, etc. serializable, nor those data structures that depend upon any of the above (so tree maps and tree sets, which depend upon an ordering function, are not serializable, for example). Only those data structures which can be reasonably expected to be serialized by one program and deserialized by another are made serializable. Whether any of these extra functions should be made serializable is a different debate.

The classes made serializable are:
PersistentVector$Node (PersistentVector is already serializable)
PersistentQueue
PersistentList
PersistentList$EmptyList



 Comments   
Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/281
Attachments:
serial.diff - https://www.assembla.com/spaces/clojure/documents/aTM6uyl7Kr34JteJe5avMc/download/aTM6uyl7Kr34JteJe5avMc
serial2.diff - https://www.assembla.com/spaces/clojure/documents/dwWwVQmG0r37KxeJe5aVNr/download/dwWwVQmG0r37KxeJe5aVNr
serialization.diff - https://www.assembla.com/spaces/clojure/documents/bJZ074vWWr34fReJe5cbLA/download/bJZ074vWWr34fReJe5cbLA
281-tweaked-to-apply-to-current-master.patch - https://www.assembla.com/spaces/clojure/documents/dZLUVGv2yr35hJeJe5cbCb/download/dZLUVGv2yr35hJeJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

bhurt said: [file:dwWwVQmG0r37KxeJe5aVNr]: New diff

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

bhurt said: Just added new file serial2.diff, which is a new diff which adds a few more classes to what is serialized:
Cons
PersistentHashMap$ArrayNode
PersistentHashMap$BitmapIndexedNode
PersistentHashMap$HashCollisionNode

Note that serial2.diff implements all the changes serial.diff implements, plus these new classes. So it's a complete replacement.

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

dsg said: I am not sure that simply tagging Clojure's data structures as serializable is the best way to handle this issue. I have not taken too much time to think about this, but here are some of the issues I do not think have been addressed in this patch:

1. Given the shared structure of most of Clojure's data types, I think care should be taken to only serialize the logical snapshot of a structure, not the entire history.

2. I am not sure that these patches even work. For example, PersistentVector$Node is marked serializable, but part of its state is an AtomicReference<Thread>. It doesn't make any sense to serialize a reference to a thread. In fact, I don't think Thread is serializable at all. If the reference is set, this will throw a NotSerializableException, I believe.

In the end, I think the best (and perhaps only) way to handle serialization for Clojure's data structures is to use Externalizable.

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

bhurt said: 1. I thought that the clojure data structures were just immutable- and that thus they didn't keep their history. If I'm wrong, this is a significant problem with clojure, as keeping the history of the data structure would interfere with garbage collecting.

2. The only times the edit reference is set to not null is when the vector is a transient vector- and I'm explicitly not allowing the serialization of transient vectors. But I think you could still hit it if some other thread has converted the vector to being a transient while the current thread was trying to serialize the non-transient version of the vector. Which at least explains why I haven't hit this bug yet. In any case, no serializing the edit field is probably a good idea in general.

I'll write a new patch to address these problems probably over the weekend.

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

cemerick said: Clojure data structures only retain the portions of their "predecessors" as required by the "current version" of the data structure. So, there should never be any dead nodes, etc. in the "entire history" of a data structure.

The AtomicReference<Thread> field is never set to null if I'm reading the code right – rather, it is set to an AtomicReference containing null (see the NOEDIT static field). I think the most straightforward way to make this serialization-friendly is to mark the edit field (all all similar fields in other data structures) transient, but default the field to the NOEDIT object so that deserialized instances have a sane value there.

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

bhurt said: The edit member variable (which holds the atomic reference cell) needs to be set up correctly- if I'm reading the code correctly, it's shared among all copies of the data structure. So when we deserialize a persistent vector, we need to share the reference cell among all the nodes.

Actually, the issue of sharing is one I haven't thought about much. Consider the case where you serialize multiple versions of the same vector that share a lot of nodes. Do the deserialized vectors need to share the nodes as well?

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

cemerick said: ObjectOutputStream and ObjectInputStream are smart about using references to previously-written objects instead of duplicating serializations. So if you write three different large vectors that share a lot of internal structure to the same OOS, that shared structure will be written only once.

As for the edit field, I think you can just default it to NOEDIT. To be clear, that field should never be serialized to begin with, so whatever the default value is in the code will be the value used by deserialized instances.

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

richhickey said: This patch does not apply. Please format your patch with git format-patch as described here:

http://clojure.org/patches

Thanks

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

cemerick said: Taking this on, hoping to get it in under the wire for clojure 1.2 RC.

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

cemerick said: [file:bJZ074vWWr34fReJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

cemerick said: Patch attached. It further requires the fix in the patch attached to #331.

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

stu said: [file:dZLUVGv2yr35hJeJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

stu said: (My attachment simply updates Chas' patch to work with current master.)

Looks good, tests pass. One question: What is the use case for serializing a fn? Deserializing a fn will not work across VMs, as the fn internally refers to anonymous classes that no longer exist. Without knowing the use case I would be tempted to pull this out because of the confusion it could cause.

The only other minor interesting thing to note is that serializing a namespace just serializes the namespace, not its contents. This makes sense once you think about it, and is necessary for serializing structs and records, but might be worth a doc note.

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

cemerick said: I've mentioned in #clojure a couple of times (and it's worth adding here "for the record") that all of the support for Java serialization should be and now is only present with the use case in mind of short term storage, not long term archiving – the class hierarchy implementing all of the standard data structures will change, and nothing short of a print-dup-esque mechanism (which could be layered on top of Serializable for interop purposes) will ensure longevity of serialized Clojure objects. More concretely, think sessions, RMI, etc.

Anyway: functions have been serializable for a while now, so I added tests to that end. As you said, the serializability of functions has a much narrower useful lifespan at the moment. I personally don't know of a use case for same-VM serialization of functions; I wonder if Rich does, or if that was just as far as he got in enabling deeper support for fn serialization. If the latter, then yes, we should probably pull it out; I can squash that change and the metadata tweak you added if you like.

I don't know that any documentation of how namespaces are serialized will be anything other than confusing – it's purely an implementation detail that essentially no one will (or should) ever care about. And, FWIW, the automatic interning of namespaces is essentially implied by the docs on create-ns anyway.

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

cemerick said: From an email exchange between myself, S. Halloway, and Rich addressing the serializability of functions:

Rich: If the code is AOT compiled and deployed to both VMs, they will have the same classnames for the fns.

S. Halloway: But serialization doesn't know this, and will happily serialize runtime-created fns. If the mangled names happen to exist in the new VM, you would end up calling different fns...

Rich: As you say, for consenting adults.

Chas: I forgot about the (pleasant) AOT caveat. Yessir, that's useful.

Is there any way to tell where a class originated from – a classfile vs. runtime codegen? If so, I could put the necessary check-and-throw in so that non-AOT'd functions would fail to serialize.

Rich: This really isn't different from the versioning problem inherent with the data structures as well, it's just that the unit of change is a compilation, not a release. You don't really protect anything with the AOT check since AOT'ed in two different compilations is potentially different, but might have same name.

I don't think we should spend any time trying to protect anyone on this. We can just document the behavior and limitations. Serializing closures is fancy stuff for experts in any case.

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

stu said: Updating tickets (#281, #331)

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

bhurt said: I just wanted to say Thank You to Chas for picking this up.

Comment by Assembla Importer [ 24/Aug/10 8:51 AM ]

cemerick said: @Brian: No problem, thanks for getting it started.





[CLJ-275] division by negative ratio resulting in a whole number returns a ratio when an integer is expected Created: 24/Feb/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

i.e.

user=> (/ 1 -1/2)
-2/1
user=> (/ 1 1/2)
2 
user=> (/ 0 -1/2)
0/1

This happens since the check for the denominator being 1 is done before the negative sign is switched from the denominator to the numerator.
i.e. http://github.com/richhickey/clojure/blob/master/src/jvm/clojure/lang/Numbers.java#L296

I have provided a patch which makes this work as I expected, of course this may not be the optimal way of solving this problem as i'm not familiar enough with the internals of clojure.

Thanks
.Tristan



 Comments   
Comment by Assembla Importer [ 24/Aug/10 7:33 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/275
Attachments:
divide-by-negative.diff - https://www.assembla.com/spaces/clojure/documents/aGxagWisar37eqeJe5afGb/download/aGxagWisar37eqeJe5afGb
test-for-assembla-275.patch - https://www.assembla.com/spaces/clojure/documents/cvsqVgr8Cr37VqeJe5d-aX/download/cvsqVgr8Cr37VqeJe5d-aX

Comment by Assembla Importer [ 24/Aug/10 7:33 AM ]

richhickey said: Thanks for the report. You need to have submitted a contributor's agreement in order to submit patches, though.

Please see:

http://clojure.org/contributing

Comment by Assembla Importer [ 24/Aug/10 7:33 AM ]

lessthantristan said: I will send off a contributor's agreement on monday. However, I was not expecting my patch to be "the" fix for this problem. It was just to show where the problem is and an example of what my expected behaviour is. But of course, I have no problems if you feel this is an appropriate fix.

Comment by Assembla Importer [ 24/Aug/10 7:33 AM ]

stu said: [file:cvsqVgr8Cr37VqeJe5d-aX]

Comment by Assembla Importer [ 24/Aug/10 7:33 AM ]

stu said: code appears correct, added test. please review for speed. Should we create a NEG_ONE constant?

Comment by Assembla Importer [ 24/Aug/10 7:33 AM ]

stu said: Updating tickets (#247, #262, #275)





[CLJ-271] Determine direct binding policy and controls Created: 16/Feb/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Rich Hickey
Resolution: Declined Votes: 0
Labels: None


 Description   

Direct binding is in place as an experiment. We need ways to control the application and granularity of direct binding.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 6:25 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/271

Comment by Assembla Importer [ 24/Aug/10 6:25 AM ]

technomancy said: Related association with ticket #246 was added

Comment by Assembla Importer [ 24/Aug/10 6:25 AM ]

stu said: disable for 1.2 and then move to approved backlog

Comment by Assembla Importer [ 24/Aug/10 6:25 AM ]

stu said: Direct binding is dead in favor of a better perf enhancement post 1.2.





[CLJ-269] Add List and Collection support to Vec Created: 12/Feb/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Chouser
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Comments   
Comment by Assembla Importer [ 24/Aug/10 3:22 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/269
Attachments:
0001-gvec-implement-Iterable-j.u.Collection-and-j.u.Li.patch - https://www.assembla.com/spaces/clojure/documents/b_GjzsgfOr36H0eJe5aVNr/download/b_GjzsgfOr36H0eJe5aVNr

Comment by Assembla Importer [ 24/Aug/10 3:22 PM ]

richhickey said: Parent association with ticket #264 was added

Comment by Assembla Importer [ 24/Aug/10 3:22 PM ]

chouser@n01se.net said: [file:b_GjzsgfOr36H0eJe5aVNr]: gvec: implement Iterable, j.u.Collection, and j.u.List

Comment by Assembla Importer [ 24/Aug/10 3:22 PM ]

chouser@n01se.net said: Nothing dramatic in the attached patch. A couple things I was unsure about:

1. There are a couple places where walking through part or all of the vector is done by incrementing an index and calling .nth each time. Is it worth while to instead use a chunked seq of the vector?

2. In a couple other places I use the seq library: some and every? Neither of these use chunks. Is this acceptable? If not, would it be acceptable if those fns used chunks?

3. Why oh why are Iterator and ListIterator such terrible APIs? Ok, I'm not really unsure about that one...

--Chouser

Comment by Assembla Importer [ 24/Aug/10 3:22 PM ]

chouser@n01se.net said: Oh, one more:

4. I used subvec on a gvec to implement subList. It seems to work fine since APersistentVector.SubVector just requires the underlying object to be an IPersistentVector, which of course gvecs are. This is ok?

Comment by Assembla Importer [ 24/Aug/10 3:22 PM ]

richhickey said: This all seems ok as a first cut. I wouldn't do anything with chunks in here right now. subvec seems ok. some/every? we might reconsider at some point due to bootstrapping. But that is an implementation detail

Comment by Assembla Importer [ 24/Aug/10 3:22 PM ]

chouser@n01se.net said: (In [[r:df17f32858eb0b700d21a2a2364a54596f139e89]]) gvec: implement Iterable, j.u.Collection, and j.u.List Fixes #268 and #269

Signed-off-by: Rich Hickey <richhickey@gmail.com>

Branch: master





[CLJ-268] Add Iterable support to Vec Created: 12/Feb/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Chouser
Resolution: Completed Votes: 0
Labels: None


 Comments   
Comment by Assembla Importer [ 24/Aug/10 7:22 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/268

Comment by Assembla Importer [ 24/Aug/10 7:22 AM ]

richhickey said: Parent association with ticket #264 was added

Comment by Assembla Importer [ 24/Aug/10 7:22 AM ]

chouser@n01se.net said: See patch in #269

Comment by Assembla Importer [ 24/Aug/10 7:22 AM ]

chouser@n01se.net said: (In [[r:df17f32858eb0b700d21a2a2364a54596f139e89]]) gvec: implement Iterable, j.u.Collection, and j.u.List Fixes #268 and #269

Signed-off-by: Rich Hickey <richhickey@gmail.com>

Branch: master





[CLJ-267] Add Reversible support to Vec Created: 12/Feb/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Comments   
Comment by Assembla Importer [ 24/Aug/10 3:22 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/267
Attachments:
make-vec-reversible.patch - https://www.assembla.com/spaces/clojure/documents/bsOSEGtASr37E7eJe5cbCb/download/bsOSEGtASr37E7eJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 3:22 PM ]

richhickey said: Parent association with ticket #264 was added

Comment by Assembla Importer [ 24/Aug/10 3:22 PM ]

stu said: [file:bsOSEGtASr37E7eJe5cbCb]





[CLJ-266] Add Comparable support to Vec Created: 12/Feb/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Daniel Solano Gómez
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Comments   
Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/266
Attachments:
fix266.patch - https://www.assembla.com/spaces/clojure/documents/aUPsnCrXyr36i1eJe5avMc/download/aUPsnCrXyr36i1eJe5avMc
add_comparable_support_to_vec.patch - https://www.assembla.com/spaces/clojure/documents/bt20JetxCr36GpeJe5d-aX/download/bt20JetxCr36GpeJe5d-aX
add_comparable_support_to_vec-revised.patch - https://www.assembla.com/spaces/clojure/documents/c2n-HUtXWr34oReJe5dVir/download/c2n-HUtXWr34oReJe5dVir
eliminate-reflection-in-266.patch - https://www.assembla.com/spaces/clojure/documents/d_AO6it8Sr37m4eJe5dVir/download/d_AO6it8Sr37m4eJe5dVir

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

richhickey said: Parent association with ticket #264 was added

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

dsg said: This is my first attempt at submitting a real patch to Clojure, so I appreciate any feedback. This patch actually does a few different things, specifically:

1. Add java.lang.Comparable interface for Vec.
2. Modify vector-of to be a little more user-friendly. The original only creates empty Vecs. My patch allows vector-of to take arguments similar to vector and vec. Importantly, it also takes a primitive array as an argument. The implementation may not be the most efficient, but it seems to work.
3. I added a bunch of tests to ensure that vector-of mirrors the behaviour of standard vectors. In doing so, I ran into a few bugs that led me to implement the Associative interface for Vec and IPersistentCollection to VecSeq.

It is still probably a good idea to add more tests.

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

dsg said: [file:aUPsnCrXyr36i1eJe5avMc]: Patch to fix #266

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

stu said: Hi Daniel,

Thanks for jumping on this. I am reviewing the patch, and have hit one issue so far. It's a subtle one:

(let [foo (into (vector-of :int) [1 2 3 4])]
  (println "count: "(count (seq (next foo))))
  (println ".count: " (.count (seq (next foo)))))

Your count isn't taking account of the offset in the VecSeq. This is hidden by a weakness in Clojure's count fn: it doesn't know when part of a seq is counted to take advantage of that, so you can't even see the issue by calling count!

This makes me think we need to test every Java interface method directly.

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

dsg said: Parent association with ticket #297 was added

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

dsg said: [file:bt20JetxCr36GpeJe5d-aX]: Adds Comparable support to Vec, with tests.

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

dsg said: New patch for Comparable support. I'll move the other fixes/features to other bugs. This new patch (dated 21 Apr), also includes tests specifically for Comparable.

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

stu said: Hi Daniel,

This looks great. One tweak: it is not idiomatic (in Clojure at least) to do the type check. All the other Comparable types in Clojure simply throw a ClassCastException when you pass a bad arg to .compareTo.

If you convert that check to a Clojure (cast ...) and update the tests, I think we're good to go.

(I can also make this change, but I want to let the whole thing go in under your name.)

Cheers,
Stu

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

dsg said: Hello, Stu,

Thanks for the feedback. I'll make your suggested changes and open those other tickets tomorrow.

Sincerely,

Daniel Solano G��mez

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

dsg said: [file:c2n-HUtXWr34oReJe5dVir]: Revised patch to add Comparable support to Vec.

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

dsg said: I have submitted a new patch 'add_comparable_support_to_vec-revised.patch', which includes Stu���s recommendations and adds a couple of extra tests.

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

stu said: [file:d_AO6it8Sr37m4eJe5dVir]

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

stu said: recommend the apr 23 patch (which solves the problem) plus the apr 24 patch (which removes reflection from the api)

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

importer said: (In [[r:a3d1d494e9e574599c50dd83749183c66f653192]]) Add Comparable support to Vec, with tests. Fixes #266.

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>

Branch: master





[CLJ-265] Add IFn support to Vec Created: 12/Feb/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Chouser
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Comments   
Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/265
Attachments:
0001-gvec-implement-IFn-Fixes-265.patch - https://www.assembla.com/spaces/clojure/documents/aUmLZ-f-Wr36H0eJe5aVNr/download/aUmLZ-f-Wr36H0eJe5aVNr

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

richhickey said: Parent association with ticket #264 was added

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

chouser@n01se.net said: [file:aUmLZ-f-Wr36H0eJe5aVNr]

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

chouser@n01se.net said: The attached patch mimics PersistentVector's behavior – no "notfound" arg, throws on bad key

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

chouser@n01se.net said: (In [[r:c97e974c492218609e38a6497b953e38e30b1d83]]) gvec: implement IFn Fixes #265

Signed-off-by: Rich Hickey <richhickey@gmail.com>

Branch: master





[CLJ-264] Complete interface impls for generic vector Created: 12/Feb/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None


 Description   

Vec needs several more interface implementations in order to be as complete as persistentvector.
See subtasks



 Comments   
Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/264

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

richhickey said: Child association with ticket #265 was added

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

richhickey said: Child association with ticket #266 was added

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

richhickey said: Child association with ticket #267 was added

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

richhickey said: Child association with ticket #268 was added

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

richhickey said: Child association with ticket #269 was added

Comment by Assembla Importer [ 24/Aug/10 6:22 AM ]

stu said: Updating tickets (#316, #264)





[CLJ-262] (resolve 'FooBar.) should return nil Created: 10/Feb/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Christophe Grand
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Currently, (resolve 'FooBar.) throws a ClassNotFoundException it should return nil.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 6:19 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/262
Attachments:
0001-make-resolve-clojure.lang.Compiler-maybeResolveIn-to.patch - https://www.assembla.com/spaces/clojure/documents/aPbyDofLur34eteJe5aVNr/download/aPbyDofLur34eteJe5aVNr
test-for-assembla-262.patch - https://www.assembla.com/spaces/clojure/documents/aQu81Cr8er348xeJe5d-aX/download/aQu81Cr8er348xeJe5d-aX

Comment by Assembla Importer [ 24/Aug/10 6:19 AM ]

cgrand said: [file:aPbyDofLur34eteJe5aVNr]

Comment by Assembla Importer [ 24/Aug/10 6:19 AM ]

stu said: [file:aQu81Cr8er348xeJe5d-aX]

Comment by Assembla Importer [ 24/Aug/10 6:19 AM ]

stu said: code patch works, added test patch

Comment by Assembla Importer [ 24/Aug/10 6:19 AM ]

stu said: Updating tickets (#247, #262, #275)

Comment by Assembla Importer [ 24/Aug/10 6:19 AM ]

cgrand said: (In [[r:6847019915f2d3a7708e3c810cc68926e35e1a7e]]) make resolve (clojure.lang.Compiler/maybeResolveIn) to return nil for 'MyClass. See #262

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>

Branch: master





[CLJ-260] Cannot load clojure classes from Jar files outside classpath using URLClassLoader Created: 09/Feb/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Declined Votes: 0
Labels: None


 Description   

It is not possible to use URLClassLoader to load a class from a jar file if the jar is outside the classpath. It seems that RT.load tries to search for *.clj file within the classpath and doesn't respect the URLClassLoader and then fails with:

Exception in thread "main" java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at Loader.main(Loader.java:17)
Caused by: java.io.FileNotFoundException: Could not locate net/experimentalworks/Foo__init.class or net/experimentalworks/Foo.clj on classpath:
at clojure.lang.RT.load(RT.java:402)
at clojure.lang.RT.load(RT.java:371)
at clojure.core$load_6449$fn_6458.invoke(core.clj:4171)
at clojure.core$load__6449.doInvoke(core.clj:4170)
at clojure.lang.RestFn.invoke(RestFn.java:413)
at clojure.lang.Var.invoke(Var.java:359)
at net.experimentalworks.Foo.<clinit>(Unknown Source)
... 7 more

The attached .tar.gz contains a sample jar file and the clojure file that was used to generate the class files as well as the sample loader. Java oder Scala written classes can be loaded without any problems. For sure the I put the clojure runtime into the classpath but not the loadme-clojure.jar



 Comments   
Comment by Assembla Importer [ 24/Aug/10 3:18 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/260
Attachments:
loader.tar.gz - https://www.assembla.com/spaces/clojure/documents/ayyZTifAyr34QPeJe5aVNr/download/ayyZTifAyr34QPeJe5aVNr

Comment by Assembla Importer [ 24/Aug/10 3:18 PM ]

stu said: Clojure's base loader uses the thread context loader so long as use-context-classloader is true (the default). Make sure context class loader is set, and then set the thread context class loader to be the loader you have created by calling:

Thread.currentThread().setContextClassLoader(loader);

Do this before using the loader to load classes.

Cheers,
Stu





[CLJ-258] can't recur from case special form Created: 03/Feb/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Rich Hickey
Resolution: Completed Votes: 0
Labels: None


 Description   

the 'case' special form doesnt't propagate tailcontext.
eg.

; SLIME 2010-02-01
user> (loop [foo "foo"]
        (case foo
          "foo" (recur 'bar)
          'bar (recur :baz)
          :done (do (println "hello"))
          (recur :done)))
; Evaluation aborted.

Can only recur from tail position
  [Thrown class java.lang.UnsupportedOperationException]

This can be easily fixed by making
Compiler.CaseExpr#emit() and Compiler.CaseExpr.Parser#parse() propagate their context instead stetting the context to C.EXPRESSION.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 5:12 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/258

Comment by Assembla Importer [ 24/Aug/10 5:12 PM ]

richhickey said: (In [[r:c1ca66b7a171bcd2157e679799f37ba7a37bff36]]) analyze case exprs in context, fixes #258

Branch: master





[CLJ-257] add fnil for wrapping functions to handle nil Created: 30/Jan/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Timothy Pratley
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

As per discussion
http://groups.google.com/group/clojure/browse_thread/thread/99cc4a6bfe665a6e
fnil provides a convenient way to supply a default value to be used instead of nil for functions that expect values



 Comments   
Comment by Assembla Importer [ 24/Aug/10 5:07 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/257
Attachments:
fnil.diff - https://www.assembla.com/spaces/clojure/documents/bxdOVqdvur34_1eJe5aVNr/download/bxdOVqdvur34_1eJe5aVNr
0257-fnil-take2.patch - https://www.assembla.com/spaces/clojure/documents/c4H_wYCber37b6eJe5cbLr/download/c4H_wYCber37b6eJe5cbLr

Comment by Assembla Importer [ 24/Aug/10 5:07 PM ]

timothypratley said: [file:bxdOVqdvur34_1eJe5aVNr]: adding fnil

Comment by Assembla Importer [ 24/Aug/10 5:07 PM ]

stu said: [file:c4H_wYCber37b6eJe5cbLr]

Comment by Assembla Importer [ 24/Aug/10 5:07 PM ]

stu said: New patch refreshes original patch, adds more tests and some trivial unrelated cleanup.

Comment by Assembla Importer [ 24/Aug/10 5:07 PM ]

richhickey said: what's the definterface stuff in this patch?

Comment by Assembla Importer [ 24/Aug/10 5:07 PM ]

stu said: That's the "trival unrelated cleanup" part. On April 23, some dummy (me) accidentally committed a .rej file, which is a working file used by git when resolving conflicts. This commit kills it.

Comment by Assembla Importer [ 24/Aug/10 5:07 PM ]

stu said: (In [[r:725547f4587f75c063c51659e582cfdbcc140f80]]) tidy up and test #257, remove spurious .rej file

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>

Branch: master

Comment by Assembla Importer [ 24/Aug/10 5:07 PM ]

stu said: Updating tickets (#256, #257, #367, #358)





[CLJ-256] get-in optional default value Created: 30/Jan/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Timothy Pratley
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

As per discussion
http://groups.google.com/group/clojure/browse_thread/thread/99cc4a6bfe665a6e
adding optional default value to be like get



 Comments   
Comment by Assembla Importer [ 24/Aug/10 3:07 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/256
Attachments:
get-in-default.diff - https://www.assembla.com/spaces/clojure/documents/blYgdOdvar34_1eJe5aVNr/download/blYgdOdvar34_1eJe5aVNr
0256-get-in-faster.patch - https://www.assembla.com/spaces/clojure/documents/aZL87kCmCr35fseJe5cbCb/download/aZL87kCmCr35fseJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 3:07 PM ]

timothypratley said: [file:blYgdOdvar34_1eJe5aVNr]: get-in enhancement

Comment by Assembla Importer [ 24/Aug/10 3:07 PM ]

meikelbrandmeyer said: As noted by Daniel Werner in the above thread, get-in should allow nil</code> and <code>false in maps.

I propose to change the if-let</code> to <code>(get (reduce get m (pop ks)) (peek ks) not-found).

Comment by Assembla Importer [ 24/Aug/10 3:07 PM ]

timothypratley said: I've updated the patch as discussed on the group, slightly different.
http://groups.google.com/group/clojure/browse_thread/thread/99cc4a6bfe665a6e

Comment by Assembla Importer [ 24/Aug/10 3:07 PM ]

timothypratley said: Ok problems addressed.

Comment by Assembla Importer [ 24/Aug/10 3:07 PM ]

stu said: [file:aZL87kCmCr35fseJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 3:07 PM ]

stu said: second patch subsumes first, fixes perf with direct loop.

Comment by Assembla Importer [ 24/Aug/10 3:07 PM ]

stu said: Updating tickets (#256, #257, #367, #358)





[CLJ-254] Expose c.l.Ratio's accessors Created: 29/Jan/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Meikel Brandmeyer
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Expose accessor functions of c.l.Ratio in c.core.

See here:
http://groups.google.com/group/clojure/browse_thread/thread/775351b9335a561e



 Comments   
Comment by Assembla Importer [ 24/Aug/10 3:07 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/254
Attachments:
0001-Expose-Ratio-s-enumerator-and-denominator-as-clojure.patch - https://www.assembla.com/spaces/clojure/documents/dzNg_8drer34IaeJe5afGb/download/dzNg_8drer34IaeJe5afGb
ratio-fns.diff - https://www.assembla.com/spaces/clojure/documents/dPDZz0drur3749eJe5aVNr/download/dPDZz0drur3749eJe5aVNr

Comment by Assembla Importer [ 24/Aug/10 3:07 PM ]

meikelbrandmeyer said: [file:dzNg_8drer34IaeJe5afGb]: Expose Ratio's accessors

Comment by Assembla Importer [ 24/Aug/10 3:07 PM ]

hiredman said: Duplicated association with ticket #255 was added

Comment by Assembla Importer [ 24/Aug/10 3:07 PM ]

meikelbrandmeyer said: [file:dPDZz0drur3749eJe5aVNr]: Superior patch from Kevin Downey





[CLJ-253] Improve errors for "use"/"require" in REPL Created: 29/Jan/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Timothy Pratley
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

in the repl when i (use 'foo) vs. (use :foo) they both return nil, so it doesn't help me know that the former is right and the latter isn't. would it be sensible for use to return true or something more positive than nil if it successfully brings in a namespace? or print out an error message when symbols are used?



 Comments   
Comment by Assembla Importer [ 24/Aug/10 6:07 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/253
Attachments:
load.diff - https://www.assembla.com/spaces/clojure/documents/bKJkksdv8r34IaeJe5afGb/download/bKJkksdv8r34IaeJe5afGb

Comment by Assembla Importer [ 24/Aug/10 6:07 AM ]

timothypratley said: [file:bKJkksdv8r34IaeJe5afGb]: check for a valid argument

Comment by Assembla Importer [ 24/Aug/10 6:07 AM ]

timothypratley said: Please note, patch throws an exception if nothing specified to load,
in the use case, :foo is a keyword not a valid load target.





[CLJ-247] Remove clojure.lang.Stream/Streamable and all uses Created: 21/Jan/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Comments   
Comment by Assembla Importer [ 24/Aug/10 8:59 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/247
Attachments:
0001-remove-streams.patch - https://www.assembla.com/spaces/clojure/documents/aFB2mGrVGr364FeJe5afGb/download/aFB2mGrVGr364FeJe5afGb

Comment by Assembla Importer [ 24/Aug/10 8:59 AM ]

cgrand said: [file:aFB2mGrVGr364FeJe5afGb]: patch

Comment by Assembla Importer [ 24/Aug/10 8:59 AM ]

stu said: patch looks good, tests pass

Comment by Assembla Importer [ 24/Aug/10 8:59 AM ]

stu said: Updating tickets (#247, #262, #275)





[CLJ-246] direct binding inhibits clojure.test functionality Created: 14/Jan/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Phil Hagelberg
Resolution: Completed Votes: 0
Labels: None


 Description   

clojure.test offers features that rely on binding functions from its namespace. With the way direct binding is implemented now, this is impossible, since any namespaces beginning with "clojure" are directly bound. This also has a (probably) unintended of direct binding namespaces that just start with "clojure", like "clojuresque" and "clojure-http-client."

I propose that direct binding use a whitelist, instead of direct binding anything that starts with "clojure."

An ever better solution, though, would be to use namespace metadata to turn off/on direct binding. That way user code could turn on direct binding in hotspots. Unfortunately, there's an open bug (#130) which causes AOT compilation to erase namespace metadata, so until that's closed I would prefer the whitelist option.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 3:53 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/246
Attachments:
0001-Don-t-let-clojure.test-test-var-be-dynamically-bound.patch - https://www.assembla.com/spaces/clojure/documents/awOFYMhm8r3498eJe5afGb/download/awOFYMhm8r3498eJe5afGb

Comment by Assembla Importer [ 24/Aug/10 3:53 PM ]

technomancy said: Rich indicated in IRC that he would like to offer more flexibility for when direct binding should be applied, (possibly using ns metadata as suggested above) but wants to leave it as-is for now in order to flush out issues with direct binding.

The workaround is to redefine the var in question with {:dynamic true} metadata.

See http://clojure-log.n01se.net/date/2010-01-14.html#i117 for a record of the conversation.

Comment by Assembla Importer [ 24/Aug/10 3:53 PM ]

technomancy said: Related association with ticket #271 was added

Comment by Assembla Importer [ 24/Aug/10 3:53 PM ]

technomancy said: [file:awOFYMhm8r3498eJe5afGb]: patch for dynamic test-var

Comment by Assembla Importer [ 24/Aug/10 3:53 PM ]

technomancy said: Until we have a more fine-grained way of switching on and off direct binding, it would be very useful in some contexts to be able to rebind test-var.

Comment by Assembla Importer [ 24/Aug/10 3:53 PM ]

stuart.sierra said: For a better long-term solution to this specific problem, I'm working on a complete rewrite of clojure.test that doesn't depend on any dynamic binding. Intermediate work here:

http://github.com/stuartsierra/lazytest

Comment by Assembla Importer [ 24/Aug/10 3:53 PM ]

technomancy said: (In [[r:9694a92d84ddffb6794fa97efd429b5e23285553]]) Don't let clojure.test/test-var be dynamically bound. Fixes #246.

Signed-off-by: Rich Hickey <richhickey@gmail.com>

Branch: master





[CLJ-245] Unnamed fns should have no binding of name Created: 13/Jan/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Rich Hickey
Resolution: Completed Votes: 0
Labels: None


 Description   

Currently a binding is created for a generated name



 Comments   
Comment by Assembla Importer [ 24/Aug/10 3:52 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/245

Comment by Assembla Importer [ 24/Aug/10 3:52 PM ]

richhickey said: Parent association with ticket #94 was added

Comment by Assembla Importer [ 24/Aug/10 3:52 PM ]

richhickey said: Parent association with ticket #94 was removed

Comment by Assembla Importer [ 24/Aug/10 3:52 PM ]

richhickey said: (In [[r:e6a315bd3d514c6af10d2e7a853b693aa5f4520d]]) Unnamed fns should have no binding of name - fixes #245

Branch: master





[CLJ-243] Add bound? and thread-bound? predicates Created: 12/Jan/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Discussed in #clojure here: http://clojure-log.n01se.net/date/2010-01-12.html#i96

Wraps Var.isBound and the truthiness of Var.getThreadBinding; the latter particularly handy for knowing whether or not set! will fail or not.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/243
Attachments:
boundthread-bound.diff - https://www.assembla.com/spaces/clojure/documents/cIZ_rS_78r3QKheJe5afGb/download/cIZ_rS_78r3QKheJe5afGb

Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

oranenj said: Shouldn't tickets with patches be marked as "test"? Anyway, I tried this, and it applies cleanly and appears to work.

Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

cemerick said: Yep, that's my bad. Thanks, Jarkko.

Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

stu said: Updating tickets (#230, #243)





[CLJ-242] Support implicit macro args for form and locals Created: 12/Jan/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None


 Description   

Inside the body of a defmacro expander, &whole will refer to the original macro invocation form (thus allowing recovery and use of metadata on that form by the expander itself). &env will refer to a map of symbols to TBD, such symbols representing the locals in scope. This will break code that depends on defmacro creating a fn with exactly the same signature.

Possible alternate names: &locals, &form



 Comments   
Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/242

Comment by Assembla Importer [ 24/Aug/10 7:51 AM ]

richhickey said: names are &form and &env





[CLJ-241] Tests for reify Created: 12/Jan/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Declined Votes: 0
Labels: None


 Description   

subsumed by #239 and #240



 Comments   
Comment by Assembla Importer [ 24/Aug/10 3:51 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/241





[CLJ-240] Tests for protocols and types, round 1 Created: 12/Jan/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

I have included a patch with my original tests (pre deftype/defrecord split) plus a final patch to get things passing with the latest greatest.

The final commit is worth looking at. The reduced dynamism of deftype is visible, in that I used to be able to redefine a type multiple times in a series of tests, and am now relying on per-test named types. I think this tradeoff is worth it for unification with the host type system. But a bigger issue occurs when working at the REPL: you can reload types, but not refer to the reloaded ones.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 5:51 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/240
Attachments:
initial-tests-for-protocols-and-types.patch - https://www.assembla.com/spaces/clojure/documents/c5lA0usxGr37xPeJe5d-aX/download/c5lA0usxGr37xPeJe5d-aX

Comment by Assembla Importer [ 24/Aug/10 5:51 AM ]

stu said: [file:c5lA0usxGr37xPeJe5d-aX]





[CLJ-239] Tests for types and protocols, round 2 Created: 12/Jan/10  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Comments   
Comment by Assembla Importer [ 24/Aug/10 5:51 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/239
Attachments:
239-more-tests-for-types.patch - https://www.assembla.com/spaces/clojure/documents/c3AD6Av6ur36EQeJe5cbCb/download/c3AD6Av6ur36EQeJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 5:51 AM ]

mikehinchey said: I started writing some tests, but haven't gotten any feedback. Let me know if this is worthwhile.

http://groups.google.com/group/clojure-dev/browse_thread/thread/68075dbbe48cca4d
http://github.com/mikehinchey/clojure/commit/242d477423ef4df21b0f70e2a19a9ef68ea2b5df

Comment by Assembla Importer [ 24/Aug/10 5:51 AM ]

stu said: Mike,

Can you attach a patch that includes just the redef-protocol test and the compiler fix?

Thanks!

Comment by Assembla Importer [ 24/Aug/10 5:51 AM ]

stu said: [file:c3AD6Av6ur36EQeJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 5:51 AM ]

stu said: I have opened a new ticket (#333) for the bug Mike found.

My patch includes tests and a fix for a NPE when misusing extend.





[CLJ-232] Locals cleared too aggressively on delay Created: 30/Dec/09  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Rich Hickey
Resolution: Completed Votes: 0
Labels: None


 Description   

Steve Gilardi and I noticed some strange behaviour with local clearing in conjunction with delay:

(defn do-something [x]
(throw (Exception.)))

(defn clear-locals [x]
(delay (try (do-something x)
(catch Exception e
(println "argument value:" x)))))

(force (clear-locals :argument))
;; => argument value: nil

It seems the locals are getting cleared a little too aggressively here. I did some digging to discover that delay is a thin wrapper around an fn, but using an fn in this context (rather than a delay) does not trigger the problem. Also I found that throwing an exception directly inside the try block (rather than in a function called from the try block) did not trigger it.

I was able to reproduce in the new branch, the master branch, and 1.0.0, so it's not related to the more recent locals-clearing changes.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 5:43 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/232
Attachments:
locals.clj - https://www.assembla.com/spaces/clojure/documents/d6rA1a9ASr3RHaeJe5afGb/download/d6rA1a9ASr3RHaeJe5afGb

Comment by Assembla Importer [ 24/Aug/10 5:43 AM ]

technomancy said: [file:d6rA1a9ASr3RHaeJe5afGb]: repro case

Comment by Assembla Importer [ 24/Aug/10 5:43 AM ]

chouser@n01se.net said:

((let [x :foo]
     (#^{:once true} fn* []
       (try (#(throw (Exception.)))
         (catch Exception e
           (println "x:" x))))))
</code></pre>
The same problem is visible when a finally clause uses a closed-over:
<pre><code>  ((let [x :foo]
     (#^{:once true} fn* []
       (try (#(throw (Exception.)))
         (finally
           (println "x:" x))))))

Both of these print x: nil when they should print x: :foo

I think the problem is that, because the last expr in a try block produces the value that will be returned, it is compiled in a "return" context (a.k.a. tail position), therefore the locals are cleared before calling the final function.

But if that final call throws an exception, you end up in the catch clause with your locals cleared.

emitClearLocals protects against this problem by using localsUsedInCatchFinally, but emitClearCloses (used only when :once is true) does not.

The solution is so very far beyond me. I guess the simplest might be to skip clearing of closed-overs that are used in catch/finally clauses, but I don't think those are currently tracked. It looks like closeOver could be made to track these as well, but I'm lost as to the relationships between the various instances in that code.

Comment by Assembla Importer [ 24/Aug/10 5:43 AM ]

danlarkin said: Kevin Downey and I just stumbled on this problem again. Here's our smallest repro case:

(defn throwsomething [] (throw (Exception.)))

(defn foo [bar]
  @(delay (try
           (throwsomething)
           (catch Exception e
             (nil? bar)))))
</code></pre>

We came up with two workarounds, one is to wrap everything inside the delay in a let capturing the "bar" scope, like this:

<pre><code>
(defn foo [bar]
  @(delay (let [bar bar]
            (try
             (throwsomething)
             (catch Exception e
               (nil? bar))))))
</code></pre>

and the other is to not have the exception-throwing call in the tail position, like this:

<pre><code>
(defn foo [bar]
  @(delay (try
           (let [t (throwsomething)]
             t)
           (catch Exception e
             (nil? bar)))))
Comment by Assembla Importer [ 24/Aug/10 5:43 AM ]

richhickey said: (In [[r:93fecbd825c26e2570f8449cd64d0df0cc520c1d]]) fold closes clearing into the path system, fixes #232

Branch: master





[CLJ-231] deftype cons doesn't support maps Created: 30/Dec/09  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

The deftype IPersistentMap implementation of cons does not have the same functionality as APersistentMap.cons. The current implementation doesn't support cons'ing a map.

See this thread for the original report:
http://groups.google.com/group/clojure/browse_thread/thread/d4dd1a0a1ffee6c5#



 Comments   
Comment by Assembla Importer [ 24/Aug/10 2:43 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/231
Attachments:
231.diff - https://www.assembla.com/spaces/clojure/documents/bUooUw9ymr3PgfeJe5aVNr/download/bUooUw9ymr3PgfeJe5aVNr
0001-Fixes-the-deftype-ipersistentmap-implementation-of-c.patch - https://www.assembla.com/spaces/clojure/documents/deOmiIlsOr36cneJe5aVNr/download/deOmiIlsOr36cneJe5aVNr
0001-Fixes-the-deftype-ipersistentmap-implementation-of-c.patch - https://www.assembla.com/spaces/clojure/documents/a1cup-ltur34PWeJe5avMc/download/a1cup-ltur34PWeJe5avMc
make-defrecord-cons-work.patch - https://www.assembla.com/spaces/clojure/documents/coEZaItWar36KFeJe5dVir/download/coEZaItWar36KFeJe5dVir

Comment by Assembla Importer [ 24/Aug/10 2:43 PM ]

importer said: [file:bUooUw9ymr3PgfeJe5aVNr]: A patch to fix the issue

Comment by Assembla Importer [ 24/Aug/10 2:43 PM ]

richhickey said: Thanks for this. Primitive ops like this need to be coded for performance though, so would need to be tighter in order to be considered.

Comment by Assembla Importer [ 24/Aug/10 2:43 PM ]

richhickey said: patch does not apply -

"Patch does not have a valid e-mail address."

did you use git format-patch?

Comment by Assembla Importer [ 24/Aug/10 2:43 PM ]

importer said: [file:deOmiIlsOr36cneJe5aVNr]: A second attempt at the patch. This one is as fast as the original java method, and was created with git format-patch

Comment by Assembla Importer [ 24/Aug/10 2:43 PM ]

importer said: Actually, ignore the second patch, there's a bug.

Comment by Assembla Importer [ 24/Aug/10 2:43 PM ]

importer said: [file:a1cup-ltur34PWeJe5avMc]: This one works, and is fast

Comment by Assembla Importer [ 24/Aug/10 2:43 PM ]

stu said: [file:coEZaItWar36KFeJe5dVir]

Comment by Assembla Importer [ 24/Aug/10 2:43 PM ]

stu said: patch had gone stale, and had a minor defect handling nil. Apr 23 patch subsumes previous patches and adds tests.

Comment by Assembla Importer [ 24/Aug/10 2:43 PM ]

stu said: Updating tickets (#231, #313, #303, #306)





[CLJ-230] More precise docstring for #'delay Created: 23/Dec/09  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Christophe Grand
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Change docstring for #'delay to precise deref forces delays too.
See http://groups.google.com/group/clojure-dev/browse_thread/thread/d835fd49d08e48ca



 Comments   
Comment by Assembla Importer [ 24/Aug/10 2:40 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/230
Attachments:
delay-doc-230.patch - https://www.assembla.com/spaces/clojure/documents/ctaZRO7_0r3OLweJe5aVNr/download/ctaZRO7_0r3OLweJe5aVNr
0001-change-docstring-for-delay-to-specifiy-that-deref-fo.patch - https://www.assembla.com/spaces/clojure/documents/coSAKicYWr34sbeJe5aVNr/download/coSAKicYWr34sbeJe5aVNr
ticket230.patch - https://www.assembla.com/spaces/clojure/documents/ao-gBWrTqr36P7eJe5d-aX/download/ao-gBWrTqr36P7eJe5d-aX

Comment by Assembla Importer [ 24/Aug/10 2:40 PM ]

cgrand said: [file:ctaZRO7_0r3OLweJe5aVNr]: patch

Comment by Assembla Importer [ 24/Aug/10 2:40 PM ]

richhickey said: This doesn't look like it is in the right patch format

Comment by Assembla Importer [ 24/Aug/10 2:40 PM ]

cgrand said: [file:coSAKicYWr34sbeJe5aVNr]: used "git format-patch" this time

Comment by Assembla Importer [ 24/Aug/10 2:40 PM ]

richhickey said: This patch fails to apply

Comment by Assembla Importer [ 24/Aug/10 2:40 PM ]

cgrand said: [file:ao-gBWrTqr36P7eJe5d-aX]

Comment by Assembla Importer [ 24/Aug/10 2:40 PM ]

cgrand said: recreated patch from a fresh checkout of Clojure's master branch

Comment by Assembla Importer [ 24/Aug/10 2:40 PM ]

cgrand said: (In [[r:92e9c2d76f6b8d86789bc69496596a98d8b67228]]) change docstring for delay to specifiy that deref forces. See #230

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>

Branch: master

Comment by Assembla Importer [ 24/Aug/10 2:40 PM ]

stu said: Updating tickets (#230, #243)





[CLJ-222] line-seq returns element only when successive line is read Created: 14/Dec/09  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Drew Raines
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

The lazy-seq</code> in <code>line-seq</code> wraps the call to <code>cons</code> but not the <code>readLine(), which delays each line of the reader from being returned until the next one is read.

http://groups.google.com/group/clojure/browse_thread/thread/e0d6efd53187ea09



 Comments   
Comment by Assembla Importer [ 24/Aug/10 5:34 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/222
Attachments:
issue-222-line-seq.diff - https://www.assembla.com/spaces/clojure/documents/aR53uY6Pmr3QNNeJe5afGb/download/aR53uY6Pmr3QNNeJe5afGb
issue-222-star-seq.diff - https://www.assembla.com/spaces/clojure/documents/aIK31O6ZKr3PcSeJe5aVNr/download/aIK31O6ZKr3PcSeJe5aVNr

Comment by Assembla Importer [ 24/Aug/10 5:34 AM ]

drewr said: [file:aR53uY6Pmr3QNNeJe5afGb]: Return readLine() before lazy-seq

Comment by Assembla Importer [ 24/Aug/10 5:34 AM ]

drewr said: I didn't see a problem with the other *-seq fns, but I could be wrong.

Comment by Assembla Importer [ 24/Aug/10 5:34 AM ]

drewr said: [file:aIK31O6ZKr3PcSeJe5aVNr]: Patch other two *-seq fns same way

Comment by Assembla Importer [ 24/Aug/10 5:34 AM ]

drewr said: I added a patch which alters resultset-seq</code> and <code>re-seq</code> so that they don't require a successive element to be consumed before returning current. However, these fns now return a <code>Cons as the first element. Assuming that's not an issue, then these changes should work.

Comment by Assembla Importer [ 24/Aug/10 5:34 AM ]

drewr said: My apologies, "return a Cons</code> as the first element" is not correct. I mean that they return a <code>Cons</code> first, then <code>lazy-seq</code>s forward. Since a <code>Cons is seqable, I'm thinking it won't be an issue.

Comment by Assembla Importer [ 24/Aug/10 5:34 AM ]

drewr said: (In [[r:2855e34106b2cacd4614f2b7e31f1536b4b849bc]]) Move cons outside of lazy-seq for *-seq fns; fixes #222.

Signed-off-by: Chouser <chouser@n01se.net>

Branch: master





[CLJ-220] Adding more test cases for clojure set Created: 11/Dec/09  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Assembla Importer
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Expanded the test cases to also test
difference
select
project
rename-keys
index
map-invert
join

Attached is the patch file.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 8:31 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/220
Attachments:
add-more-test-for-set.diff - https://www.assembla.com/spaces/clojure/documents/c7bILu5HGr3QaYeJe5afGb/download/c7bILu5HGr3QaYeJe5afGb

Comment by Assembla Importer [ 24/Aug/10 8:31 AM ]

chouser@n01se.net said: Applies cleanly to master. Adds 8 tests that all pass.

Looks good to me.

--Chouser

Comment by Assembla Importer [ 24/Aug/10 8:31 AM ]

importer said: (In [[r:caaa0f4c96ddf43b6bbe3d760f49701c3f183783]]) adding more tests for set Fixes #220

Signed-off-by: Chouser <chouser@n01se.net>

Branch: master





[CLJ-204] clojure.test/thrown-with-msg? uses re-match, should use re-find Created: 21/Oct/09  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Sierra
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

By the time exceptions percolate up to clojure.test, they are often decorated by additional levels of RuntimeException, thus the message being matched is usually "java.lang.RuntimeException: My error message". I end up always having to prefix my re with ".*". If I want to match the entire message, RE's allow that using ^.



 Comments   
Comment by Assembla Importer [ 24/Aug/10 4:54 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/204
Attachments:
fix204-1.patch - https://www.assembla.com/spaces/clojure/documents/d2LE6U3Pqr3OLfeJe5aVNr/download/d2LE6U3Pqr3OLfeJe5aVNr

Comment by Assembla Importer [ 24/Aug/10 4:54 AM ]

stuart.sierra said: [file:d2LE6U3Pqr3OLfeJe5aVNr]: patch

Comment by Assembla Importer [ 24/Aug/10 4:54 AM ]

stuart.sierra said: (In [[r:634b3d535a13509efca07d8cbfb7f11ff2792a76]]) Use re-find (not re-matches) in thrown-with-msg?; fixes #204

Signed-off-by: Chouser <chouser@n01se.net>

Branch: master





[CLJ-198] attr-map argument for clojure.core/ns Created: 17/Oct/09  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: James Reeves
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

Discussion: http://groups.google.com/group/clojure-dev/browse_thread/thread/97ffdb1d89c0f847

The clojure.core/ns macro should have an attr-map argument like defn and defmulti. For example:

(ns example
  {:author "John Doe"
   :email "jdoe@example.com"}
  (:use clojure.contrib.def))


 Comments   
Comment by Assembla Importer [ 24/Aug/10 4:51 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/198
Attachments:
ns-attr-map.diff - https://www.assembla.com/spaces/clojure/documents/cMA1GOWjOr3RwUeJe5aVNr/download/cMA1GOWjOr3RwUeJe5aVNr

Comment by Assembla Importer [ 24/Aug/10 4:51 AM ]

jreeves said: [file:cMA1GOWjOr3RwUeJe5aVNr]

Comment by Assembla Importer [ 24/Aug/10 4:51 AM ]

jreeves said: (In [[r:c2e75b8d668f1609436f8a8f0f722e8df6d03f11]]) Added optional attr-map argument to ns macro, fixes #198

Signed-off-by: Chouser <chouser@n01se.net>

Branch: master

Comment by Assembla Importer [ 24/Aug/10 4:51 AM ]

chouser@n01se.net said: (In [[r:1186fe50804195f961d38cb7eab1bad2abb3a513]]) Fix 'ns' macro arglist doc. Refs #198

Branch: master





[CLJ-162] gen-class fails to accept type hints for arrays of primitives Created: 28/Jul/09  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Matt Revelle
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

gen-class fails to accept type hints for arrays of primitives like "[B"

This is a bug in genclass.clj's the-class, which should have (some #{\. \[} strx) instead of (some #{\.} strx)



 Comments   
Comment by Assembla Importer [ 24/Aug/10 4:03 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/162
Attachments:
0001-Fixed-162-gen-class-fails-to-accept-type-hints-for-a.patch - https://www.assembla.com/spaces/clojure/documents/daM8sM3sar3Ok0eJe5aVNr/download/daM8sM3sar3Ok0eJe5aVNr

Comment by Assembla Importer [ 24/Aug/10 4:03 AM ]

richhickey said: Updating tickets (#8, #42, #113, #2, #20, #94, #96, #104, #119, #124, #127, #149, #162)

Comment by Assembla Importer [ 24/Aug/10 4:03 AM ]

mattrevelle said: [file:daM8sM3sar3Ok0eJe5aVNr]: Adding [ to skip prepending of "java.lang"

Comment by Assembla Importer [ 24/Aug/10 4:03 AM ]

mattrevelle said: The fix recommended by Rich seems to work.

It was as simple as adding [ to the conditional expression.

Comment by Assembla Importer [ 24/Aug/10 4:03 AM ]

mattrevelle said: (In [[r:493b8f25dea8dc316f5224509d09a50c0672a1eb]]) Fixed #162: gen-class fails to accept type hints for arrays of primitives. Rich's proposed fix works fine.

Signed-off-by: Chouser <chouser@n01se.net>

Branch: master





[CLJ-145] clojure.set/rename-keys doesn't do what it says it should Created: 06/Jul/09  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Chouser
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   

user=> (doc rename-keys)
-------------------------
clojure.set/rename-keys
([map kmap])
Returns the map with the keys in kmap renamed to the vals in kmap
nil

I expect the return value to be a map of the same size as the first input, with its keys being those in the first input other than those which are substituted according to the second. That is not what occurs:

user=> (rename-keys {:foo 1 :bar 2} {:foo :new-foo :zob :new-zob})
{:new-zob nil, :new-foo 1, :bar 2}

Tested against a1397390d8b3b63f2039359520629d87b152d717 (current at time of filing).



 Comments   
Comment by Assembla Importer [ 24/Aug/10 6:52 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/145
Attachments:
patch-issue145.diff - https://www.assembla.com/spaces/clojure/documents/d8vdtEbFyr36hUeJe5aVNr/download/d8vdtEbFyr36hUeJe5aVNr

Comment by Assembla Importer [ 24/Aug/10 6:52 AM ]

rnewman said: [file:d8vdtEbFyr36hUeJe5aVNr]: One-line fix.

Comment by Assembla Importer [ 24/Aug/10 6:52 AM ]

rnewman said: This is still biting me a little, so here's a one-line fix.

Comment by Assembla Importer [ 24/Aug/10 6:52 AM ]

chouser@n01se.net said: Richard, would you please use git to format your patch as described here: http://clojure.org/patches

Thanks,
--Chouser

Comment by Assembla Importer [ 24/Aug/10 6:52 AM ]

rnewman said: Done. Sorry about that!

Comment by Assembla Importer [ 24/Aug/10 6:52 AM ]

richhickey said: Thanks for the patch. FYI, the tests needed patching too.





[CLJ-119] GC Issue 115: Document that #^chars works Created: 17/Jun/09  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Enhancement
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None


 Description   
Reported by hlship, May 05, 2009

In the Java Interop documentation, it identifies a number of special tags
that can be used to identify parameters of primitive arrays.

It does not list #^chars (equivalent to char[]) but this appears to (at
least partially) work.

On a related note, for this code:

(def #^StringBuilder *buffer*)

(defn- add-text
  "Adds text to the buffer and manages the *text-location* var."
  [#^chars ch start length]
  (.append *buffer* ch start length)  ;;;; line 98
  (when (nil? *text-location*)
        (set! *text-location* (current-location))))


I still get 

Reflection warning,
com/howardlewisship/cascade/internal/xmltokenizer.clj:98 - call to append
can't be resolved.


 Comments   
Comment by Assembla Importer [ 24/Aug/10 3:45 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/119

Comment by Assembla Importer [ 24/Aug/10 3:45 AM ]

richhickey said: Updating tickets (#8, #19, #30, #31, #126, #17, #42, #47, #50, #61, #64, #69, #71, #77, #79, #84, #87, #89, #96, #99, #103, #107, #112, #113, #114, #115, #118, #119, #121, #122, #124)

Comment by Assembla Importer [ 24/Aug/10 3:45 AM ]

troussan said: The reflection warning in the example code is caused by start and length parameters. If you replace the line 98 with:
(.append buffer ch (int start) (int length)) ;;;; line 98
the call to append is resolved.

Comment by Assembla Importer [ 24/Aug/10 3:45 AM ]

richhickey said: Updating tickets (#8, #42, #113, #2, #20, #94, #96, #104, #119, #124, #127, #149, #162)

Comment by Assembla Importer [ 24/Aug/10 3:45 AM ]

richhickey said: Updating tickets (#94, #96, #104, #119, #163)

Comment by Assembla Importer [ 24/Aug/10 3:45 AM ]

stu said: To prevent the reflection warning, use primitive coercions as needed:

(.append *buffer* ch start length)

I have update the docs on clojure.org.

Comment by Assembla Importer [ 24/Aug/10 3:45 AM ]

stu said: repeating the previous comment, with the coercions this time.

(.append *buffer* ch (int start) (int length))




[CLJ-104] GC Issue 100: gen-class creating non-compliant field names Created: 17/Jun/09  Updated: 24/Aug/10  Resolved: 24/Aug/10

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

Type: Defect
Reporter: Anonymous Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None

Approval: Ok

 Description   
Reported by solkis, Apr 04, 2009

The defect was described in this clojure group post by Michael Reid: 

http://groups.google.com/group/clojure/browse_thread/thread/e64719d716c29ce0

It appears that IBM JVMs have more stringent field name checking than do
the Sun JVMs.

Classes generated by gen-class and executing on IBM JVMs used with the
WebSphere Application Server require the basic fix outlined in the patch on
the thread above or the following error will result:

java.lang.ClassFormatError: JVMCFRE114 field name is invalid;


 Comments   
Comment by Assembla Importer [ 24/Aug/10 3:45 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/104
Attachments:
use-underscore-instead-of-dash-104.patch - https://www.assembla.com/spaces/clojure/documents/cNfYU0r9qr348xeJe5d-aX/download/cNfYU0r9qr348xeJe5d-aX
munge-genclass-field-names-104.patch - https://www.assembla.com/spaces/clojure/documents/akvHectnCr37JQeJe5dVir/download/akvHectnCr37JQeJe5dVir

Comment by Assembla Importer [ 24/Aug/10 3:45 AM ]

richhickey said: Updating tickets (#8, #42, #113, #2, #20, #94, #96, #104, #119, #124, #127, #149, #162)

Comment by Assembla Importer [ 24/Aug/10 3:45 AM ]

richhickey said: Updating tickets (#94, #96, #104, #119, #163)

Comment by Assembla Importer [ 24/Aug/10 3:45 AM ]

stu said: [file:cNfYU0r9qr348xeJe5d-aX]

Comment by Assembla Importer [ 24/Aug/10 3:45 AM ]

stu said: [file:akvHectnCr37JQeJe5dVir]

Comment by Assembla Importer [ 24/Aug/10 3:45 AM ]

stu said: Disregard the April 14 patch, and please take a look at the April 20 patch (which includes tests).

Comment by Assembla Importer [ 24/Aug/10 3:45 AM ]

stu said: (In [[r:084e5604710eb16df43ad529adabf18f40795bf9]]) munge genclass field names to keep Java side happy, see #104

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>

Branch: master