Fork me on GitHub
#sci
<
2023-12-05
>
zeitstein20:12:06

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
zeitstein20:12:15

[: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

zeitstein20:12:27

[: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
--------------------------------------------------------------------------------

zeitstein20:12:56

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

borkdude21:12:42

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

zeitstein07:12:43

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.

borkdude08:12:36

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

borkdude08:12:16

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

zeitstein08:12:23

I think I've got it.

zeitstein08:12:00

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.

zeitstein08:12:31

Adding the guidance from the troubleshooting section resolves it.

zeitstein08:12:47

Thanks!

👍 1