Fork me on GitHub
#shadow-cljs
<
2022-05-19
>
Tiago Dall'Oca16:05:43

any examples on how to use https://shadow-cljs.github.io/docs/UsersGuide.html#build-hooks? I'm getting build hook: my.util/hook failed to load and will not be used

thheller16:05:51

@mrdalloca start a clojure repl and load the namespace. eg. shadow-cljs clj-repl then (require 'my.util). that apparently fails?

thheller16:05:07

I'm assuming here you actually changed the namespace and didn't use my.util?

Tiago Dall'Oca16:05:04

it has to be a .clj file

Tiago Dall'Oca16:05:31

is there any way to interact with the cljs runtime during compilation?

thheller17:05:15

during compilation there is no cljs runtime. the runtime will only load the final result

thheller17:05:55

what do you want to do?

Tiago Dall'Oca17:05:26

a very specific use case haha

Tiago Dall'Oca17:05:22

I want to be able to load malli schemas and spit out a file containing said schemas (simplifying)

Tiago Dall'Oca17:05:43

those schemas are defined in my cljs code

thheller17:05:53

not possible in a hook

thheller17:05:04

you can move the schemas to .cljc files though

Tiago Dall'Oca17:05:17

that's what I thought

Tiago Dall'Oca17:05:28

I'm doing some porting to test this

jcoyle17:05:30

I just tried it but I’m getting:

shadow.user=> (shadow/release-snapshot :app {})
Syntax error compiling at (REPL:1:1).
No such var: shadow/release-snapshot

thheller17:05:54

that post is super old and build reports are the current thing

jcoyle17:05:35

aaahhh sorry about that - I did first try searching the user guide for release-snapshot but didn’t see anything. Thanks again for all your hard work on shadow - such a great tool!

👍 1
Tiago Dall'Oca18:05:21

@thheller if I'm using snapshot dependencies, how to download them again?

thheller18:05:28

no clue. I have never used a snapshot dependency 😛

thheller18:05:03

deleting .shadow-cljs/classpath.edn maybe?

thheller18:05:23

don't actually know what makes them update

Tiago Dall'Oca19:05:21

I'm just deleting the dependencies from disk 😛

Tiago Dall'Oca19:05:34

working for now but not ergonomic haha

Tiago Dall'Oca19:05:48

I won't need this specifically often I think

👀 1