Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser chokes on ^:private #49

Closed
bendlas opened this issue Jul 20, 2011 · 3 comments
Closed

Parser chokes on ^:private #49

bendlas opened this issue Jul 20, 2011 · 3 comments
Assignees
Milestone

Comments

@bendlas
Copy link

bendlas commented Jul 20, 2011

When generating the uberdoc for the following test case

(ns test-marg.core)

(defn ^:private private-fn "private docstring" [])

(defn public-fn "docstring" []
  (let [x (private-fn)]
    (count x)))

I get a

java.lang.RuntimeException: java.lang.IllegalArgumentException: Unable to resolve classname: :private

Even though the doc gets generated, the docstring for the public-fn is not shifted to the left.

The above snipped seems to be the minimal form to get that error, every one of:

  • changing ^:private to ^{:private true}
  • removing the let
  • changing count

makes it go away.

@bendlas
Copy link
Author

bendlas commented Jul 20, 2011

Tested with lein-marginalia 0.6.0

@bendlas
Copy link
Author

bendlas commented Jul 28, 2011

Sorry, that's because clojure 1.2 transforms ^:private to {:tag :private}
I've tested it on a 1.3 project, but marginalia is used as a leiningen plugin, hence runs on 1.2

Should marginalia generate the doc in an (eval-in-project ..)?

@ghost ghost assigned fogus Mar 6, 2012
@fogus
Copy link
Collaborator

fogus commented Mar 6, 2012

Fixed in 0.7.0-SNAPSHOT

@fogus fogus closed this as completed Mar 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants