Fork me on GitHub
#clj-commons
<
2021-09-21
>
borkdude08:09:01

This PR has been open for almost a month: https://github.com/clj-commons/ordered/pull/59 What can we do to speed up merging if the PR is considered OK? I don't think outside contributors will find clj-commons attractive to contribute if PRs are left hanging, that's what I'm slightly worried about.

borkdude08:09:47

Full disclosure: I would like to see ordered well maintained since clj-yaml uses it and via that library ordered is used in #babashka, this is my personal interest. If I can do anything to help, let me know. /cc @plexus

slipset08:09:01

I added you as a reviewer @borkdude

slipset08:09:22

And I totally agree, we shouldn’t let them hang.

borkdude08:09:33

approved PR

slipset09:09:38

I should probs make this auto-deployable as well.

borkdude09:09:39

That would be nice. I see its still using the flatland org, is that right?

slipset09:09:14

gah! That makes it harder to make it auto-deployable 😕

slipset09:09:52

(and if we were to change, we’d need to change it to io.github.clj-commons because of the clojars restriction 😕

borkdude09:09:22

I'd be fine with that (or the com.github.clj-commons one, I don't understand the choice for io.*)

borkdude09:09:32

we could just normalize every library to do this

slipset09:09:25

No conscious choice on my side, I only remembered the io.github thing.

borkdude09:09:43

yeah, not important I guess

slipset09:09:57

gah, tests are failing.

borkdude09:09:45

that's interesting

borkdude09:09:11

it seems those tests were failing for a while already

slipset09:09:30

Yes, which is even more annoying.

borkdude09:09:02

Do they run locally?

borkdude09:09:21

I'll try it as well

borkdude09:09:42

at least lein test works

borkdude09:09:14

I can reproduce the error with lein with-profile +1.6 test

borkdude09:09:57

probably this should be with-profiles plural

borkdude09:09:53

it seems the tests work from Clojure 1.8 onwards

borkdude09:09:05

let's just drop support for older Clojure versions. people should just upgrade ;)

slipset09:09:27

seems like some other discussion I’ve seen lately…

borkdude09:09:37

you mean in rewrite-clj?

borkdude09:09:31

I don't think it's unreasonable to only go back one or two major versions. People can still use the old one.

borkdude09:09:46

You shouldn't have to backport every damn single predicate in core ;)

borkdude09:09:43

Also, nudging people to upgrade Clojure for newer features in libraries isn't a bad thing either I think

slipset09:09:37

I believe there is a PR for this now.

slipset09:09:05

And I believe it was approved 🙂

borkdude09:09:21

@slipset ah it seems the circleci config still has lein with-profile +1.7 test etc

slipset09:09:51

D’oh, so Circle wasn’t running testall 😕

slipset09:09:48

New commit 😕

plexus09:09:43

thanks for the merge @borkdude!

🎉 2
slipset09:09:34

and @plexus for actually doing the work 🙂

2
2
lread12:09:45

Heya, about rewrite-clj v1 and supporting old Clojure versions. Supporting back to v1.8 seems reasonable, yeah?

borkdude12:09:00

if you ask me 1.9 is already reasonable enough, especially now that it's hosted under a different org which means people have to upgrade to a "different" lib anyway

borkdude12:09:14

but I'm not against it

borkdude12:09:14

just note that maintaining support for older clojure versions comes with ... more maintenance

borkdude12:09:45

and upgrading clojure... is that really such a big deal? it's a poster child of stability

Alex Miller (Clojure team)12:09:47

state of clojure data is useful for making decisions like this https://www.surveymonkey.com/results/SM-S2L8NR6K9/ Q18 shows 1.3% using Clojure 1.7.x or earlier and Clojure 1.8 use 6.4% (this is a multi-select question).

borkdude12:09:58

1.10.x
94.02%2,203

1.9.0
11.65%273

1.8.0
6.36%149

1.7.0 or earlier
1.28%
Right.

borkdude13:09:57

@alexmiller Perhaps an interesting question for the survey: what's preventing you from upgrading to the latest (except for intertia)

Alex Miller (Clojure team)13:09:39

I think the answer is probably: nothing - they are supporting older for backwards compatibility. given how quickly people move to new versions, this is probably not an interesting enough question to include

👍 2
lread13:09:44

And maybe people who don't bother to upgrade to new versions of Clojure also don't bother to answer Clojure surveys.

Alex Miller (Clojure team)13:09:19

but they do bother to update misc libs?

borkdude13:09:21

btw isn't this a chicken/egg problem? people are using 1.8 because they want to support it, and we are looking at how many people are still using 1.8?

lread14:09:30

Ha! The people using 1.8 are using it only to offer support for 1.8? Twisted! I like it!

lread21:09:12

Thanks, I’m interested in the answer to that too!

lread13:09:19

Thanks guys, that helps very much. I support back to 1.9 now but had some very strong interest from a user of rewrite-clj to support older versions. I agreed to back as far as 1.8.

👍 2
lread13:09:48

I'll add this data to the issue! Muchos gracias for the chat.

slipset14:09:13

FYI that one user is quite heavily invested in tooling, so I kind’a get his point. It would be a nuisance to have to upgrade your thing that’s been running for ages just because you upgraded your tooling.

borkdude14:09:08

then don't upgrade the tooling? ;)

lread14:09:37

That's a good question, if you are updating libs, why wouldn't you also update Clojure?

borkdude14:09:22

But we will have the same issue when 1.next comes out with spec2.

slipset14:09:04

I guess my use case could be that I have multiple projects that I maintain, and one of them is stuck on 1.8 for some reason (and I work on it rather seldomly), the others I keep current and my tooling as well. I’m not saying this is a very common situation, I’m just trying to find the examples.

borkdude14:09:37

this comes back to the question: is there a real situation where upgrading clojure makes your old software crash?

borkdude14:09:10

I mean, if your tooling pulls in newer clojure

slipset14:09:52

There’s another aspect to it. At work, I from time to time have to interact with the javascript frontend sources. Every time I have to do yarn install and some times I have to install a new versjon of node and a new version of yarn. All I wanted to do was to get the frontend up and running.

slipset15:09:12

The only thing I really wanted to do was yarn start

borkdude15:09:24

let's not talk about yarn or node.

borkdude15:09:42

completely different ecosystem

slipset15:09:58

Fair, but my point being that you came here to do one thing, and then suddenly, because of reasons, you have to start upgrading stuff.

borkdude15:09:05

The way I see it is that your tooling already upgraded Clojure for you (as their minimum requirement) and this should never break your old Clojure program

borkdude15:09:15

so I would like to have real scenarios, not hypothetical ones

slipset15:09:06

Then I apologise for not understanding the intricacies of tooling (which I probs should have understood)

lread15:09:44

I think an example given was some tooling brought into the same process as your app. Your app is on an old version of Clojure but some library in the tooling requires a newer version of Clojure.

borkdude15:09:14

I have encountered one such example in the past where someone tried to run clj-kondo in Light Table which for some reason was using clojure 1.8 (I hadn't looked into why it was locked on that)

borkdude15:09:48

but perhaps that's a tooling problem: you should never be locked into one version of clojure because your tooling chooses that?

borkdude15:09:34

The scenario that lread is describing should not be problematic: upgrading Clojure should "just work"

slipset15:09:49

Sounds reasonable, but I would imagine (way out of my comfort zone) that stuff like nrepl middlewares and stuff need to run the same version as your project?

borkdude15:09:16

Yes sure. But pulling in a newer Clojure should "just work" with your tooling. Why not?

lread15:09:17

An irony for me is that rewrite-clj v0 did not care nearly as much about not making breaking changes as I have for rewrite-clj v1. simple_smile

lread15:09:40

@alexmiller I had a quick look at support matrixes for Clojure core team lib builds. For example, https://build.clojure.org/job/core.cache-test-matrix/. They seem to cut off testing at Clojure v1.8, is that typically right?

Alex Miller (Clojure team)15:09:23

I have declared it to be "right" :)

simple_smile 2
Alex Miller (Clojure team)15:09:52

many libs also work with older versions, but we do not test those combos

Alex Miller (Clojure team)15:09:06

the combination of libs x clojure versions x java versions x build history defines a quantity of disk space, which is finite on the box we are on

Alex Miller (Clojure team)15:09:46

moving to a different disk is possible but is a fair amount of effort that I am trying to delay into the indefinite future

Alex Miller (Clojure team)15:09:02

Clojure 1.8 came out 5.5 years ago, seems like a reasonably old time horizon to test

lread15:09:07

If a change to a core lib was discovered to have broken compat for Clojure < v1.8, would you consider that to be a problem?

Alex Miller (Clojure team)15:09:41

I would tell you to lock to an older version of the lib if you need that

lread15:09:27

Thanks, that helps!

Alex Miller (Clojure team)15:09:51

you can "solve" this problem either by making it trivial to live in a reproducible past (see: Go) or by making it easy to move forward to the present by minimizing or eliminating breaking changes (Clojure)

👍 2
Alex Miller (Clojure team)15:09:09

if you're curious, the CI jobs are generated (by some Clojure of course) from the data here: https://github.com/clojure/build.ci/blob/master/ci_data.clj

lread15:09:45

Oh cool! Thanks!

lread15:09:19

Thanks for a very interesting and civil discussion to all! I realize folks can have strong feelings on this topic.

borkdude15:09:32

Now we're making progress, perhaps also ask Alex's opinion on making a custom *assert* :P

borkdude15:09:10

The use case: a user is concerned that his tooling users disable *assert* so the error reports are becoming less readable. To circumvent this he wants to introduce a library custom assert which his tooling always forces to true.

Alex Miller (Clojure team)15:09:15

I'm not sure why my opinion is relevant here, but assert is designed to be turned off. if you need something to always be on, it's not an assertion, it's data validation and doesn't need to be conditional.

borkdude15:09:57

@alexmiller what about clojure.spec: this is also data validation (in part) and designed to be turned off in production (in some environments)?

borkdude15:09:21

This is more like validation in development which can be turned off.

Alex Miller (Clojure team)15:09:03

spec has its own assertion system because it had constraints that could not be satisfied by the existing one (completely compiling out the spec validation)

Alex Miller (Clojure team)15:09:58

but the intent is the same - assert in dev, not in prod

👍 2
Alex Miller (Clojure team)15:09:47

what problem are you trying to solve: error reports don't have enough info alternatives: • ask users to turn on assertions when sending reports • make assertions non-conditional • add a new flag for validation and default to on • ??? brainstorm a few more minutes and you might think of some more comparison criteria: • quality of error reports • performance in prod • configuration complexity • ??? brainstorm some more to compare, make a table: put the alternatives on top, put the comparison criteria on the left. fill out the table with the best data you have, do work to fill in unknown squares color squares based on how well they satisfy the criteria are two columns mostly the same? if so, come up with new criteria to differentiate them is some column mostly green? it's probably a good answer. are the not-green cells fatal? can they be mitigated?

👍 4
borkdude15:09:07

This is helpful, I like this, although I already knew this from your ClojuTRE talk, it's good to see it again.

borkdude15:09:37

It would be cool if issue trackers supported this

Alex Miller (Clojure team)15:09:13

yeah, we've given up making the table anywhere but in a spreadsheet

borkdude15:09:05

Hammock ™️ , the JIRA / Github issues killer

borkdude15:09:11

with built-in spread-sheets

Alex Miller (Clojure team)15:09:01

^^ this is how we answer questions like this in the core team

Alex Miller (Clojure team)15:09:08

it is of course, a process with cycles. you may go back to the problem and/or alternatives and/or comparison criteria as you learn more