Hello!

Since I'm new to this group, let me say that
recently I got interested in clojure, coming from
Mozart/Oz, Common Lisp, and scheme.
And I like it. A lot, in fact.:)

Now... does anyone know whether ProGuard works
with clojure? (I'm using proguard4.4beta2 with
clojure 1.0.0.RC1.)

In the following simple example:

===== public.clj:
(ns public
  (:use magic))

(defn main []
  (println (magic/get-the-answer)))

===== magic.clj:
(ns magic)

(defn get-the-answer []
  42)
=====

which compiles to four .class files:
  magic$get_the_answer__4.class
  magic__init.class
  public$main__7.class
  public__init.class

I'd like to keep public/main, but have
magic/get-the-answer renamed.

If I try to specify that e.g. with
  -keep class public__init {<methods>;}
  -keep class public$main__7 {<methods>;}
then for some reason the magic-related
classes are thrown away by ProGuard.

If I prevent this with
  -dontshrink
then clojure complains about (load "public")
with an ExceptionInInitializerError  [Thrown class
clojure.lang.Compiler$CompilerException],
whereas (load "public") works fine on the
original .class files.

Am I missing something?  Or is this a problem
in ProGuard or in clojure?  Is there a workaround?

Cheers,
Andreas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to