Fork me on GitHub
#biff
<
2023-09-24
>
chromalchemy15:09:29

I am getter regular errors in the log files on droplet. (errors in reply). Not seeing anythings like that in bb logs local dev. I did set up papertrail (for system level) and DO Uptime alert. Not seeing anything there.

chromalchemy15:09:24

2023/09/24 05:42:59 [crit] 765#765: *11775 stat() "/home/app/target/resources/public/" failed (13: Permission denied), client: 167.71.182.33, server: , request: "GET / HTTP/1.1", host: ""

2023/09/24 05:42:59 [crit] 765#765: *11775 stat() "/home/app/target/resources/public//index.html" failed (13: Permission denied), client: 167.71.182.33, server: , request: "GET / HTTP/1.1", host: ""

2023/09/24 05:42:59 [crit] 765#765: *11775 stat() "/home/app/resources/public/" failed (13: Permission denied), client: 167.71.182.33, server: , request: "GET / HTTP/1.1", host: ""

2023/09/24 05:42:59 [crit] 765#765: *11775 stat() "/home/app/resources/public//index.html" failed (13: Permission denied), client: 167.71.182.33, server: , request: "GET / HTTP/1.1", host: ""
2023/09/24 05:42:59 [error] 765#765: *11775 connect() failed (111: Unknown error) while connecting to upstream, client: 167.71.182.33, server: , request: "GET / HTTP/1.1", upstream: "http://[::1]:8080/", host: ""

Jacob O'Bryant15:09:11

that's weird. what does ssh ls -l target/resources/public give you?

Jacob O'Bryant15:09:14

is it possible that you somehow started the app as root on the server? E.g. if you ssh'd in as root and ran bb dev or something while you were on the server?

Jacob O'Bryant15:09:47

ssh ls -l would also be useful to see. are you on the latest biff version? I think this may be rsync-related. bb deploy I think is preserving the file permissions from your local machine, and in your case maybe that's causing problems. E.g. if the user number for your local account is different from the Ubuntu default of 1000 maybe? if that's the problem then I probably need to get rid of the --archive flag that I'm passing to rsync and replace it with a few more specific flags.

chromalchemy15:09:35

ssh ls -l target/resources/public gives

total 4
drwxr-xr-x 2 app app 4096 Sep 12 22:26 css

chromalchemy15:09:12

$ ls -l
total 336
-rw-r--r-- 1 app app    136 Sep  9 20:34  README.md
-rw-r--r-- 1 app app   1192 Aug  8  2022 'Website GroundedSol'
drwxr-xr-x 6 app app   4096 Sep 12 22:01  bb
-rw-r--r-- 1 app app 170398 Sep 20 18:59 'bb deploy log.txt'
-rw-r--r-- 1 app app   1728 Sep 12 22:42  bb.edn
-rw-r--r-- 1 app app     25 Sep  9 20:34  cljfmt-indents.edn
-rw-r--r-- 1 app app     76 Jul  6  2021  commands.txt
-rw------- 1 app app   2795 Sep 20 19:30  config.edn
-rw-r--r-- 1 app app   2120 Sep 20 20:18  deps.edn
drwxrwxr-x 2 app app   4096 Sep 12  2022  notebooks
-rw-r--r-- 1 app app    282 Jul  4  2021  package-lock.json
drwxrwxr-x 7 app app   4096 Sep 20 17:02  repo.git
drwxr-xr-x 4 app app   4096 Sep 19 14:28  resources
-rw-r--r-- 1 app app   3139 Sep 20 16:40  
drwxr-xr-x 2 app app   4096 Sep  5  2022  scripts
-rw------- 1 app app    185 Sep  9 20:34  secrets.env
-rw-r--r-- 1 app app  86634 Sep 20 18:57  server-setup-output.txt
-rw-r--r-- 1 app app   3139 Sep  9 20:34  server-setup.sh
drwxr-xr-x 3 app app   4096 Sep 14 23:07  src
drwxr-xr-x 3 app app   4096 Sep 20 17:17  storage
drwxr-xr-x 3 app app   4096 Sep 12 22:26  target
drwxr-xr-x 3 app app   4096 May 31  2022  test

