Good morning!
Morning
Good morning! After a sunny weekend in Berlin we are back in Dauergrau territory ☁️
Good Morning!
is anyone else confused about the breaking changes in Clojure CLI around the -M
alias?
@plexus There have been discussions about this in #tools-deps.
Are you confused about why they made a breaking change or about the change itself?
Bore da :welsh_flag:
Morning
@plexus yeah seems pointless to change letters. I had a look on the #tools-deps channel but parsing Slack for meaning is pointless
pointless good morning
but I guess everything is alpha now, so it’s permitted under Rich law
The clojure CLI was never marked alpha anywhere. The library it is using under hood, tools.deps.alpha, is.
is there a write up somewhere that explains all of the changes?
the most important change: aliases are only used to change the classpath, to invoke clojure.main you have to explicitly use -M
so if you wrote clojure -A:test before,
to run tests, this should now become clojure -M:test
note that the -M option was already there the whole time, they just enforced this more
given that this conversation will go away next week … a link would be nice if you have one
my understanding is that you should also do group/dep
for maven assets now too
which is a different part of the tooling but still it’s linked
https://github.com/clojure/brew-install/blob/1.10.1/CHANGELOG.md
true. the latest clj-kondo will help you with that part btw
morning
right, but now someone in #kaocha wants to have the dependencies from their :server
alias, but not the :main-opts
, so I thought then you just use -A
, but then you get a warning that you're not supposed to do that
and that confuses me, I thought you could use -A
to get the dependencies but not the main opts from an alias
so yes I'm confused both about the fact that they are making breaking changes. I thought we had collectively been indoctrinated into not doing that. I'm also confused about the change itself, and the point thereof...
but I'll wait until someone does a write-up of the discussion in #tools-deps 😊
@plexus The change can be annoying in situations like that
If you ask about the reasons behind this, then you hear "we are trying to free up arg space for other things"
And this is why you don't start with single letter command line flags when designing a CLI interface :)
@plexus Am I wrong, or does tools.cli enforce this?
Not that the Clojure CLI is using this
This change is creating confusion for Calva users. And it's also not super easy to fix it. It will be one more thing for the users to be aware of and take action on...
tools.cli does not enforce this, you can have long options only if you want. Kaocha mostly has long options, just a few one letter options for common things
@plexus Then I have misunderstood tools.cli. How can you have options without short options?
Just put a nil in the first spot
https://github.com/lambdaisland/kaocha/blob/master/src/kaocha/runner.clj#L33-L62
Thanks, TIL
I am reaching a point where I am thinking that giant "state" datastructure I am juggling with everywhere should maybe be better as a datascript db
@mpenet in a browser app?
no
it's one of the rare cases where it would actually be handy in process, the thing I am messing with is growing and growning and we query it in various ways (and that's growing too)
doesn't warrant a real db tho, we're still in tiny-data scope
Seems sensible.
I think many people would gain from seeing DataScript not as an in-memory db, but really as a rich immutable data structure
indeed
That said, be aware that the current Datalog engine has a slow startup time.
I'm actually considering to start work on AOT compilation of Datalog queries
It's a pity to have eliminated network calls, and to still have a 100µs "startup time" on your query engine, even for very dumb queries.
(you might already know this stuff of course)
good to know, but it's a case where we can cache heavily if needed I think
but the domain is tricky, state can change outside of our control/visibility
Isn't that last problem orthogonal to choosing the supporting data structure?
yes, I meant about the caching bit, might not be reliable to cache in that case.
This warning will go away
It's to help people who are doing the wrong thing transition