clojurescript

Gabriele Lippi 2024-11-12T10:24:19.595099Z

Hello, I have a question about https://github.com/binaryage/cljs-oops. Reading the doc of the library it says that the compiler in :advanced mode could break code that does interoperability with JS libraries. As I'm working in a project where our deps wheren't updated for a long time, I found myself changing some stuff and favor the default interoperability offered by cljs with the . and .- and I was on my way to delete the dependency from cljs-oops, but before doing so, I just wanted to ask to the community if the app could then break when compiled or not. tldr, is really needed cljs-oops with latest version of clojurescript and latest tools (shadow-cljs, krell etc) or was it needed back then and now the issues that made that library relevant are solved?

✔️ 1
thheller 2024-11-12T10:25:34.147339Z

cljs-oops should never be used if you ask me 😛

😄 1
thheller 2024-11-12T10:26:17.263659Z

:advanced can still sometimes break your build but usually externs inference fixed most problems and most of the time its a none issue

👍 1
Gabriele Lippi 2024-11-12T10:26:47.176569Z

ok, thanks!

Fredrik Andersson 2024-11-12T12:19:14.283289Z

Does anybody have a suggestion how to best solve this problem. I'm using puppeteer to automate web pages. Sometimes I need to send code to the web page via puppeteers .evaluate function. This creates a problem, because the code doesn't seem to consistently work on the remote end. Probably because compilation and the fact that cljs runtime isn't available to the code when it's evaluated on the remote end. Have anyone had similar situation and have suggestions on how to solve this problem?

benny 2024-11-12T14:13:36.802319Z

Maybe have a look at squint and precompile the cljs to javascript before sending it over. Depends of course on the complexity of your task, but that way you're writing cljs but only dealing with js on the receiving end.

👍 1
Fredrik Andersson 2024-11-12T18:39:47.912129Z

Thanks for the suggestion. I ended up with a JS-module that took care of the problem.