<< Back to previous view

[CONTRIB-19] Re-add auto-agent.clj Created: 19/Aug/09  Updated: 24/Aug/10

Status: Open
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

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


 Description   

This was discussed briefly on the clojure dev list, but no consensus was reached. Instead, I have attached the changes that have fixed the original library and if the clojure-contrib members wish to include it (again), then it's readily available.

The original code by Sierra required 2 changes to get working. First, @ was macro-expanding to a lazy-seq, so the filtering based on list? would fail. Second, I added a check for an explicit call to (deref). Also, I re-added auto-agent namespace for compilation to build.xml.

My live changes can be found at: http://github.com/fogus/clojure-contrib/tree/auto-agent-again. The tests can be run with (run-tests 'clojure.contrib.auto-agent).

If it is merged back into the contrib master, then I would be happy to roll the tests into the test-contrib framework.



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

Converted from http://www.assembla.com/spaces/clojure/tickets/19
Attachments:
auto-agent-again.diff - https://www.assembla.com/spaces/clojure/documents/dHYyXWJour3OEFeJe5afGb/download/dHYyXWJour3OEFeJe5afGb

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

fogus said: [file:dHYyXWJour3OEFeJe5afGb]

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

stuart.sierra said: Updating tickets (#28, #32, #45, #47, #51, #19)





[CONTRIB-25] Clojure API documentation should identify the date the doc was generated and the version number of the library Created: 23/Aug/09  Updated: 24/Aug/10

Status: In Progress
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

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


 Description   

Failing to do this causes a lot of confusion (I've already gotten bit) when you have stable releases out in the world and the docs reflect an alpha version. This has been painful, for example, with the shift of clojure.contrib.test-is to clojure.test.



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

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

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

stuart.sierra said: Updating tickets (#1, #2, #3, #4, #6, #20, #23, #25, #30, #31, #33, #34, #35, #37, #38, #52, #55, #58, #59, #60, #61, #62, #63, #64)





[CONTRIB-55] clojure.contrib.sql expects *err* to be a PrintWriter Created: 31/Dec/09  Updated: 24/Apr/11

Status: In Progress
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect
Reporter: Anonymous Assignee: Stephen C. Gilardi
Resolution: Unresolved Votes: 0
Labels: None


 Description   

The problem is that c.c.sql.internal calls `.println` on a "stream" to print update counts and errors. That method only exists on a `PrintWriter`. This isn't true within Slime, where it's a `StringWriter`.

The attached patch binds `out` and uses `println` instead, which does the right thing. I've augmented the docstrings to request a `Writer` as the value of `stream`, which aligns with the docstring for `print`.



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

Converted from http://www.assembla.com/spaces/clojure/tickets/55
Attachments:
sql-internal.diff - https://www.assembla.com/spaces/clojure/documents/btl6lW9Mmr3OPceJe5aVNr/download/btl6lW9Mmr3OPceJe5aVNr

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

rnewman said: [file:btl6lW9Mmr3OPceJe5aVNr]: Diff against current head.

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

stuart.sierra said: Updating tickets (#1, #2, #3, #4, #6, #20, #23, #25, #30, #31, #33, #34, #35, #37, #38, #52, #55, #58, #59, #60, #61, #62, #63, #64)

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

scgilardi said: Following the discussion in the developer group and as suggested by Stuart Halloway, I'm planning to make these changes:

[1] adopt the substance of Richard Newman's patch, changes to sql.internal's print-sql-exception, print-sql-exception-chain, print-update-counts functions
[2] remove the automatic printing to err on exceptions. It will be up to the caller to handle the exceptions as he desires: eating, logging, or printing, etc.
[3] move the print* functions to c.c.sql proper as they will now be "public".

Comment by Sean Corfield [ 24/Apr/11 10:49 PM ]

This will be addressed in clojure.java.jdbc and needs to be migrated to the new JIRA project for it once that is created (I don't have permission to do anything beyond comment / clone this issue).





[CONTRIB-71] patch for changing assert-args over to :pre and :post for c.c.mock Created: 08/Feb/10  Updated: 24/Aug/10

Status: Open
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

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


 Description   

I've cleaned up the documentation and got rid of the old assert-args code from c.c.mock. The attached patches contain the two commits I made on my repository. I'm new to patches and git so let me know if I missed anything obvious!



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

Converted from http://www.assembla.com/spaces/clojure/tickets/71
Attachments:
0001-cleaned-up-formatting-and-improved-documentation-of-.patch - https://www.assembla.com/spaces/clojure/documents/bANPRCfq0r34l9eJe5afGb/download/bANPRCfq0r34l9eJe5afGb
0002-removed-assert-args-macro-borrowed-from-core-and-rep.patch - https://www.assembla.com/spaces/clojure/documents/bANTaAfq0r34l9eJe5afGb/download/bANTaAfq0r34l9eJe5afGb
c.c.mock-updates.diff - https://www.assembla.com/spaces/clojure/documents/djL5oaC8Wr37DOeJe5cbLr/download/djL5oaC8Wr37DOeJe5cbLr

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

matt.clark.1 said: [file:djL5oaC8Wr37DOeJe5cbLr]: Use only this patch. The other two are hopelessly out of date.





[CONTRIB-75] tests for c.c.io Created: 14/Apr/10  Updated: 10/Nov/10

Status: In Progress
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

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


 Description   

c.c.io has few tests, despite being on the most used libraries in contrib. Be a clojure here and write some unit tests for this module. Code review comments would be welcome too!



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

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

Comment by Colin Jones [ 10/Nov/10 9:54 AM ]

c.c.io no longer exists, as of 2c6c9e3. So this ticket should likely move to Clojure proper (for clojure.java.io).

A cursory look through the clojure.java.io tests shows that most public functions are covered, but there's probably still room for more tests there. Needs more investigation.

The real link to the Assembla ticket is http://www.assembla.com/spaces/clojure-contrib/tickets/75





[CONTRIB-85] build and release sublibraries Created: 26/May/10  Updated: 24/Aug/10

Status: Open
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

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


 Description   

Design goals

  • keep key libraries in contrib, protecting provenance and license so that non-technical issues do not keep people from using code
  • continue to produce a monolithic contrib build for casual/one-off application consumers
  • start building individual libraries within contrib, so that larger apps can manage dependencies in a granular fashion

I propose we start with the new match (matchure) library, get feedback, and then take requests for what other libraries need to be bundled separately.



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

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





[CONTRIB-99] Bug in clojure.contrib.json/read-json Created: 01/Oct/10  Updated: 26/Jan/11

Status: In Progress
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect
Reporter: Anonymous Assignee: Anthony Simpson
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Pulled this from clojure assembla ticket #436 to clojure-contrib
See clojure-436

What (small set of) steps will reproduce the problem?
$ java -cp lib/clojure-1.2.0.jar:lib/clojure-contrib-1.2.0.jar clojure.main
Clojure 1.2.0
user=> (require 'clojure.contrib.json)
nil
user=> (clojure.contrib.json/read-json "")
java.lang.IllegalArgumentException: Value out of range for char: -1 (NO_SOURCE_FILE:0)
user=>

What is the expected output? What do you see instead?

Expected:

(if eof-error?
  (throw (EOFException. "JSON error (end-of-file)"))
  eof-value)

What version are you using?
1.2

Was this discussed on the group? If so, please provide a link to the discussion
[13:51] <na_ka_na> Hey guys I think there's a bug in clojure.contrib.json at line 116
[13:51] <na_ka_na> in clojure 1.2
[13:52] <na_ka_na> it has a (char i) and then checks for (= i -1) ... but (char -1) fails
[13:52] <na_ka_na> where can I report it ?
[13:53] <LauJensen> na_ka_na: assembla/support



 Comments   
Comment by Assembla Importer [ 19/Oct/10 12:20 AM ]

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

Comment by Anthony Simpson [ 06/Jan/11 7:05 PM ]

This appears to no longer be applicable.

Clojure 1.3.0-master-SNAPSHOT
user=> (require 'clojure.contrib.json)
nil
user=> (clojure.contrib.json/read-json "")
EOFException JSON error (end-of-file) clojure.contrib.json/read-json-reader (json.clj:115)

Comment by Rasmus Svensson [ 26/Jan/11 6:26 AM ]

Could this be a duplicate of http://dev.clojure.org/jira/browse/CONTRIB-91 ?





[CONTRIB-88] clojure.contrib.sql runs out of memory on very large datasets Created: 09/Jul/10  Updated: 24/Aug/10

Status: In Progress
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

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


 Description   

If you have a query that results in a very large dataset you will run out of memory because by default, with-query-results pulls the entire result set into memory (even though it creates a lazy-seq using resultset-seq).

This issue has been discussed previously here:
http://groups.google.com/group/clojure/browse_thread/thread/7b0c250e0ba6c9eb/fb9001522b49c20a

The fix is simple, just call (.setFetchSize stmt 1). But, with-query-results doesn't give you a way to do that currently. I propose adding an optional parameter after sql-params that is a hash of attributes to set on the PreparedStatement before executing it.

So you can do this:

(with-connection {���} 
    (.setAutoCommit (sql/connection) false) ;; needed for postgres 
    (with-query-results results ["SELECT id, data FROM nodes"] 
      {:fetch-size 1000} 
      (doseq [r results] 
        ���)))

The new code in clojure.contrib.sql is very simple, but it depends on a new contrib namespace called clojure.contrib.bean. Here is more info on my proposed fix:
http://groups.google.com/group/clojure-dev/browse_thread/thread/d8334759f10f3f45



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

Converted from http://www.assembla.com/spaces/clojure/tickets/88
Attachments:
sql-stmt-opts-with-bean.diff - https://www.assembla.com/spaces/clojure/documents/cjDxceI4er36sweJe5cbCb/download/cjDxceI4er36sweJe5cbCb

Comment by Assembla Importer [ 24/Aug/10 8:09 PM ]

importer said: [file:cFaBqYI38r3565eJe5cbLA]

Comment by Assembla Importer [ 24/Aug/10 8:09 PM ]

importer said: [file:cjDxceI4er36sweJe5cbCb]

Comment by Assembla Importer [ 24/Aug/10 8:09 PM ]

importer said: Hey Steve,

Any progress on this? Another option instead of passing a map of attributes and using bean would be to allow the user to pass an optional function that would be called on the statement object. I've seen code like this in compojure, I think:

(with-connection {���} 
    (.setAutoCommit (sql/connection) false) ;; needed for postgres 
    (with-query-results results ["SELECT id, data FROM nodes"] 
      #(.setFetchSize % 1) 
      (doseq [r results] 
        ���)))

If this sounds better to you, I can submit a patch.

Cheers,
Justin

Comment by Assembla Importer [ 24/Aug/10 8:09 PM ]

importer said: Kyle Burton just posted a blog post about this issue: http://asymmetrical-view.com/2010/10/14/clojure-lazy-walk-sql-table.html

His fix is to add a new method called with-query-results-cursor which turns off auto-commit and sets the fetch size.

Steve, would this approach work better for you?





[CONTRIB-45] Add new functions to c.c.map-utils Created: 10/Nov/09  Updated: 26/Jul/13

Status: In Progress
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect
Reporter: Anonymous Assignee: Sean Devlin
Resolution: Unresolved Votes: 0
Labels: None


 Description   

This is a ticket for patches related to c.c.map-utils. See the following discussions:

http://groups.google.com/group/clojure-dev/browse_thread/thread/9a518c853bfbba8b
http://groups.google.com/group/clojure-dev/browse_thread/thread/4b20e40d83095c67



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

Converted from http://www.assembla.com/spaces/clojure/tickets/45
Attachments:
map-utils-update.diff - https://www.assembla.com/spaces/clojure/documents/aH0Rc00aur3QaFeJe5afGb/download/aH0Rc00aur3QaFeJe5afGb

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

devlinsf said: [file:aH0Rc00aur3QaFeJe5afGb]: A patch containing updates to map utils

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

stuart.sierra said: Updating tickets (#28, #32, #45, #47, #51, #19)





[CONTRIB-92] gen-html-docs build fails due to unecessary :use of c.c.def Created: 24/Aug/10  Updated: 26/Jul/13

Status: In Progress
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

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


 Description   

on clojure-contrib master:
gen-html-docs :uses c.c.def without actually using anything from it.
This causes the maven build to fail because clojure.contrib:def is not listed as a dependency in gen-html-docs' pom.xml.



 Comments   
Comment by Assembla Importer [ 26/Aug/10 11:23 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/92
Attachments:
0001-gen_html_docs.clj-no-longer-uses-clojure.contrib.def.patch - https://www.assembla.com/spaces/clojure/documents/a8fqHcR6er37N2eJe5cbLr/download/a8fqHcR6er37N2eJe5cbLr





[CONTRIB-86] c.c.memoize: thread-safe and extensible memoize Created: 28/May/10  Updated: 26/Jul/13

Status: In Progress
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

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


 Description   

Add the thread-safe, extensible memoize sparked from the discussion here: http://groups.google.com/group/clojure/browse_thread/thread/36a13d150d830683/fe6daf462d3ebfac



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

Converted from http://www.assembla.com/spaces/clojure/tickets/86
Attachments:
0001-Add-thread-safe-extensible-memoize-v2.patch - https://www.assembla.com/spaces/clojure/documents/aTrQGuAP0r35h6eJe5cbCb/download/aTrQGuAP0r35h6eJe5cbCb

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

bpsm said: ^{:doc "The naive safe-all cache strategy for memoize."}
Replace "safe" with "save".

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

meikelbrandmeyer said: Typo fixed.





[CONTRIB-35] clojure.contrib.trace/deftrace does not work with function definitions with doc-strings Created: 09/Oct/09  Updated: 26/Jul/13

Status: In Progress
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

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


 Description   

Apparently, defttrace does not support functions with doc-strings. I tried replacing defn with deftrace in a function of mine (as the docs indicated) and I got the following error -

java.lang.IllegalArgumentException: Don't know how to create ISeq from: Symbol
</code></pre>

Sample code to reproduce the error - 

<pre><code>(deftrace fact
  "Calculate the factorial of x"
  [x]
  (if (< x 1)
    1
    (* x (fact (- x 1)))))

Would be great if this bug is fixed, all my functions have doc-strings



 Comments   
Comment by Assembla Importer [ 28/Oct/10 5:08 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/35
Attachments:
0001-Allow-deftrace-to-work-with-docstrings-and-metadata-.patch - https://www.assembla.com/spaces/clojure/documents/bns8Fu4Jqr37_9eJe5cbCb/download/bns8Fu4Jqr37_9eJe5cbCb

Comment by Assembla Importer [ 28/Oct/10 5:08 AM ]

stuart.sierra said: Updating tickets (#1, #2, #3, #4, #6, #20, #23, #25, #30, #31, #33, #34, #35, #37, #38, #52, #55, #58, #59, #60, #61, #62, #63, #64)

Comment by Assembla Importer [ 28/Oct/10 5:08 AM ]

trptcolin said: [file:bns8Fu4Jqr37_9eJe5cbCb]

Comment by Assembla Importer [ 28/Oct/10 5:08 AM ]

trptcolin said: This patch adds support and tests for both docstrings and metadata, and also fixes the regex in the existing test to correctly identify errors. The current regex has unescaped characters: | ( ) that were almost certainly typos, as matching (for instance) only the last line of output would pass the test. The docstring/metadata support is a simplified version of what's in the source of defn.

Comment by Luc Préfontaine [ 30/Sep/11 1:36 PM ]

Issue fixed in tools.trace 1.0 which is compatible for both Clojure 1.2.x and 1.3.
The macro now verifies if the first argument is a doc string and adapts accordingly.
This ticket can be closed.





[CONTRIB-80] Add catch clauses to c.c.condition Created: 27/Apr/10  Updated: 26/Jul/13

Status: In Progress
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

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


 Description   

Currently using clojure.contrib.condition is awkward if you need to handle both Conditions and Exceptions. This patch by Steve Gilardi and myself allows you to include catch clauses in your handle-case forms for regular Exceptions.



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

Converted from http://www.assembla.com/spaces/clojure/tickets/80
Attachments:
0001-Support-catch-clauses-in-c.c.condition-for-regular-E.patch - https://www.assembla.com/spaces/clojure/documents/bn8Re8uIyr36S4eJe5cbLr/download/bn8Re8uIyr36S4eJe5cbLr

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

technomancy said: [file:bn8Re8uIyr36S4eJe5cbLr]: the patch





[CONTRIB-74] clojure.contrib.condition: list? not the correct predicate for detecting forms Created: 12/Apr/10  Updated: 26/Jul/13

Status: In Progress
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect
Reporter: Anonymous Assignee: Stephen C. Gilardi
Resolution: Unresolved Votes: 0
Labels: None


 Description   

The handler-case macro detects forms of the form "(handle ...)" by checking for items in the body for which list? returns true that begin with the symbol handle. code can be built from seqs that are not lists (e.g., clojure.lang.Cons's or lazy-seqs). The proper predicate is "seq?" not "list?".



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

Converted from http://www.assembla.com/spaces/clojure/tickets/74
Attachments:
0001-Use-seq-instead-of-list-to-determine-codeiness-.-Ref.patch - https://www.assembla.com/spaces/clojure/documents/cqHmfyuIur35MTeJe5cbLr/download/cqHmfyuIur35MTeJe5cbLr

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

technomancy said: [file:cqHmfyuIur35MTeJe5cbLr]: Implements the fix





[CONTRIB-90] clojure.contrib.io does not support appending anymore Created: 04/Aug/10  Updated: 26/Jul/13

Status: In Progress
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect
Reporter: Anonymous Assignee: bpsm
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Reproduce the bug with:

(require 'clojure.contrib.io)
(clojure.contrib.io/append-writer "/xyz.txt")
</code></pre>
which will throw an Exception ���Cannot change an open stream to append mode���.

This is caused because of a flaw in the call chain.
*clojure.contrib.io/writer* for Strings calls again *writer* for whatever *clojure.contrib.io/output-stream*
returns. We call *append-writer* which then calls *writer* on the String which in turn then calls:
<pre><code>
output-stream for ^String which calls
    output-stream for ^URL which calls
        output-stream for ^File which binds *append* to false and calls
            output-stream for ^OutputStream which
            returns a BufferedOutputStream instance which then jumps back to the
        ^File handler, which removes its binding for *append*!! and returns the BOS to the
    ^URL handler which returns the BOS to the
^String handler

At this point the outer binding (for append) is set to true again, and assert-not-appending fails.



 Comments   
Comment by Assembla Importer [ 26/Aug/10 8:25 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/90
Attachments:
0002-t90-default-reader-implementation-special-cases-for-.patch - https://www.assembla.com/spaces/clojure/documents/auuXEWSiur35DyeJe5cbCb/download/auuXEWSiur35DyeJe5cbCb
0001-t90-regression-test.patch - https://www.assembla.com/spaces/clojure/documents/amTyVwSt8r378NeJe5cbLr/download/amTyVwSt8r378NeJe5cbLr

Comment by Assembla Importer [ 26/Aug/10 8:25 PM ]

bpsm said: I've looked at this defect (on master). It seems thorny to me.

I'm finding the control flow in c.c.io rather difficult to follow, what with all those extensions of the Streams protocol delegating to one-another. I'm reasonably certain that the solution is to special case the creation of a reader in append mode.

I'll attach a patch that does this by providing a default implementation for :writer, which seems to solve the problem, but I think I still need to think about it some more before I can call it 'done'.

Note: this defect is also present in clojure.java.io 1.2.0.

Comment by Assembla Importer [ 26/Aug/10 8:25 PM ]

bpsm said: [file:auuXEWSiur35DyeJe5cbCb]

Comment by Assembla Importer [ 26/Aug/10 8:25 PM ]

bpsm said: Correction: This issue is not present in clojure 1.2.0. my bad.
I was mistaken about this bug being present in clojure.java.io. append-writer doesn't even exist there and the append magic is gone there too as per clojure#311.
I think there was just something wonky with my swank-clojure:

clojure.contrib.io> (require 'clojure.java.io)
nil
clojure.contrib.io> (in-ns 'clojure.java.io)
#<Namespace clojure.java.io>
clojure.java.io> (with-open [x (append-writer "/tmp/foo.txt")] x)
; Evaluation aborted.  ;;; EXCEPTION HERE
Comment by Assembla Importer [ 26/Aug/10 8:25 PM ]

bpsm said: [file:amTyVwSt8r378NeJe5cbLr]: regression test

Comment by Assembla Importer [ 26/Aug/10 8:25 PM ]

bpsm said: The provided regression test demonstrates the described issue and confirms that the provided patch resolves the issue. All other io unit tests continue to pass.

Comment by Assembla Importer [ 26/Aug/10 8:25 PM ]

stuart.sierra said: clojure.contrib.io is deprecated and will be removed before the next release.

Comment by Assembla Importer [ 26/Aug/10 8:25 PM ]

bpsm said: Let's see if I'm on the same page that you're on:

Since 1.2.0 is at RC3 already, you must mean 1.3.0 when you say "next release", yes/no? Predicated on that:

  • I think this should be fixed on the 1.2.x branch, where c.c.io is available, though deprecated. ("deprecated, but working" is better than "deprecated by slightly buggy.") The attached patch is against 1.2.x, not master, despite what my initial comment on this issue says.
  • I've provided a patch on #93 to remove c.c.io on master (1.3.x).




[CONTRIB-28] Add c.c.table namespace Created: 28/Aug/09  Updated: 26/Jul/13

Status: In Progress
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect
Reporter: Anonymous Assignee: Sean Devlin
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Add the namespace c.c.table, as described here:

http://groups.google.com/group/clojure-dev/browse_thread/thread/b60015723d81aa34

Also, support functions described here:
http://groups.google.com/group/clojure-dev/browse_thread/thread/4b20e40d83095c67
http://groups.google.com/group/clojure-dev/browse_thread/thread/155c8b9893d673bc

Sean



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

Converted from http://www.assembla.com/spaces/clojure/tickets/28
Attachments:
create_c_c_table.diff - https://www.assembla.com/spaces/clojure/documents/c5HLnELeKr3R1ieJe5afGb/download/c5HLnELeKr3R1ieJe5afGb

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

devlinsf said: [file:c5HLnELeKr3R1ieJe5afGb]: Changes to support table-utils

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

richhickey said: Please do not commit this (or any new libs) without approval from me first - thanks.

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

stuart.sierra said: Updating tickets (#28, #32, #45, #47, #51, #19)





[CONTRIB-107] Build Broken since April 8th Created: 15/Apr/11  Updated: 26/Jul/13

Status: Open
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Blocker
Reporter: Paul Michael Bauer Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

All


Attachments: Text File 0001-Changes-to-clojure-1.3-alpha-break-the-build-logging.patch    
Patch: Code and Test

 Description   

Since the April 8th commit to no longer recognize "earmuff" variables as dynamic by default, clojure-contrib/logging and clojure-contrib/trace are broken.



 Comments   
Comment by Paul Michael Bauer [ 15/Apr/11 11:01 PM ]

There is a pending pull request to fix logging and trace.

Comment by Paul Michael Bauer [ 17/Apr/11 8:38 AM ]

I posted this after observing the broken build and not realising clojure-contrib was recently deprecated.
Apologies. I would close this, but my perms don't allow it?





[CONTRIB-106] variable name colision in java-utils/set-system-properties Created: 09/Mar/11  Updated: 09/Mar/11

Status: Open
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Marcin Kozey Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

1.3.0-SNAPSHOT



 Description   

(defn set-system-properties
"Set some system properties. Nil clears a property."
[settings]
(doseq [[name val] settings]
(if val
(System/setProperty (name name) (name val))
(System/clearProperty (name name)))))

Somebody did a find/replace as-str -> name and created fn/variable colision with "name"






[CONTRIB-110] clojure.contrib.json does not parse JSON strings containing back slashes on Windows Created: 27/May/11  Updated: 27/May/11

Status: Open
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Rick Moynihan Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Clojure 1.2.1 and Clojure contrib 1.2.0 on Windows 7 with Sun JVM 1.6.0_22-b04



 Description   

This bug does not seem to occur on my Linux box, but when run under Windows I get the following:

user> (read-json "\"C:\\Users\"")

"C:nullsers"

On Linux I get what I would expect:

user> (read-json "\"C:\\Users\"")

"C:\Users"





[CONTRIB-111] Build failure against edge clojure Created: 01/Jun/11  Updated: 01/Jun/11

Status: Open
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Amitava Shee Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

clojure tip - commit 66a88de9408e93cf2b0d73382e662624a54c6c86
clojure-contrib tip - commit 4b562d9d110f169ea37c320edf96ad78c2fb2618



 Description   

Build failure

ashee:clojure-contrib amitava$ mvn assembly:assembly -Dclojure.jar=/Users/amitava/opt/clojure/clojure.jar

....Lots of output elided....

Testing clojure.contrib.test-logging
Exception in thread "main" java.lang.IllegalStateException: Can't dynamically bind non-dynamic var: clojure.contrib.logging/log-factory
at clojure.lang.Var.pushThreadBindings(Var.java:339)
at clojure.core$push_thread_bindings.invoke(core.clj:1716)
at clojure.contrib.test_logging$eval248$fn__249.invoke(test_logging.clj:19)
at clojure.test$compose_fixtures$fn_6529$fn_6530.invoke(test.clj:670)
at clojure.test$default_fixture.invoke(test.clj:663)
at clojure.test$compose_fixtures$fn__6529.invoke(test.clj:670)
at clojure.test$test_all_vars.invoke(test.clj:705)
at clojure.test$test_ns.invoke(test.clj:728)
at clojure.core$map$fn__3840.invoke(core.clj:2433)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
at clojure.lang.LazySeq.seq(LazySeq.java:60)
at clojure.lang.Cons.next(Cons.java:39)
at clojure.lang.RT.boundedLength(RT.java:1607)
at clojure.lang.RestFn.applyTo(RestFn.java:130)
at clojure.core$apply.invoke(core.clj:602)
at clojure.test$run_tests.doInvoke(test.clj:743)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at user$eval488$fn__491.invoke(run-test8724407867004279179.clj:9)
at user$eval488.invoke(run-test8724407867004279179.clj:7)
at clojure.lang.Compiler.eval(Compiler.java:6406)
at clojure.lang.Compiler.load(Compiler.java:6843)
at clojure.lang.Compiler.loadFile(Compiler.java:6804)
at clojure.main$load_script.invoke(main.clj:282)
at clojure.main$script_opt.invoke(main.clj:342)
at clojure.main$main.doInvoke(main.clj:426)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.lang.Var.invoke(Var.java:401)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.Var.applyTo(Var.java:518)
at clojure.main.main(main.java:37)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Clojure Contrib parent module ..................... SKIPPED
[INFO] def ............................................... SKIPPED
[INFO] types ............................................. SKIPPED
[INFO] generic ........................................... SKIPPED
[INFO] accumulators ...................................... SKIPPED
[INFO] agent-utils ....................................... SKIPPED
[INFO] base64 ............................................ SKIPPED
[INFO] jar ............................................... SKIPPED
[INFO] classpath ......................................... SKIPPED
[INFO] combinatorics ..................................... SKIPPED
[INFO] command-line ...................................... SKIPPED
[INFO] complex-numbers ................................... SKIPPED
[INFO] cond .............................................. SKIPPED
[INFO] seq ............................................... SKIPPED
[INFO] condition ......................................... SKIPPED
[INFO] core .............................................. SKIPPED
[INFO] graph ............................................. SKIPPED
[INFO] except ............................................ SKIPPED
[INFO] dataflow .......................................... SKIPPED
[INFO] datalog ........................................... SKIPPED
[INFO] error-kit ......................................... SKIPPED
[INFO] fcase ............................................. SKIPPED
[INFO] find-namespaces ................................... SKIPPED
[INFO] fnmap ............................................. SKIPPED
[INFO] prxml ............................................. SKIPPED
[INFO] gen-html-docs ..................................... SKIPPED
[INFO] greatest-least .................................... SKIPPED
[INFO] import-static ..................................... SKIPPED
[INFO] java-utils ........................................ SKIPPED
[INFO] jmx ............................................... SKIPPED
[INFO] json .............................................. SKIPPED
[INFO] lazy-seqs ......................................... SKIPPED
[INFO] lazy-xml .......................................... SKIPPED
[INFO] logging ........................................... SKIPPED
[INFO] macro-utils ....................................... SKIPPED
[INFO] macros ............................................ SKIPPED
[INFO] map-utils ......................................... SKIPPED
[INFO] math .............................................. SKIPPED
[INFO] miglayout ......................................... SKIPPED
[INFO] mmap .............................................. SKIPPED
[INFO] ns-utils .......................................... SKIPPED
[INFO] mock .............................................. SKIPPED
[INFO] monads ............................................ SKIPPED
[INFO] monadic-io-streams ................................ SKIPPED
[INFO] priority-map ...................................... SKIPPED
[INFO] stream-utils ...................................... SKIPPED
[INFO] probabilities ..................................... SKIPPED
[INFO] profile ........................................... SKIPPED
[INFO] reflect ........................................... SKIPPED
[INFO] repl-ln ........................................... SKIPPED
[INFO] repl-utils ........................................ SKIPPED
[INFO] server-socket ..................................... SKIPPED
[INFO] set ............................................... SKIPPED
[INFO] singleton ......................................... SKIPPED
[INFO] sql ............................................... SKIPPED
[INFO] with-ns ........................................... SKIPPED
[INFO] strint ............................................ SKIPPED
[INFO] swing-utils ....................................... SKIPPED
[INFO] trace ............................................. SKIPPED
[INFO] zip-filter ........................................ SKIPPED
[INFO] complete .......................................... SKIPPED
[INFO] standalone ........................................ SKIPPED
[INFO] Clojure Contrib ................................... FAILURE [2:34.296s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:35.348s
[INFO] Finished at: Wed Jun 01 21:48:18 EDT 2011
[INFO] Final Memory: 10M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.theoryinpractise:clojure-maven-plugin:1.3.3:test (test-clojure) on project logging: Clojure failed. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :logging






[CONTRIB-113] There needs to be a way to collect regular arguments in tools.cli Created: 18/Jul/11  Updated: 18/Jul/11

Status: Open
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Major
Reporter: Anthony Simpson Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

In clojure.contrib.command-line, you could specify a 'catch-all' argument at the end of your spec and all arguments after the ones that were parsed would be collected in. In tools.cli, nothing like this seems to exist.

For example, with tools.cli, there is no way to handle stuff like this: "myapp --foo bar --baz foo a b c". The last three arguments, a, b, and c will all be discarded with no way to retrieve them.

Finally, if this wasn't the right place to put this issue, I apologize. tools.cli doesn't seem to be listed as a project and you guys don't accept issues on Github, so I wasn't sure what else to do.






[CONTRIB-117] POM file for math.combinatorics Created: 09/Sep/11  Updated: 09/Sep/11

Status: Open
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Major
Reporter: Michael Nygard Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Attachments: XML File pom.xml    
Patch: Code

 Description   

I noticed that math.combinatorics isn't being built or released yet. Here is the pom file needed to get it into CI builds.






[CONTRIB-102] clojure.contrib.core/-?> (and perhaps others?) have a quoting bug Created: 07/Dec/10  Updated: 26/Jul/13

Status: Open
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Jason Wolfe Assignee: Laurent Petit
Resolution: Unresolved Votes: 0
Labels: None
Environment:

1.2 and 1.3


Attachments: File fix-CONTRIB-102.diff     File patch.diff    
Patch: Code

 Description   

See:

https://groups.google.com/group/clojure/browse_frm/thread/cc88ca26352bc604?hl=en#

When called via a namespace-qualified symbol and given three or more arguments, -?> gives the error:

user=> (clojure.contrib.core/-?> 1 inc inc)
CompilerException java.lang.Exception: Unable to resolve symbol: -?>
in this context, compiling:(NO_SOURCE_PATH:3)



 Comments   
Comment by Alan Malloy [ 07/Dec/10 11:27 PM ]

Root cause is in clojure.contrib.core/defnilsafe, so similar functions like .?. will have the same problem. I futzed around for a while to try and figure it out, but defnilsafe is a little too meta for me. The problem is, predictably enough once you've glanced at the code, with ~'~nil-safe-name.

The general solution ought to look like
(let [qname (symbol (name (ns-name *ns*)) (str nil-safe-name))]
`(existing body...
(more stuff using ~qname instead of ~'~nil-safe-name...)))

But I couldn't make it quite work.

Comment by Laurent Petit [ 08/Dec/10 2:14 AM ]

Patch added.

Simple patch where I specifically use fully qualified names when calling defnilsafe.

Comment by Alan Malloy [ 09/Jan/11 4:23 AM ]

What about this patch instead? It makes sure to resolve the symbols supplied to defnilsafe while still within the c.c.core namespace.

I also made the arglists a bit less ugly.





[CONTRIB-83] clojure.contrib.shell broken with clojure commit 37d8f7a Created: 12/May/10  Updated: 08/Jan/11

Status: Open
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Assembla Importer Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

clojure.core/byte was modified a couple weeks ago as follows:

(defn byte
"Coerce to byte"
{:tag Byte
:inline (fn [x] `(. clojure.lang.RT (byteCast ~x)))}

  • [^Number x] (. x (byteValue)))
    + [^Number x] (clojure.lang.RT/byteCast x))

byteValue and byteCast behave differently with values outside the
range of byte values:
user=> (. 255 (byteValue))
-1
user=> (clojure.lang.RT/byteCast 255)
java.lang.IllegalArgumentException: Value out of range for byte: 255
(NO_SOURCE_FILE:0)

The new version breaks clojure.contrib.shell/sh's :out :bytes mode (mapping byte over values returned by InputStream.read in shell.clj, line 125).
Perhaps have sh use #(.byteValue %) instead of byte? (untested)



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

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

Comment by Allen Rohner [ 08/Jan/11 1:58 PM ]

I've tested that using #(.byteValue %) rather than byte? fixes the problem.





[CONTRIB-108] c.c.pprint pprint-logical-block macro using private var Created: 05/May/11  Updated: 05/May/11

Status: Open
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Nevena Vidojevic Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None


 Description   

pprint-logical-block macro can't be used from the outside:
java.lang.IllegalStateException: var: clojure.contrib.pprint/current-level is not public






[CONTRIB-103] type hinting for clojure.contrib.condition Created: 22/Nov/10  Updated: 27/Dec/10

Status: Open
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Trivial
Reporter: Ben Mabey Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Attachments: Text File 0001-adds-type-hinting-to-Condition.patch    
Patch: Code
Approval: Vetted

 Description   

I ran into the situation where reflection in clojure.contrib.condition was taking up much more time than I would have liked it too. I added the needed type hints to avoid reflection and the changes have solved the problem for me.

I've attached the patch. It is also available on github if you prefer:

https://github.com/bmabey/clojure-contrib/commit/acf0017e4b8c4259a03fba03a90050b0e9cb0890






Generated at Sun Nov 23 21:05:40 CST 2014 using JIRA 4.4#649-r158309.