tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
alexmiller 2020-12-02T03:01:36.123500Z

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

alexmiller 2020-12-02T03:02:35.124300Z

brew update
brew cleanup clojure
brew uninstall -f clojure
brew install clojure/tools/clojure

alexmiller 2020-12-02T03:02:38.124500Z

something like that

alexmiller 2020-12-02T03:05:15.125Z

ah, I had to brew untap clojure/tools before it worked

alexmiller 2020-12-02T03:05:38.125500Z

they've got new shallow clone logic and I think it's just not finding new stuff because I had previously installed latest there

seancorfield 2020-12-02T03:38:24.126100Z

It worked fine for me, using brew on Ubuntu, but (as usual) I had to manually run brew link --overwrite clojure afterwards.

seancorfield 2020-12-02T03:38:54.126600Z

Now I have 1.10.1.739 installed as the stable version @alexmiller

alexmiller 2020-12-02T04:16:52.126800Z

thx

alexmiller 2020-12-02T04:17:18.127100Z

I assume if you brew -v you have 2.6.x ?

seancorfield 2020-12-02T04:30:11.127300Z

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$

seancorfield 2020-12-02T04:30:35.127800Z

(Ubuntu/WSL2 on Windows 10 -- I can try this on my Mac tomorrow)

seancorfield 2020-12-02T18:36:30.129100Z

@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

seancorfield 2020-12-02T18:37:12.129300Z

The install step worked fine (aside from the link).

alexmiller 2020-12-02T18:53:20.129500Z

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 :)

alexmiller 2020-12-02T04:33:30.128100Z

cool, thx

alexmiller 2020-12-02T04:33:47.128500Z

just trying to get ahead of any possible breakage

flowthing 2020-12-02T05:47:10.128700Z

Worked OK for me, FWIW.

socksy 2020-12-02T20:26:07.134400Z

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 true

seancorfield 2020-12-02T20:30:11.137100Z

For 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")

👍 2
nate 2020-12-03T16:18:59.153700Z

This is amazing. Thanks for sharing. There's a lot too look at and learn from.

seancorfield 2020-12-03T17:03:28.156400Z

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!

borkdude 2020-12-02T20:46:56.138100Z

@socksy that's just bash running in two different processes trying to create the file at the roughly the same time I think.

borkdude 2020-12-02T20:47:15.138400Z

oh that was your point, sorry

socksy 2020-12-02T20:49:44.140600Z

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 :)