Fork me on GitHub
#babashka
<
2023-01-21
>
borkdude13:01:40

I'm (finally) considering removing the default printing behavior from babashka when not invoking -e , so when invoking a main method, or -x function, etc there will be nothing printed even if the last value isn't nil. Reason being that such functions sometimes print a report to the console and having the result printed to stdout messes with the result. I noticed that with the carve! example above. Having the final result printed can be avoided by returning nil but it's not what people are used to from Clojure. I will keep the printing behavior when people provide bb --prn -x ... , so the explicit --prn argument. This will be a slightly breaking change (sad), but if printing was that important, I think you should have used explicit prn or println . I've logged this as issue https://github.com/babashka/babashka/issues/1467 - feel free to comment there if you have thoughts.

14
👍 6
4
pesterhazy08:01:25

Good choice, makes bb more accessible to newcomers. I hope this doesn't break too many existing consumers (I know I never relied in implicit printing)

borkdude17:01:52

The first breaking change with the new print behavior. https://clojurians.slack.com/archives/C099W16KZ/p1674493822604489

pesterhazy18:01:23

Sucks. Interface design is hard

pesterhazy18:01:46

Nice that you had some forward compatibility (--prn was a no-op before)

pesterhazy18:01:50

I guess that's a hickeyan principle as well - prefer open systems (open maps)

pesterhazy18:01:11

Or maybe Postel's law

borkdude19:01:56

Indeed, open command line args saved the day here

geraldodev15:01:36

Invoker of MyBatis migrations a file based native sql migrator from old glorious java time that really works. No ORM, just your jdbc driver which the script downloads and your awesome sql commands https://gist.github.com/geraldodev/f4cc25376331ebd37d2eb8a4d3ccf8a9

👍 2
borkdude20:01:25

https://github.com/weavejester/eftest already runs with the --dev-build installable via:

bash <(curl ) --dev-build --dir /tmp