<< Back to previous view

[JDBC-88] Update :arglists metadata so it no longer confuses Eastwood Created: 13/Jan/14  Updated: 01/Jun/16  Resolved: 26/Aug/15

Status: Closed
Project: java.jdbc
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Sean Corfield Assignee: Sean Corfield
Resolution: Declined Votes: 0
Labels: None


:arglists metadata should be valid Clojure syntax. Examples should be moved into docstrings.

Comment by Andy Fingerhut [ 13/Jan/14 4:02 PM ]

Eastwood's use of :arglists for :wrong-arity linter checking is definitely 'at odds' with the way java.jdbc and some other libraries use it for clearer documentation.

I would recommend leaving :arglists as-is for java.jdbc, and wait for the next version of Eastwood to add a capability to have something like an :eastwood-arglists for functions that explicitly replace their :arglists like this. Such a capability might best belong in Eastwood itself, since it is the new tool on the block.

As an example, I was considering that if a fn/macro explicitly chose to be Eastwood-friendly in this way, it could have an :arglists and :eastwood-arglists explicitly, for those few vars that replace their :arglists. When one is using Eastwood with a library that they do not want to modify in that way, there could be some extra config file for Eastwood where one could specify these :eastwood-arglists.

Sound reasonable?

Comment by Sean Corfield [ 28/Oct/14 6:47 PM ]

Given Andy's comment back in January, lowering priority to Minor.

Comment by Sean Corfield [ 16/Jan/15 1:14 PM ]

Eastwood has recently added the ability to provide configuration to override specific function :arglists and out of the box comes with java.jdbc config to override the problematic functions: https://github.com/jonase/eastwood/blob/master/resource/eastwood/config/clojure-contrib.clj#L38-64

That means, as far as Eastwood is concerned, this is a non-issue, but it would be nice to fix those functions' metadata anyway.

Comment by Sean Corfield [ 26/Aug/15 10:31 PM ]

Given the approach taken by Eastwood and the complexity of some of java.jdbc's argument lists, I have decided to leave the metadata as-is since it helps with CIDER and other tools enough to warrant the not-quite-valid structure.

Generated at Sat Sep 23 09:49:30 CDT 2017 using JIRA 4.4#649-r158309.