chromalchemy15:09:09

I don’t believe I ever logged in as app@groundedsol before. Maybe I missed a beat in tutorial.

Jacob O'Bryant15:09:27

hm, well so much for that hypothesis. that all looks correct

chromalchemy15:09:34

I did log in initally with doctl, but it didn’t have the copy file command referenced in tutorial

chromalchemy15:09:05

every minute there’s a set of errors like that.

Jacob O'Bryant15:09:12

no need to log in as the app user; I think the only time the tutorial has you log in is as root so you can run the server setup script

chromalchemy15:09:22

I have live.js for local, but it’s under a flag, and not showing up in prod html

Jacob O'Bryant15:09:03

hm, and going to the website in my browser, it seems to work fine I see

Jacob O'Bryant15:09:26

are you able to trigger these error messages?

Jacob O'Bryant15:09:06

and the error output is from bb logs ? I'm surprised there's not a stack trace. or are these the nginx logs?

Jacob O'Bryant15:09:16

actually if this is just from the nginx error logs or something else other than bb logs and you're not seeing any broken behavior in your app, it might not be anything to worry about... on every request, biff checks to see if there's a static file that can be served, and only if one isn't found does it send the request to your reitit handlers. so it's normal whenever someone goes to your website for biff to check for files in the locations that are mentioned in those error messages (E.g. /home/app/target/resources/public/index.html) and not find anything there. and maybe those attempted file accesses are just getting logged somewhere

chromalchemy15:09:56

No bb-logs are clean. And yes the site seems to be loading fine from my local testing

