re-frame

Idan Melamed 2023-12-21T18:06:43.580719Z

Hi, happy holidays. I'm trying to deploy a re-frame app to Netlify, but they only support https://docs.netlify.com/configure-builds/available-software-at-build-time/. Any suggestions? Where do you host your re-frame apps?

p-himik 2023-12-21T18:08:44.811649Z

Doesn't seem to be relevant to re-frame at all?

Idan Melamed 2023-12-21T18:09:30.309919Z

I'm getting

this version of the Java Runtime only recognizes class file versions up to 52.0
And there's no way to change the Java version.

p-himik 2023-12-21T18:10:18.458429Z

Right, but it's not about re-frame at all.

Idan Melamed 2023-12-21T18:10:38.620459Z

Oh, sorry.

Idan Melamed 2023-12-21T18:11:13.013059Z

Where should I take this? #shadow-cljs ?

p-himik 2023-12-21T18:13:11.168539Z

FWIW, I just build my apps locally and then deploy the resulting artifacts. > Where should I take this? #shadow-cljs ? I really doubt shadow-cljs has anything to do with it either. It looks like one of the built-time dependencies that the build process tries to load is either a Java-based JAR or an AOT'ed Clojure JAR that has been compiled with a javac version from JDK that's newer than 8.

p-himik 2023-12-21T18:15:32.577289Z

The full error text should contain the name of the class that's the issue. Seems that Google Closure Compiler requires JDK >= 11, so you're out of luck.

p-himik 2023-12-21T18:16:50.355279Z

The easiest and simplest solution is to avoid building stuff remotely altogether. I have started building locally years ago, and it's been a bliss compared to all the crap people have to deal with when building remotely on a third-party platform they have little control over, such as Heroku or Netlify.

Idan Melamed 2023-12-21T18:17:37.578539Z

Yeah, that's a good advice, thanks. Where do you host your artifacts?

p-himik 2023-12-21T18:18:06.621149Z

Depends on the project, and that doesn't really matter in this case.

Nundrum 2023-12-21T18:18:18.110739Z

Looks like there has been some talk about the Netlify Java version. And they suggest some workarounds. https://answers.netlify.com/t/java-11-support/67078/3

p-himik 2023-12-21T18:19:30.235649Z

Even if there's a workaround, I still would recommend against that approach. :)

p-himik 2023-12-21T18:22:19.267279Z

IMO the best approach currently is to either use some service to upload the "raw" artifacts themselves if you only need to host some frontend (i.e. put index.html and some JS/CSS/other assets to some remote location), or use a service that can accept deploys via OCI container images (Docker, Podman, whatever). It'll take you less than a day to learn most of what you need to learn to use containers to your advantage, if you don't already know how to use them. And it'll be an infinitely flexible breeze from there, without any garbage like Heroku buildpacks.

Idan Melamed 2023-12-21T18:40:12.509979Z

I found that I can build locally, and use the Netlify CLI to push the artifacts. Thanks for the help.

Jacob Emcken 2023-12-21T18:44:22.806049Z

I had this problem a while ago: https://github.com/netlify/build-image/issues/788

Idan Melamed 2023-12-21T18:48:12.713829Z

What did you end up doing, downgrading shadow-clj?

Jacob Emcken 2023-12-21T18:55:10.428179Z

At first yes... then I looked into how I could install Java everytime: https://gist.github.com/jacobemcken/86bf32af31b386457209e736ffdbfd73 I download Java (to cache) and install it. On the next run I check the cache and install it again (basically unzip). So it doesn't add too much overhead. I also found a way to make sure that Maven cache is maintained (which it for some reason isn't - and Netlify support didn't want to look further into it). Because I was seeing the same jar files being downloaded on every build. let me know if you are able to use something from the gist.

Jacob Emcken 2023-12-21T18:57:21.391229Z

my goal was to be able to run the same release command locally as on Netlify. I should probably have added some kind of md5sum check or similar of the downloaded file... but I have abandoned the project, so I never got around to do that.

Idan Melamed 2023-12-21T19:14:28.534729Z

Oh, that's a great idea! Thanks.

j4m3s 2023-12-21T23:23:15.054309Z

Hey there! I have a question about handling inputs. I use international qwerty with compose key and in HTML input it works but with inputs with ratom storage it seems that it doesn't (probably because it's sending every keystroke to the ratom) my example input :

[:input {:type "text"
                :value @recipe-title
                :on-change #(reset! recipe-title (-> % .-target .-value))}]
with recipe-title being a reagent atom. Any idea on how to do this ? I'm hoping I can avoid doing something too mutable here. Otherwise a workaround I'm thinking is generating input with a custom id and extracting the value there. Thanks by advance 🙏

p-himik 2023-12-21T23:31:49.373949Z

Seems to be a #reagent question. Or, actually, a React question - have you tried searching in their issues?

p-himik 2023-12-21T23:32:41.620559Z

E.g. there's this one, not sure how related: https://github.com/facebook/react/issues/26805

j4m3s 2023-12-22T00:14:35.130399Z

I didn't think it could be a react question since I've never done any, I'll look that way, thanks!

j4m3s 2023-12-22T01:01:51.392769Z

Okay, it seems it works in normal react, so I'll go ask on #reagent 🙂