With the regex factored out into its own def, it can be overcome in
~/.lein/init.clj:
(require 'leiningen.new)
(alter-var-root #'leiningen.new/project-name-blacklist (constantly #"^$"))
This requires heinous hackery! It appears the only way to get out of
clojure.main/repl is by sending an EOF character, but there doesn't
seem to be a way to do that over sockets; you can only close
sockets. Reading from a closed socket results in an exception, so we
rebind clojure.main/skip-whitespace, which is where the reading
happens, to a function that fakes an EOF if it sees an IOException.
We also have to pass in a custom :caught function to suppress
SocketExceptions since the clojure.main/repl will continue to attempt
to perform I/O on the socket even once we are done with it.
Still need to suppress exception output from clojure.main. Hard to
debug since we are turning off *err* on purpose and the problem
doesn't occur when we leave *err* alone.
The symlink task appears to have moved to ant-nodeps in ant 1.7.1,
which means that :jar-strategy :symlink is currently broken. Add
ant-nodeps as a dependency to get this working again.
Custom {source,compile,resource}-paths in a checkout project would not
be absolute, which meant checkout projects would not be on the
classpath as expected.
Fix this by ensuring that paths extracted from checkout dependencies
are always absolute.
There were three related problems:
1) The first argument was always parsed with read-string, even
when defaulting to the :main namespace. This caused
non-numeric first arguments to throw:
Exception in thread "main" java.lang.Exception: Unable to
resolve symbol: foo in this context
Avoid read-string entirely and update the unit tests to use an
unreadable string instead of a number to make the problem obvious.
This problem was reported by Marek Kubica on the Clojure
mailing list.
2) When using an alias the alias keyword was passed to -main as the
first argument. This is inconsistent with how the -m and :main
simply pass the program arguments, not the namespace or -m flag.
3) There was no way to pass "-m" or a string beginning with ":"
as a first argument to the run program. Added "--" as an option
to escape these.