Sep 24 15:44:57 groundedsol sh[7899]: [qtp1268830482-87] INFO com.biffweb.impl.middleware -   0ms 200 get  /js/accordionscript.js
Sep 24 15:44:57 groundedsol sh[7899]: [qtp1268830482-91] INFO com.biffweb.impl.middleware -   0ms 200 get  /js/old_main.js
Sep 24 15:44:57 groundedsol sh[7899]: [qtp1268830482-102] INFO com.biffweb.impl.middleware -   5ms 404 get  /js/main.js
Sep 24 15:44:57 groundedsol sh[7899]: [qtp1268830482-90] INFO com.biffweb.impl.middleware -   0ms 200 get  /js/calendar02.js
Sep 24 15:44:57 groundedsol sh[7899]: [qtp1268830482-93] INFO com.biffweb.impl.middleware -   0ms 200 get  /img/logo200.png
Sep 24 15:44:57 groundedsol sh[7899]: [qtp1268830482-98] INFO com.biffweb.impl.middleware -   0ms 200 get  /img/final-designs/design-1-vert.png
Sep 24 15:44:57 groundedsol sh[7899]: [qtp1268830482-95] INFO com.biffweb.impl.middleware -   0ms 200 get  /img/social-icons/instagram-icon.png
Sep 24 15:44:57 groundedsol sh[7899]: [qtp1268830482-99] INFO com.biffweb.impl.middleware -   1ms 200 get  /img/social-icons/youtube-icon.png
Sep 24 15:44:57 groundedsol sh[7899]: [qtp1268830482-102] INFO com.biffweb.impl.middleware -   0ms 200 get  /img/hand-drawn-designs/hand-sketch.jpg
Sep 24 15:44:57 groundedsol sh[7899]: [qtp1268830482-95] INFO com.biffweb.impl.middleware -   0ms 200 get  /img/horizontalrule.png
Sep 24 15:44:57 groundedsol sh[7899]: [qtp1268830482-87] INFO com.biffweb.impl.middleware -   0ms 200 get  /img/social-icons/facebook-icon.png
Sep 24 15:44:57 groundedsol sh[7899]: [qtp1268830482-93] INFO com.biffweb.impl.middleware -   3ms 404 get  /samples/monarchegg.jpg
Sep 24 15:44:57 groundedsol sh[7899]: [qtp1268830482-99] INFO com.biffweb.impl.middleware -   0ms 200 get  /img/social-icons/small/youtube-icon.png
Sep 24 15:44:57 groundedsol sh[7899]: [qtp1268830482-98] INFO com.biffweb.impl.middleware -   0ms 200 get  /img/social-icons/small/instagram-icon.png
Sep 24 15:44:57 groundedsol sh[7899]: [qtp1268830482-91] INFO com.biffweb.impl.middleware -   0ms 200 get  /img/social-icons/small/facebook-icon.png
Sep 24 15:44:58 groundedsol sh[7899]: [qtp1268830482-97] INFO com.biffweb.impl.middleware -   0ms 200 get  /favicon-32x32.png
Sep 24 15:44:58 groundedsol sh[7899]: [qtp1268830482-91] INFO com.biffweb.impl.middleware -   0ms 200 get  /site.webmanifest
Sep 24 15:44:59 groundedsol sh[7899]: [qtp1268830482-95] INFO com.biffweb.impl.middleware -   7ms 200 get  /
Sep 24 15:45:59 groundedsol sh[7899]: [qtp1268830482-90] INFO com.biffweb.impl.middleware -   5ms 200 get  /
Sep 24 15:46:59 groundedsol sh[7899]: [qtp1268830482-97] INFO com.biffweb.impl.middleware -   5ms 200 get  /
Sep 24 15:47:59 groundedsol sh[7899]: [qtp1268830482-91] INFO com.biffweb.impl.middleware -   5ms 200 get  /
Sep 24 15:48:11 groundedsol sh[7899]: [qtp1268830482-102] INFO com.biffweb.impl.middleware -   0ms 200 get  /img/logo400.png
Sep 24 15:48:59 groundedsol sh[7899]: [qtp1268830482-97] INFO com.biffweb.impl.middleware -   6ms 200 get  /
Sep 24 15:49:56 groundedsol sh[7899]: [qtp1268830482-95] INFO com.biffweb.impl.middleware -   2ms 404 get  /js/main.js
Sep 24 15:49:59 groundedsol sh[7899]: [qtp1268830482-87] INFO com.biffweb.impl.middleware -   6ms 200 get  /
Sep 24 15:50:59 groundedsol sh[7899]: [qtp1268830482-97] INFO com.biffweb.impl.middleware -   5ms 200 get  /
Sep 24 15:51:59 groundedsol sh[7899]: [qtp1268830482-102] INFO com.biffweb.impl.middleware -   7ms 200 get  /
Sep 24 15:52:59 groundedsol sh[7899]: [qtp1268830482-91] INFO com.biffweb.impl.middleware -   5ms 200 get  /

chromalchemy15:09:38

Those errors are from /var/logs/nginx/error.log

Jacob O'Bryant15:09:22

OK, gotcha. I wouldn't worry about it then. I'll have to see if I have the same errors in my nginx logs.

chromalchemy16:09:57

Ok, thanks. I got a user report of some kind of “site not accessible” error the other day. That’s why I was digging into the logging stuff. But I havn’t been able to replicate.

Jacob O'Bryant16:09:08

hm interesting. do you know what time it was? you could look into the regular nginx access logs. you can also go further back in bb logs; not sure how long those are retained

chromalchemy16:09:04

How do you go further back in to bb logs?

chromalchemy16:09:53

It was from day and 1/2 ago. I have not located that exact log window yet. Just got into the lates ones it and saw the stream of errors.

Jacob O'Bryant16:09:17

an easy way is E.g. bb logs 3000 which will show the last 3000 lines (default is 300)

