sci

zeitstein 2023-12-05T20:25:06.457039Z

I'm having what seem to be random build failures using SCI with shadow-cljs. The weird things is that just re-running the build (even just forcing a re-compile) often resolves the issue. I don't know where to even begin to try and debug this.

āœ”ļø 1
borkdude 2023-12-06T08:34:36.275769Z

I’m using shadow with sci in several projects but never saw this. Is your project public ?

borkdude 2023-12-06T08:49:16.173749Z

in case it's not public, is it possible to make a repro?

zeitstein 2023-12-06T08:51:23.207099Z

I think I've got it.

zeitstein 2023-12-06T08:53:00.328219Z

It was user.clj, just through Calva's https://calva.io/connect-sequences/#settings-for-adding-custom-sequences. I must have been requiring nses that depend on the nses that use sci.core.

zeitstein 2023-12-06T08:53:31.354689Z

Adding the guidance from the troubleshooting section resolves it.

zeitstein 2023-12-06T08:56:47.692719Z

Thanks!

šŸ‘ 1
zeitstein 2023-12-05T20:25:15.147119Z

[:main] Build failure:
------ ERROR -------------------------------------------------------------------
 File: jar:file:/Users/filip/.m2/repository/org/babashka/sci/0.8.41/sci-0.8.41.jar!/sci/core.cljc
failed to require macro-ns "sci.core", it was required by "sci.core"
Error in phase :compile-syntax-check
RuntimeException: No such var: opts/init

zeitstein 2023-12-05T20:26:27.911269Z

[:main] Build failure:
------ ERROR -------------------------------------------------------------------
 File: jar:file:/Users/filip/.m2/repository/org/babashka/sci/0.8.41/sci-0.8.41.jar!/sci/impl/analyzer.cljc:1:1
--------------------------------------------------------------------------------

   1 | (ns sci.impl.analyzer
-------^------------------------------------------------------------------------
Invalid :refer, macro sci.impl.analyzer/gen-return-binding-call does not exist
--------------------------------------------------------------------------------
   2 |   {:no-doc true
   3 |    :clj-kondo/config '{:linters {:unresolved-symbol {:exclude [ctx this bindings]}}}}
   4 |   (:refer-clojure :exclude [destructure macroexpand macroexpand-all macroexpand-1])
   5 |   (:require
--------------------------------------------------------------------------------

zeitstein 2023-12-05T20:28:56.847269Z

1 | (ns sci.impl.analyzer
-------^------------------------------------------------------------------------
Invalid :refer, macro sci.impl.analyzer/gen-return-recur does not exist
--------------------------------------------------------------------------------

borkdude 2023-12-05T21:24:42.409959Z

@mithrandir03 repro welcome. could this be a caching issue? delete .shadow-cljs in doubt. also, are you perhaps using a user.clj?

borkdude 2023-12-05T21:25:22.571959Z

https://github.com/babashka/sci#troubleshooting

zeitstein 2023-12-06T07:57:43.184099Z

I saw that, but am not using user.clj. So it seems deleting .shadow.cljs does resolve the issue – the build compiles every time after I delete it. But the next build (without delete) reproduces the issue.