Tuesday, October 04, 2011

Funky Cygwin Path Issues

In getting familiar with Stuart Sierra's lovely Clojure test library Lazytest, I ran into a problem running it from the windows command console. The test output had special control codes not properly processed by the console:
E:\development\clojure\calibration>java -cp src;test;lib/*;lib/dev/* lazytest.watch src test

======================================================================
At  #<Date Tue Oct 04 07:45:47 CDT 2011>
Reloading calibration.test.core, calibration.core

←[33mNamespaces (no cases run)←[0m

←[33mRan 0 test cases.←[0m
←[32m0 failures.←[0m

Done.
I use mintty for cygwin, which will process those codes correctly, but I then had trouble with the Java classpath:

yawmark$ java -cp "src:test:lib/*:lib/dev/*" lazytest.watch src test
java.lang.NoClassDefFoundError: lazytest/watch
Caused by: java.lang.ClassNotFoundException: lazytest.watch
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: lazytest.watch.  Program will exit.
Exception in thread "main" [~]

After a little online research, I found that I needed to decorate the classpath a bit:
java -cp `cygpath --path --windows "src:test:lib/*:lib/dev/*"` lazytest.watch src test
After that, all is once again right with the world.

Monday, June 06, 2011

Made it to Times Square. S'pose I can make it anywhere now.
Off to Manhattan.

Friday, February 18, 2011

"They didn't care that they'd seen it work in practice because they already knew that it wouldn't work in theory." -- Clay Shirky

Friday, January 07, 2011

SVN Commits To GoogleCode results in 405 error

I received an unexpected error when committing to GoogleCode that looked like this:

svn: Commit failed (details follow):
svn: Server sent unexpected return value (405 Method Not Allowed) in response to MKCOL request for '....'

ServerFault had the answer. Google code allows anonymous checkout with HTTP, but commits require HTTPS. So, I exported my local workspace changes, blew away the workspace, checked out again with HTTPS, and imported my changes. No commit problems after that, and thank goodness once again for the amount of readily-available information on the Internet.