Jacob O'Bryant16:09:17

this is the underlying command: https://github.com/jacobobryant/biff/blob/b730c8524fa113832865b6f41312dd87a514465f/tasks/src/com/biffweb/tasks.clj#L390 you can ssh into the server and do man journalctl probably for more options

chromalchemy16:09:46

I am doing something a bit funky with my routes. I was trying to add coverage for my previous routes from my ssg build.

{:routes
     (vec
       (concat
         [["" {:middleware [mid/wrap-redirect-signed-in]}
           ["/"                  {:get gs.pages.index/home-page}]]
          ["/link-sent"          {:get link-sent}]
          ["/verify-link"        {:get verify-email-page}]
          ["/signin"             {:get signin-page}]
          ["/signup"             {:get signup-page}]
          ["/verify-code"        {:get enter-code-page}]
          #_["/consultationanddesign"        {:get gs.pages.consultation/page}]
          ]
         (->>
           {:notes gs.pages.notes/page-hiccup
            :florida-plants gs.pages.fl-plants/page-hiccup
            :services gs.pages.services/page-hiccup
            :consultation gs.pages.consultation/page-hiccup
            :contact gs.pages.contact/page-hiccup
            :about gs.pages.about/page-hiccup}
           (mapv
             (fn [[page-key page-hiccup]]
               (let [rout-base-str (str "/" ( page-key))
                     route-fn
                     (fn [{:keys [recaptcha/site-key params] :as ctx}]
                       (ui/page
                         (assoc ctx ::ui/recaptcha false)
                         page-hiccup))]
                 [[(str rout-base-str ".html") {:get route-fn}]
                  [rout-base-str {:get route-fn}]])))
           (apply concat))))}

-->

