ClojureScript

clj->js trims the namespace prefix from keywords while writing them to string

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:

Description

The following behavior was observed and confirmed from the code:

(clj->js :ns/n) => "n"

I believe this is a limitation and the namespace of the keyword should be kept while writing it to string.
The code in core.js does this while handling keywords:

(keyword? x) (name x)

while it should do this (or something similar):

(keyword? x) (str (namespace x) "/" (name x))

Activity

Niklas Närhinen made changes -
Field Original Value New Value
Attachment 0001-CLJS-536-Add-support-for-namespaced-keywords.patch [ 12417 ]
Niklas Närhinen made changes -
David Nolen made changes -
Resolution Declined [ 2 ]
Status Open [ 1 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

  • Assignee:
    Unassigned
    Reporter:
    Vasile
Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: