[TCLI-36] Add compilation of spec vector to summarize Created: 22/Oct/15 Updated: 23/Oct/15
|Reporter:||Tim Richardt||Assignee:||Sean Corfield|
The compilation of the spec vectors to the spec map is missing in summarize. This leads to a fail of the destructuring of specs make-summary-parts.
|Comment by Sean Corfield [ 22/Oct/15 11:13 AM ]|
Thank you for catching that Tim!
As it stands, I can't accept the patch until you've signed a Contributor's Agreement and you're listed on http://clojure.org/contributing (you can read about becoming a contributor on that page), but this is a small, self-contained fix so I'll try to create a test case for it and then I'll fix it.
|Comment by Sean Corfield [ 22/Oct/15 11:27 AM ]|
I looked at the tests and summarize expects to be called with a "compiled" set of specs. If you look at parse-opts, you'll see the :summary value it passes back is the result of calling either summarize or the user-supplied summary-fn on (compile-option-specs option-specs).
I'll update the summarize docstring to make that clear.
|Comment by Sean Corfield [ 22/Oct/15 11:38 AM ]|
That essentially makes summarize uncallable (unless you reach in and use #'clojure.tools.cli/compile-option-specs) so I'll have to review the documentation and see what to do about summarize.
|Comment by Tim Richardt [ 23/Oct/15 4:31 AM ]|
Thank you for the quick response and sorry for inaccurate patch. I was too rash commiting it.