{:routes
 [[""
   {:middleware [#function[gs.groundedsol.middleware/wrap-redirect-signed-in]]}
   ["/" {:get #function[gs.pages.index/home-page]}]]
  ["/link-sent" {:get #function[gs.groundedsol.home/link-sent]}]
  ["/verify-link" {:get #function[gs.groundedsol.home/verify-email-page]}]
  ["/signin" {:get #function[gs.groundedsol.home/signin-page]}]
  ["/signup" {:get #function[gs.groundedsol.home/signup-page]}]
  ["/verify-code" {:get #function[gs.groundedsol.home/enter-code-page]}]
  ["/notes.html" {:get #function[gs.groundedsol.home/fn--43815/route-fn--43820]}]
  ["/notes" {:get #function[gs.groundedsol.home/fn--43815/route-fn--43820]}]
  ["/floridaplants.html" {:get #function[gs.groundedsol.home/fn--43815/route-fn--43820]}]
  ["/floridaplants" {:get #function[gs.groundedsol.home/fn--43815/route-fn--43820]}]
  ["/services.html" {:get #function[gs.groundedsol.home/fn--43815/route-fn--43820]}]
  ["/services" {:get #function[gs.groundedsol.home/fn--43815/route-fn--43820]}]
  ["/consultationanddesign.html" {:get #function[gs.groundedsol.home/fn--43815/route-fn--43820]}]
  ["/consultationanddesign" {:get #function[gs.groundedsol.home/fn--43815/route-fn--43820]}]
  ["/contact.html" {:get #function[gs.groundedsol.home/fn--43815/route-fn--43820]}]
  ["/contact" {:get #function[gs.groundedsol.home/fn--43815/route-fn--43820]}]
  ["/about.html" {:get #function[gs.groundedsol.home/fn--43815/route-fn--43820]}]
  ["/about" {:get #function[gs.groundedsol.home/fn--43815/route-fn--43820]}]]}

chromalchemy16:09:21

I realized now I can just add a new route kv like /myroute/ in addition to default /myroute , and that will have the .html appended..

👍 1
chromalchemy19:09:26

@foo Thanks for helping me orient to the logging situation!

chromalchemy19:09:23

This is more a general devops question… I pointed my domain host to DO nameservers, and have traffic DNS records on DO like so…

chromalchemy19:09:36

Then I noticed the email mailbox (on previous lamp host) wasn’t working. So I added a email reccords to DO DNS records… I am now able to revieve with the MX record. I was not able to send to a gmail address, so I added the the SPF record, and am waiting to propagate to test that. Maybe I need DKIM records too? I noticed that my previous (and current email) host has a bunch of DNS records. Am I correct in assuming that those currently have no effect, since the nameservers are pointing to DO. Should I be migrating all of those older DNS records to DO DNS records? Or is this overcomplicating things?

Nundrum20:09:55

From my experience, GMail will want the DKIM record to be correct.

1
chromalchemy01:09:46

Ps. @foo confirmed I needed to migrate my previous DNS records to Digital Ocean DNS config email seems to be working now! I am able to send an email to a gmail account. This is personal email and not bulk delivery though. Haven’t tested much yet. I will still try to do the DKIM

Jacob O'Bryant02:09:08

awesome, glad it's working

Jacob O'Bryant02:09:38

for bulk delivery I would recommend going through an ESP like postmark or mailgun

chromalchemy18:10:06

Yes will do postmark for offical app emails. This was just for a personal mailbox that was on the domain.

👍 1
chromalchemy19:09:02

I still want to integrate the Postmark email service for transactional emails, and will likely have to configure records for that too. But this is just generic config for my website, hosted on DO droplet, and personal email mailbox server on different lamp host, that the domain is registered with.

Jacob O'Bryant20:09:33

yes, all the old dns records no longer take effect, and yes, I would migrate all of them over as-is. no need to fiddle with stuff that was already working. that should make stuff work exactly the same as it was before, and then you can always do more fiddling going forward.

Jacob O'Bryant20:09:13

you can double check current records with E.g. dig MX by the way

chromalchemy21:09:00

Ok, thanks. My registart points nameservers to Digital ocean, and the base record on DO are these? https://clojurians.slack.com/files/U09D96P9B/F05U27JKXLZ/image.png I am assuming this is a default congig, and prefereable to having an A record on the registar DNS records.

Jacob O'Bryant21:09:14

yeah, if the registrar sets the NS records to digitalocean , then the A record (and all other records) have to be set in digitalocean

chromalchemy21:09:54

ok thanks, im a bit out of my element w server config

chromalchemy21:09:54

> I would migrate all of them over as-is Even the A records?

chromalchemy21:09:01

Ok but would some of the IP addresses need to point to the DO droplet? Obviously the NS records would not be carried over from that as is.

Jacob O'Bryant21:09:59

any new records you've set up on digitalocean, E.g. A records for droplets, you wouldn't want to overwrite. I'm just saying that in general, when you point a domain at a new DNS provider, it's safe/recommended to migrate all the DNS records as well. you may need to do additional configuring, but migrating the records will at least give you the same DNS setup that you had before pointing the domain at digitolocean

Jacob O'Bryant22:09:46

happy to help figure out any additional configuration you may need to do, though I'd need some more context

chromalchemy22:09:39

Ok thanks again for the confidence!

🙌 1
sergey.shvets21:09:09

I can't see the link to Playtub in the post and I haven't seen before!

sergey.shvets21:09:27

I'd say that for your initial target audience, that will be a better setup. And if you ever want to go mainstream, you can probably just host some docker container running everything in it for the customer on something like Cloud Run. Or go through the hassle of supporting web-first version later.

👍 1
Jacob O'Bryant21:09:56

yeah, I think if/when I/someone wants to do a web version, probably will be best to do a web version from scratch

chromalchemy01:09:58

I like the direction. I feel like “closer to the metal” is fertile ground for power user custom crowd. A more open surface area for integrations. And potentially more able to leverage Command line apps, babashka universe, native UI toolkits, and open source apps with exising UI’s, seamlelssy, for rich, low-latency REPL-like experiences across all the levels of publishing workflow. I love the stuff @U7RJTCH6J is doing in this space. Tapping into powerful native api’s as needed to do custom tooling hard to concieve on the web. Nothing wrong with using the web stack locally too..(better sharability)

👍 1
Jacob O'Bryant02:09:38

just looked at the membrane readme--looks pretty interesting! I hadn't seen it before. it's basically a generic reactive ui thing that you can use with different concrete ui implementations if I'm understanding right? mostly I just want something that works with babashka/graalvm so the app can have fast startup time and doesn't need the jvm to be installed. though the fact that I'm already familiar with web ui is also a bonus 🙂. and platypub doesn't need a complex ui anyway.

Jacob O'Bryant02:09:19

someone mentioned Portal here: https://clojureverse.org/t/fastest-start-up-time-for-windows-gui-application-in-clojure/10153 which now that I think about it, it does spawn a web ui in a standalone window that doesn't include the address bar. so that seems like a pretty good approach

Jacob O'Bryant02:09:39

htmx also would work pretty well since there's near zero latency for requests

Luciano Laratelli21:09:41

Is there a good way to debug only response middleware? I https://github.com/metosin/reitit/blob/master/doc/ring/transforming_middleware_chain.md#printing-request-diffs metosin’s print-request-diffs but it’s throwing an exception unrelated to my code (and besides I think it’s only for request middleware, right?)

Jacob O'Bryant21:09:57

as of a week or two ago, new projects come with a simple wrap-debug middleware that you can stick before/after the middleware you want to debug: https://github.com/jacobobryant/biff/blob/b730c8524fa113832865b6f41312dd87a514465f/example/src/com/example/middleware.clj#L23 if you only need to see responses, you can comment out the bit that prints the requests

gratitude-thank-you 2
Jacob O'Bryant21:09:52

I haven't seen the metosin middleware before, but I'm guessing it's basically a fancier version of what wrap-debug is doing

Luciano Laratelli21:09:30

oh, that’s great! Thanks Jacob 🙂

👌 1
sergey.shvets21:09:29

@foo have you ever thought about how others can extend biff's functionality? E.g. I'm working to do a simple username/password auth plugin, and I'm sure plenty of folks will need the same. (Or maybe someone already did it, and I don't know about it).

Jacob O'Bryant21:09:51

yep--you can write your own plugins and/or components and share them as regular libs, which can then be used by anyone. for a password-based auth plugin, you could copy and paste biff's auth plugin as a starting point and then make whatever changes you need. I bet there are others who would be interested in password auth

sergey.shvets21:09:22

Yeah, I know it's very straightforward to implement. I'm just curious if we should have a "centralized" way of keeping track of those plugins? It can make biff more accessible and have more folks adopting it.

Jacob O'Bryant21:09:34

I'd definitely put it in the docs on http://biffweb.com somewhere--maybe a "community" section. I'm just waiting for people to publish libs/blog posts/apps so I can list them 😉

sergey.shvets21:09:26

Ok, I'll share the password auth plugin for review once completed 🙂

🎅 1
🙏 1
sergey.shvets23:09:42

is biff/submit-tx supposed to wait for a transaction to finish? I have this seemingly simple code, but it always returns nil (even when it is supposed to throw), though the document is created okay.

Jacob O'Bryant23:09:40

it's because you're setting :biff.xtdb/retry false -- biff only waits for the transaction to finish if that isn't set.

sergey.shvets23:09:07

oh, ok, that explains why it was working yesterday 🙂 is :biff/db in ctx has a snapshot of database before edit and I still need this to get the state after edit? (xt/db (:biff.xtdb/node ctx))

sergey.shvets23:09:39

Doesn't seem to work without extracting the new db from node.

sergey.shvets23:09:20

Removing retry works. Thank you very much!

🙌 1
Jacob O'Bryant23:09:59

> is :biff/db in ctx has a snapshot of database before edit and I still need this to get the state after edit? (xt/db (:biff.xtdb/node ctx)) yep, that's correct

sergey.shvets04:09:21

Implemented the first pass, but there is so much coupling with the form that is rendered by the other plugin... Will need to come up with some ideas on how to make it more universal. Plus things like forgot password....

Jacob O'Bryant05:09:30

the forgot password flow is a big part of why I just went with email-based auth--you have to do it anyway for resetting passwords, so I just did that part first and then never finished the rest 😉

sergey.shvets18:09:15

This actually talks about the same problem: https://github.com/donut-party/service. How to build a plugin for auth without making assumptions about schema and working around the htmx's kinks where you have to report errors with either redirect or with 200 and HTML that renders error state 🙂

sergey.shvets18:09:00

In biff's case it's easier since we already have all required dependencies in place.

Jacob O'Bryant20:09:33

That's an approach for separating the core logic away from UI/DB specifics, though the specifics do still have to be implemented somewhere of course. I'd be open to separating the default auth plugin's core logic out somewhere, but would be best to start from a few concrete plugin implementations. I'd be wary of premature abstraction/if separating the logic out would actually bring enough reuse benefits to be worth the added indirection. My initial feeling is basically "keep it simple, and if you really need something more complex you should probably be using auth0 or similar anyway"

👍 1
Jacob O'Bryant20:09:14

philosophy o' biff: "how I learned to stop worrying and love copy-and-paste" 😉

👍 2
ianjones21:09:45

+1 for copy-paste-driven-development lol

ianjones21:09:56

in tandem with “optimize for deletion”

🙌 1
vonadz07:09:19

@foo might be worth standardizing a plugin naming convention, like biff-plugin-hello-world (each one should start with biff-plugin). Directus (https://github.com/directus/directus) does this with directus-extension and it makes finding extensions on github substantially easier (https://github.com/search?utf8=%E2%9C%93&amp;q=directus+extension&amp;type=repositories). Just food for thought.

👍 1
Chip22:09:08

@foo, any thoughts on which distribution of JDK 21 (or if 21), using Clojure 1.12 Alpha 4 under Biff 0.7.15 in production?

Jacob O'Bryant22:09:31

no clue, I think I'm still on Java 11

Jacob O'Bryant22:09:05

I would just go with the latest LTS release, 17 I think?

Jacob O'Bryant23:09:23

oh, I see 21 is an lts release haha. either way I have no opinions on which distribution to use

gratitude-thank-you 1
Martynas Maciulevičius10:09:24

I think you could use the "least powerful" (least features) version until you'll have a reason not to. For instance some stability improvement or a bug.

gratitude-thank-you 1
m.q.warnock15:09:59

Interesting; why such an old one, Jacob? And why so conservative Martynas? Performance has generally improved with each release (jit optimizations and smoother garbage collection). I'm on 17 because I'm using libpython-clj, which requires an older memory model, but if I weren't I'd at least have tried the latest.

Martynas Maciulevičius15:09:23

> jit optimizations and smoother garbage collection This would be a good reason to take the new version. > And why so conservative Martynas Because there are multiple JDK vendors and older version means that there would be flexibility to hop onto another vendor if the current version doesn't work anymore. i.e. OpenMPI allows to run Java6 bytecode. So it's easier to compile stuff into JDK6 from Java11 than to come back from the JDK21. This is another way to see flexibility. Also AdoptOpenJDK may not implement JDK21 for a short while and when they do then you could use them. So if you stay with older version (clojure doesn't care that much) then you can think more about where you want to deploy if the vendors didn't yet implement everything. Everything is a tradeoff

m.q.warnock15:09:16

ah- good answer 🙂

Jacob O'Bryant15:09:25

> why such an old one > I just haven't gotten around to upgrading 🤷

👍 1