Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
Clojure Design
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
Colour
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Undo
Redo
Keyboard Shortcuts Help
<h1>Rationale</h1><p>Much useful information is contained in Clojure's analysis compilation phase. There should be an interface to collect this information a la carte, in a nice form (ie. a map).</p><h1>Steps</h1><ul style="list-style-type: square;"><li>build an interface to the current Compiler<ul style="list-style-type: square;"><li>takes Form, results in Map</li></ul></li><li>test the things we can do with this information, is it useful?</li><li>request to add some information to the compiler to provide missing information</li><li>iterate until useful</li></ul><h1>Progress</h1><p>Building interface: <a href="https://github.com/frenchy64/analyze/blob/master/src/analyze/core.clj">https://github.com/frenchy64/analyze/blob/master/src/analyze/core.clj</a></p><h1>Issues</h1><h2>Redefinition of Classes at Compile time</h2><p>Running `clojure.core` through the analyzer attempts to redefine functions at (what seems to be) macroexpand time.</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>CompilerException java.lang.LinkageError: loader (instance of clojure/lang/DynamicClassLoader): attempted duplicate class definition for name: "clojure/core$booleans", compiling:(REPL:4) clojure.lang.Compiler.analyzeSeq (Compiler.java:6416) clojure.lang.Compiler.analyze (Compiler.java:6216) clojure.lang.Compiler.analyzeSeq (Compiler.java:6397) clojure.lang.Compiler.analyze (Compiler.java:6216) clojure.lang.Compiler.analyze (Compiler.java:6177) clojure.lang.Compiler$InvokeExpr.parse (Compiler.java:3503) clojure.lang.Compiler.analyzeSeq (Compiler.java:6411) clojure.lang.Compiler.analyze (Compiler.java:6216) clojure.lang.Compiler.analyze (Compiler.java:6177) clojure.lang.Compiler$BodyExpr$Parser.parse (Compiler.java:5572) clojure.lang.Compiler.analyzeSeq (Compiler.java:6409) clojure.lang.Compiler.analyze (Compiler.java:6216) Caused by: LinkageError loader (instance of clojure/lang/DynamicClassLoader): attempted duplicate class definition for name: "clojure/core$booleans" java.lang.ClassLoader.defineClass1 (ClassLoader.java:-2) java.lang.ClassLoader.defineClassCond (ClassLoader.java:631) java.lang.ClassLoader.defineClass (ClassLoader.java:615) java.lang.ClassLoader.defineClass (ClassLoader.java:465) clojure.lang.DynamicClassLoader.defineClass (DynamicClassLoader.java:46) clojure.lang.Compiler$ObjExpr.getCompiledClass (Compiler.java:4533) clojure.lang.Compiler$FnExpr.parse (Compiler.java:3697) clojure.lang.Compiler.analyzeSeq (Compiler.java:6407) clojure.lang.Compiler.analyze (Compiler.java:6216) </pre></td></tr></table><p>Offending line in `clojure.core`:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>(definline booleans "Casts to boolean[]" {:added "1.1"} [xs] `(. clojure.lang.Numbers booleans ~xs))</pre></td></tr></table><p>I don't have a good idea how to fix this. Maybe a flag that indicates to catch a redefinition error, and then lookup the class in the cache?</p>
Attachments
Labels
Location
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced