clojure 2026-11-07

Sorry to rant a bit: IMO it’s somewhat annoying that the big restriction of “Method code too large” doesn’t seem to be documented anywhere (for clojure) or talked about much. It’s a bummer in trying to write clojure code. I have a go loop that is 246 lines and now (after adding ~10 lines to get to that point) gives me this error. OK yes that’s pretty chunky but due to the limitations of the go macro it’s harder to extract stuff. Particularly with go block code this maybe should be mentioned somewhere because of course those 246 lines are expanded quite a bit by the macro. (I’d offer a patch but I can’t pretend to be knowledgable enough about what causes this to write docs on it.) Anyway I suppose I can spin up extra go blocks if need be in helper functions, use flow etc etc (it’s my “fault” on some level, I’m sure, I just wish I had known I was heading toward this brick wall)

It’s an annoying limitation to run into, but it is usually a signal that you’re headed in the wrong direction. I’ve had this a few times in the past with core.match. Not having this problem is almost guaranteed a better solution 😅 With a 246 line go block, “method code too large” is the least of your worries…

Alex Miller (Clojure team) 2026-11-07T16:01:54.083549Z

We have some jiras about it and there are some pretty specific causes (giant case expansions usually). In this particular case, if io-thread makes sense, that would move it into a virtual thread and probably avoid the issue

➕ 1

Sure, like I said, “(it’s my “fault” on some level, I’m sure, I just wish I had known I was heading toward this brick wall)”

Like, am I wrong to think a general purpose programming language might have a warning on it that writiung a loop greater than,s ay, 240 lines just won’t work some times? That’s all I’m saying. I’ll get to work fixing the monster go loop………..

Alex Miller (Clojure team) 2026-11-07T16:03:00.561189Z

I'd say it's really not your fault, you just happened to step on the mine this time, and we should fix the root cause

Alex Miller (Clojure team) 2026-11-07T16:03:40.072909Z

It's really probably not the go loop itself but in combination with other things

✅ 1

Sorry ya I was replying more to @christian767 but you’re both right

Thanks for the replies 🙏

Yes, I should look at io-thread! Would probably help with a lot of this.

I didn’t mean to be an asshole. But 250 lines of Clojure is a lot. And debugging go blocks is notoriously difficult, since your code gets heavily rewritten. So a 250 line go block is a nightmare waiting to happen even if you get around this particular warning. You might want to consider extracting blocks of code as helper functions etc.

I’m a bit surprised we haven’t run into this at work TBH. We have one go block that is 200 lines and a lot of 100-150 line go blocks. And that 200 line one would be extremely hard to refactor since it’s a loop with a lot of conditional >! and <! and recurs inside it 😐

OP has been assisted, but, to return to OP’s initial question, - what would be the right place or forum to arrange a note in the docs? The exception has “nothing to do with go” in a strict sense, but on the other hand, it is one of those problems that you are going to have with sufficiently enthusiastic use of go…

The official answer is always https://ask.clojure.org/

Hmm, that didn't work on my phone

Finally got around the RH talk at conj 2026 and I wanted to share my impression (in the 🧵) to see if anyone had similar thoughts, different perspectives or anything else that comes to mind. These are just first impressions, not suggestions for changes. https://m.youtube.com/watch?v=P5eO7BNyJao

loved: • The focus on keeping systems open and dynamic is fantastic. Thank you for the amount of focus that went into this. • The connector analogy is spot on. My first thought about that situation is how the problem usually gets passed downstream but it’s great to see the Clojure team say no, we will handle this here. • This new feature has a good feel to it. Can't put my finger on any specific thing but I found myself nodding along to a lot of this. • The missing keyword is great. I've written code for this hundreds of times (usually in other languages) and always felt there must be a better way. still thinking about: • My first impression, based off of using lots of let's in the past, is that the syntax feels backwards. Instead of saying here is the name of the binding and then where it comes from (like a let statement) you have to dig through the detectives to find the names. I found that this takes a lot of visual parsing to understand what's in a :select • The keywords for derectives (eg select excess or) don't feel intuitive. Or was already a bit of a stretch for providing defaults and now that it is more powerful that distance between name and functionality feels farther.

“The keywords for derectives (eg select excess or) don’t feel intuitive. Or was already a bit of a stretch” — I’ll just say that “naming is hard” and not all naming choices in Clojure satisfy everyone, but we tend to just get used to the weirder ones :) If you’re not used to (map) destructuring in general, and specifically in function arguments, and instead used to simple argument names and then pulling specific data out of those arguments in a let, then it can look like a lot of “syntax”. Previously, the only directives we had were :keys and :or, and using symbol :keyword style bindings in destructuring, but nested destructuring was already possible just perhaps not very common.

You could probe (or clarify) your ideas by making an alternative destructuring function. Clojure’s destructure function (before the embellishments) is at https://github.com/clojure/clojure/blob/clojure-1.12.6/src/clj/clojure/core.clj#L4431 And then report back :-)

I created a https://github.com/yogthos/migratus migration for a one-time update to my database. Now that it is done I don’t need that migration anymore. If I ever do a clean install, the code has changed and won’t create the situation that the one-time fix cleaned up. This isn’t really a migratus question, it’s just a general “managing migrations” question. What would you do with that now-no-longer-needed migration? I’m thinking I’ll change the function to a no-op (maybe just put an amusing log message in there for future me to smile at).

If every single deployment is up to date, I’d just remove it completely. Similar to squashing migrations - I remove them all and create a new init.sql from the current state of the DB.

➕ 2