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.
Iām using shadow with sci in several projects but never saw this. Is your project public ?
in case it's not public, is it possible to make a repro?
I think I've got it.
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.
Adding the guidance from the troubleshooting section resolves it.
Thanks!
[: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[: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
--------------------------------------------------------------------------------1 | (ns sci.impl.analyzer
-------^------------------------------------------------------------------------
Invalid :refer, macro sci.impl.analyzer/gen-return-recur does not exist
--------------------------------------------------------------------------------
@mithrandir03 repro welcome. could this be a caching issue? delete .shadow-cljs in doubt. also, are you perhaps using a user.clj?
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.