Fork me on GitHub
#shadow-cljs
<
2022-09-04
>
Logan Powell18:09:06

@thheller such a long time since we've chatted. You may not even remember me. Of course, like a bad relative, I'm here because I need your help

Logan Powell18:09:30

I'm trying to use https://shadow-cljs.github.io/docs/UsersGuide.html#_conditional_reading as part of my Calva/vscode setup and have a couple questions: 1. do these conditionals work when deploying a library that should work in both node and the browser (i.e., runtime) or are they a compiled feature? 2. do they work when using them w/a REPL (mine currently = vscode + calva) without setting anything in the config?

thheller18:09:15

hey, they are a reader feature. so they'll work as long as the source code is read somewhere, but only during reading. as such without config they'll not trigger if you add custom conditionals?

thheller18:09:08

you also likely shouldn't be using them in the first place 😉

😄 1
Logan Powell18:09:20

understood. I'll find another way. Good to hear from you again old friend

pez19:09:19

Why shouldn't we be using them?

Logan Powell19:09:09

probably because since it's not officially supported

thheller06:09:21

correct. they do work just fine but they must have a reason for rejecting them from official support 😛

Fredrik Andersson19:09:12

are there any build constants that could be used for conditional build?

Fredrik Andersson19:09:10

i found :closure-defines