Hi,

Make sure none of your serial I/O calls are executing while compiling...
If you have anything like global defs that indirectly try to do an I/O
it will get executed as part of the AOT.

I have been playing with AOT a lot in the last two months and got trapped
a couple of time with this. Your code works well when loaded dynamically,
most of your environment setups being ready, after all you expect to run
your app. Then you try to package it and lein stalls...

I got trapped with Spring the first time, it  was trying to load its context at
compile time and connect to a database. Bad idea :)))

Luc P.

Mike Meyer <mwm-keyword-googlegroups.620...@mired.org> wrote ..
> I'm working on a clojure web app that manipulates the serial
> port. Well, uses it, anyway. The basic structure is to create a map
> from web-visible names to devices accessible via the serial ports. The
> problem is that Clojure and the serial port drivers don't seem to get
> along very well.
> 
> I'm using the RXTX package (with class names in the gnu.io. hierarchy).
> 
> If I open the serial port as part of building up my maps, everything
> works fine in testing, but trying to compile the uberwar hangs.
> 
> If I wrap the port opening and connection calls in a delay and then
> force them when I actually need to use it, the first call fails to do
> anything - seems like the .open returns before the port is actually
> ready.
> 
> Similarly, if I restructure things to open the port before use and
> close it afterward, nothing ever happens at all. It's been a while
> since I tried this, and I thought at the time the problem was that I
> was closing the port to soon; but looking at it now I see that the
> open may be failing.
> 
> When I try running multiple actions through the port in a loop, only
> the first one actually happens.
> 
> Yes, I realize only the first of these is really related to Clojure
> per se, but figured I'd put them all out on the chance that anyone who
> could help with the first one is probably familiar enough with the
> RXTX or serial port IO in Java to help with all of them.
> 
>      Thanks,
>      <mike
> -- 
> Mike Meyer <m...@mired.org>           http://www.mired.org/consulting.html
> Independent Network/Unix/Perforce consultant, email for more information.
> 
> O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
> 
> -- 
> 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 - please be patient with your 
> first
> post.
> 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

-- 
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 - please be patient with your 
first post.
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