Re: Compiling gen-class runs static initializers: workarounds, solutions?

2017-03-28 Thread Colin Fleming
Ah yes, I remember this now. It seems like this is a fix that would definitely help, too, since many (most?) people using serious interop will be type hinting. On 28 March 2017 at 23:15, Adam Clements wrote: > Potentially relevant? I posted a patch two years ago for some static > initialisers st

Re: Compiling gen-class runs static initializers: workarounds, solutions?

2017-03-28 Thread Gregg Reynolds
give clojurians a try on slack. monitoring that and this list i get the impression that helpful people do not necessarily work both fora. On Mar 27, 2017 11:00 AM, "lonign via Clojure" wrote: > Hi Gregg, > > I've have tried them, but have not been able to get anything that will > compile, let a

Re: Compiling gen-class runs static initializers: workarounds, solutions?

2017-03-28 Thread Didier
In my experience, there's definitly still issues with static initializers, even in 1.8. I'd recommend you go mixed Java for those use case. -- 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

Re: Compiling gen-class runs static initializers: workarounds, solutions?

2017-03-28 Thread lonign via Clojure
Hi Gunnar, Yes, I use this trick to get tests to run without starting up an application. That is a run-time issue. The problem I'm having is a compile-time issue. That is, errors are thrown when the compiler hits a gen-class or proxy used to try to extend (some) JavaFX classes. -- You receiv

Re: Compiling gen-class runs static initializers: workarounds, solutions?

2017-03-28 Thread Adam Clements
Potentially relevant? I posted a patch two years ago for some static initialisers still running in 1.8, not yet merged. It was actually the type hints causing the initialisers to be run at compile time http://dev.clojure.org/jira/browse/CLJ-1714 On Tue, Mar 28, 2017 at 10:21 AM 'Gunnar Völkel' vi

Re: Compiling gen-class runs static initializers: workarounds, solutions?

2017-03-28 Thread 'Gunnar Völkel' via Clojure
The JavaFX workaround consist of creating a javafx.embed.swing.JFXPanel statically in a namespace that is loaded before any other namespace that import problematic JavaFX classes as in [1,2]. This initializes the JavaFX platform. [1] https://github.com/halgari/fn-fx/blob/master/src/fn_fx/render

Re: Compiling gen-class runs static initializers: workarounds, solutions?

2017-03-27 Thread lonign via Clojure
Hi Colin, I had read through this, but I'm using 1.8 and the problem still exists for me. -- 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 Note that posts from new members are moderated -

Re: Compiling gen-class runs static initializers: workarounds, solutions?

2017-03-27 Thread lonign via Clojure
Did not see this. Will investigate and see if it helps. BTW, noticed in one of your comments on http://dev.clojure.org/jira/browse/CLJ-1315 that you directly

Re: Compiling gen-class runs static initializers: workarounds, solutions?

2017-03-27 Thread lonign via Clojure
Hi Gregg, I've have tried them, but have not been able to get anything that will compile, let alone run. On Sunday, March 26, 2017 at 5:15:52 PM UTC-4, Gregg Reynolds wrote: > > > > On Jan 2, 2015 12:36 PM, "David James" > > wrote: > > I have a problem when compiling while using gen-class with

Re: Compiling gen-class runs static initializers: workarounds, solutions?

2017-03-26 Thread Colin Fleming
I believe this is fixed in Clojure 1.7, see http://dev.clojure.org/jira/browse/CLJ-1315 for lots of detail. On 27 March 2017 at 08:51, lonign via Clojure wrote: > Hi David, > > It's been a long time, but have you found a solution to this problem? I > came across a StackOverflow question about a

Re: Compiling gen-class runs static initializers: workarounds, solutions?

2017-03-26 Thread Gregg Reynolds
On Mar 26, 2017 4:15 PM, "Gregg Reynolds" wrote: On Jan 2, 2015 12:36 PM, "David James" wrote: I have a problem when compiling while using gen-class with static initializers. I use gen-class to extend a JavaFX 8 class, javafx.scene.control.Control. During compilation, a static initializer is

Re: Compiling gen-class runs static initializers: workarounds, solutions?

2017-03-26 Thread Gregg Reynolds
On Jan 2, 2015 12:36 PM, "David James" wrote: I have a problem when compiling while using gen-class with static initializers. I use gen-class to extend a JavaFX 8 class, javafx.scene.control.Control. During compilation, a static initializer is run, raising an exception saying that the JavaFX tool

Re: Compiling gen-class runs static initializers: workarounds, solutions?

2017-03-26 Thread lonign via Clojure
Hi David, It's been a long time, but have you found a solution to this problem? I came across a StackOverflow question about a similar problem: Clojure can't import JavaFX classes with static initializers

Compiling gen-class runs static initializers: workarounds, solutions?

2015-01-02 Thread David James
I have a problem when compiling while using gen-class with static initializers. I use gen-class to extend a JavaFX 8 class, javafx.scene.control.Control. During compilation, a static initializer is run, raising an exception saying that the JavaFX toolkit has not been initialized. I'm going t