core.typed

:arglists metadata is missing from vars defined using core.typed's defn macro

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code

Description

Minimal example:

(clojure.core/defn f [])
(meta #'f)
;; => {:arglists ([]), ...}

(clojure.core.typed/defn g [])
(meta #'g)
;; => :arglists key missing completely

This is problematic, because g's arguments won't show up in its documentation via e.g. clojure.repl/doc
and I think lots of other tools assume that :arglists is there.

I've attached a patch that should fix this (and have also just signed Clojure's CA).

Activity

Hide
Ambrose Bonnaire-Sergeant added a comment -

Is your name on this list? http://clojure.org/contributing

Show
Ambrose Bonnaire-Sergeant added a comment - Is your name on this list? http://clojure.org/contributing
Hide
Ambrose Bonnaire-Sergeant added a comment -

Oh I see you just signed it. Let me know when your name pops up and I'll merge this. Thanks!

Show
Ambrose Bonnaire-Sergeant added a comment - Oh I see you just signed it. Let me know when your name pops up and I'll merge this. Thanks!
Hide
Ambrose Bonnaire-Sergeant added a comment -

I get some errors in the unit tests. Can you run `mvn test` and fix them please?

Show
Ambrose Bonnaire-Sergeant added a comment - I get some errors in the unit tests. Can you run `mvn test` and fix them please?
Hide
Tobias Kortkamp added a comment -

Found the problem and attached a new patch.
The tests pass now..

Show
Tobias Kortkamp added a comment - Found the problem and attached a new patch. The tests pass now..
Hide
Tobias Kortkamp added a comment -

I've attached an updated version of the patch that additionally adds attr-map support to defn. The tests still pass and it looks like my name appears on the contributors list now.

Show
Tobias Kortkamp added a comment - I've attached an updated version of the patch that additionally adds attr-map support to defn. The tests still pass and it looks like my name appears on the contributors list now.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: