can anyone give me a sanity check on installing clojure with the new version of homebrew from clojure tap? it is not working for me, trying to ensure it's not just me
brew update
brew cleanup clojure
brew uninstall -f clojure
brew install clojure/tools/clojure
something like that
ah, I had to brew untap clojure/tools
before it worked
they've got new shallow clone logic and I think it's just not finding new stuff because I had previously installed latest there
It worked fine for me, using brew
on Ubuntu, but (as usual) I had to manually run brew link --overwrite clojure
afterwards.
Now I have 1.10.1.739 installed as the stable version @alexmiller
thx
I assume if you brew -v
you have 2.6.x ?
eanc@DESKTOP-30ICA76:~/oss$ brew -v
Homebrew 2.6.0
Homebrew/linuxbrew-core (git revision de4188; last commit 2020-12-01)
seanc@DESKTOP-30ICA76:~/oss$
(Ubuntu/WSL2 on Windows 10 -- I can try this on my Mac tomorrow)
@alexmiller It worked on macOS 10.12 with a couple of caveats: the uninstall step refused:
Error: Refusing to uninstall /usr/local/Cellar/clojure/1.10.1.561
because it is required by unravel, which is currently installed.
and, as on Linux, I needed to run this afterwards:
brew link --overwrite clojure
The install
step worked fine (aside from the link).
my tap was wholly borked, I had to untap before I got things working again, but I suspect the history of that on my machine was a unique journey :)
cool, thx
just trying to get ahead of any possible breakage
Worked OK for me, FWIW.
Today I discovered that clojure
is not thread safe. I'm not sure if it's attempting to be or not, but just in case it is, it's because of the following lines:
if [[ ! -e "$config_dir/deps.edn" ]]; then
cp "$install_dir/example-deps.edn" "$config_dir/deps.edn"
fi
If you run a clojure
command in two subprocesses, e.g. clojure -M:slow-process-1 & clojure -M:slow-process-2 &
on a fresh install (e.g. within a CI build image), then some of the time you'd get an error like cp: cannot create regular file '/home/circleci/.clojure/deps.edn': File exists
.
My attempt at a workaround right now is to run clojure
at least once before running the subprocesses, to ensure that -e "$config_dir/deps.edn"
will always return trueFor anyone using my dot-clojure repo, I just pushed an update that adds a :dev
alias that mimics what we have at work for starting REBL or Reveal or Rebel Readline or a plain REPL (depending on what's on your classpath) as well as a Socket REPL (saved to .socket-repl-port
so you get the same port number next time you start it in that directory); if it starts Reveal, it also adds in the auto-table-view stuff that I use at work. If adds a dev.clj
file in ~/.clojure
which is loaded via -e
using (System/getProperty "user.home")
This is amazing. Thanks for sharing. There's a lot too look at and learn from.
The code in dev.clj
could be cleaned up. It certainly needs a bit of refactoring after I added in the complexity needed to run Rebel and Reveal together!
@socksy that's just bash running in two different processes trying to create the file at the roughly the same time I think.
oh that was your point, sorry
you're right, but it hadn't even occurred to me that that would be an issue when we made this regression. We had two slow code format checking tools which we were running in a bash script in parallel to speed up CI builds, and had just switched from lein
to clojure
to run them and suddenly half our CI builds were failing. Was quite a debug :)