This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-21
Channels
- # adventofcode (8)
- # announcements (20)
- # babashka (43)
- # beginners (8)
- # biff (12)
- # calva (2)
- # cider (5)
- # clerk (6)
- # clj-commons (12)
- # clj-kondo (16)
- # clojure (20)
- # clojure-denver (1)
- # clojure-europe (14)
- # clojure-nl (1)
- # clojure-norway (105)
- # clojure-uk (2)
- # clojuredesign-podcast (5)
- # clojurescript (29)
- # datomic (2)
- # hyperfiddle (13)
- # jackdaw (1)
- # jobs (4)
- # jobs-discuss (4)
- # lsp (2)
- # malli (12)
- # pathom (2)
- # pedestal (1)
- # re-frame (22)
- # shadow-cljs (37)
- # squint (28)
- # xtdb (28)
- # yamlscript (4)
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?
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.Oh, sorry.
Where should I take this? #C6N245JGG ?
FWIW, I just build my apps locally and then deploy the resulting artifacts.
> Where should I take this? #C6N245JGG ?
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.
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.
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.
Yeah, that's a good advice, thanks. Where do you host your artifacts?
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
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.
I found that I can build locally, and use the Netlify CLI to push the artifacts. Thanks for the help.
I had this problem a while ago: https://github.com/netlify/build-image/issues/788
What did you end up doing, downgrading shadow-clj
?
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.
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.
Oh, that's a great idea! Thanks.