Re: Why did this compile? It's an obvious syntax mistake

2018-12-26 Thread Mark Nutter
My guess would be that it failed to compile, and the weird behavior is that
it swallowed the "Failed" message somehow. That would be consistent with
the behavior you saw (couldn't call your start fn).

On Wed, Dec 26, 2018 at 11:59 AM  wrote:

> I'm wondering why this compiled?
>
> I was supposed to add this to my requirements:
>
> [environ.core :refer [env]]
>
> Instead I added this:
>
> [environ.core :refer [env]
>
> I rebuilt this, and it compiled. Then, in the cider REPL, I tried to call
> my "start" function. I was told it didn't exist, which was a big surprise,
> since I was looking right at it.
>
> It took me a few minutes to track down the problem. The problem was the
> missing "]". Okay, easy to fix, but why did it compile?
>
>
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why did this compile? It's an obvious syntax mistake

2018-12-26 Thread Andy Fingerhut
If you can provide the entire file that compiled with the mistake in it,
that might help provide valuable context, especially if someone else can
reproduce it locally.

>From what you have described, if the only difference between two files is
that one has a ] and the other has that one character deleted, and it isn't
commented out or inside of a string, I can think of no way that both of
those files have correctly balanced square brackets, and thus one or the
other seems like it should give an error when trying to compile.

Do you have something in your development environment that might be
automatically balancing expressions for you?

Andy

On Wed, Dec 26, 2018 at 8:59 AM  wrote:

> I'm wondering why this compiled?
>
> I was supposed to add this to my requirements:
>
> [environ.core :refer [env]]
>
> Instead I added this:
>
> [environ.core :refer [env]
>
> I rebuilt this, and it compiled. Then, in the cider REPL, I tried to call
> my "start" function. I was told it didn't exist, which was a big surprise,
> since I was looking right at it.
>
> It took me a few minutes to track down the problem. The problem was the
> missing "]". Okay, easy to fix, but why did it compile?
>
>
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Why did this compile? It's an obvious syntax mistake

2018-12-26 Thread lawrence . krubner
I'm wondering why this compiled? 

I was supposed to add this to my requirements:

[environ.core :refer [env]]

Instead I added this:

[environ.core :refer [env]
   
I rebuilt this, and it compiled. Then, in the cider REPL, I tried to call 
my "start" function. I was told it didn't exist, which was a big surprise, 
since I was looking right at it. 

It took me a few minutes to track down the problem. The problem was the 
missing "]". Okay, easy to fix, but why did it compile? 



-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Exception: clojure.lang.ExceptionInfo thrown from the UncaughtExceptionHandler in thread "main"

2018-12-26 Thread lawrence . krubner
I did not touch the  ~/.lein/profiles.clj file. 

I got things to work by removing everything related to Timbre. I would 
guess that I had some kind of naming class between Timbre and 
clojure.tools.logging. I decided to just use clojure.tools.logging, and 
that seems to have fixed the problem. 


On Monday, December 24, 2018 at 12:41:21 PM UTC-5, Sean Corfield wrote:
>
> Did you change your ~/.lein/profiles.clj file? That’s the most common 
> cause of mysterious startup failures with Leiningen it seems. Try 
> removing/renaming that file and see if your problems go away.
>
>  
>
> If you have more of the stacktrace to share (via pastebin or a gist etc), 
> that might help folks offer suggestions.
>
>  
>
> Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
>  
> --
> *From:* clo...@googlegroups.com   > on behalf of lawrence...@gmail.com  <
> lawrence...@gmail.com >
> *Sent:* Monday, December 24, 2018 8:39:11 AM
> *To:* Clojure
> *Subject:* Exception: clojure.lang.ExceptionInfo thrown from the 
> UncaughtExceptionHandler in thread "main" 
>  
> I'm not sure what I did, but suddenly I'm getting this:
>
> Exception: clojure.lang.ExceptionInfo thrown from the 
> UncaughtExceptionHandler in thread "main"
>
> Exception: clojure.lang.ExceptionInfo thrown from the 
> UncaughtExceptionHandler in thread "Thread-0"
>
> I had been using println to do some debugging, but then I added :
>
>  [com.taoensso/timbre "4.10.0"]
>
> I think that is the last think I did. Then I did: 
>
> lein uberjar
>
> And then I tried to run that from the command line. 
>
> I've added a bunch of logging to try to get a stacktrace, but none of this 
> is working so far: 
>
> (defn -main [& args]
>
>   (slingshot/try+
>
>;; 2017-10-04 -- see this:
>;; 
> https://stackoverflow.com/questions/28908835/ssl-peer-shut-down-incorrectly-in-java
>(System/setProperty "https.protocols" "TLSv1.1")
>
>(.addShutdownHook (Runtime/getRuntime)
>  (Thread.
>   #(do (error "addShutdownHook triggered. This app is 
> shutting down.")
>(stop
>
>;; 2017-07-12 -- stealing code from here:
>;; https://stuartsierra.com/2015/05/27/clojure-uncaught-exceptions
>;; Assuming require [clojure.tools.logging :as log]
>(Thread/setDefaultUncaughtExceptionHandler
> (reify Thread$UncaughtExceptionHandler
>   (uncaughtException [_ thread ex]
> (log "the app has died ")
> (log ex)
> (log "Uncaught background exception on thread " (.getName thread) 
> " Caught by Thread/setDefaultUncaughtExceptionHandler in core/main.")
> (System/exit 1
>
>(slingshot/try+
> (start)
> (catch Exception e
>   (stack/parse-exception e)
>   (log (str e))
>   (log "the app has died!")
>   (System/exit 1))
> (catch Throwable t
>   (log t)
>   (log "the app has died!")
>   (System/exit 1))
> (catch Object o
>   (log o)
>   (log "the app has died!")
>   (System/exit 1)
>
>
> And yet all I get is:
>
> Exception: clojure.lang.ExceptionInfo thrown from the 
> UncaughtExceptionHandler in thread "main"
>
> Exception: clojure.lang.ExceptionInfo thrown from the 
> UncaughtExceptionHandler in thread "Thread-0"
>
> Somehow the other lines that I try to print never get called. Nor my call 
> to my log function which should give me a stacktrace. 
>
> What is the obvious thing to do here?
>
>
>
>
>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@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 unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+u...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more option