This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-10-21
Channels
- # announcements (25)
- # beginners (31)
- # calva (7)
- # cider (21)
- # clj-kondo (3)
- # clojure (18)
- # clojure-bay-area (1)
- # clojure-europe (30)
- # clojure-norway (12)
- # clojurescript (5)
- # core-logic (1)
- # data-science (20)
- # datomic (7)
- # docker (3)
- # emacs (1)
- # gratitude (4)
- # honeysql (17)
- # hyperfiddle (15)
- # malli (9)
- # membrane (1)
- # nrepl (1)
- # off-topic (8)
- # other-languages (1)
- # overtone (48)
- # practicalli (1)
- # reitit (6)
- # shadow-cljs (30)
Hi everyone, with an esm
target build, is it possible to export modules with a pattern instead of a name? for instance, all fns starting with 'foo'.
thanks for the quick reply, and I guess it's the same for all fns from a single namespace?
got it, thanks And btw, huge fan of shadow-cljs π
while debugging an electric compiler issue, I broke shadow-cljs 2.25.8. behavior is reproducible on every build, tried clearing .shadow-cljs
too
what is expectation and actual behavior? Zero idea as to what you did, what you think should happen or what this screenshot is meant to show
expectation: shadow shows success, warning, or error reality: shadow throws an exception and the UI is stuck here
@U09K620SG I don't know how much of this is related to electric but shadow should never fail like this, so it's a shadow bug. I don't expect you to have an idea
did you clear js as well?
electric compiler tampers with shadow cache because clojurescript compilation is really complicated, i donβt recall the details
rm resources/public/js
yes, tried it again and it's the same error. on electric cc55772f18bc46373f131e092fc20055c8062b59
try incognito, there must be state somewhere
tried that, different browsers etc., no luck yet. will keep digging, I agree there's some state somewhere if this error still shows up after reverting my code. have you seen something like this before?
didn't manage to figure out what the state issue is, but fixed by changing (PIXI/Texture.from texture-url)
to (.from PIXI/Texture texture-url)
. not sure why this suddenly became a problem. anyway, the shadow UI should still not break like this.
https://cljs.github.io/api/syntax/dot
> Dots inside symbols accidentally work as a technical shortcut in ClojureScript
> ...
> Dots inside symbols are not recommended, as they are not detected by :infer-externs
key takeaway: foo/bar.baz
may work in some cases (e.g. for js
namespace it will since most of the stdlib has externs already). but this is not behavior to rely on. similarly, you should always explicitly require namespaces exporting a symbol, even if in development you can sometimes use symbols from another namespace without requiring it
also, the yellow status icon indicates your build emitted warnings. it would be helpful to share those warnings
the warning is in the console, threw an exception before the UI could render them it seems
compile-time warnings appear in the build status (or your terminal if you run npx shadow-cljs compile main
); the browser console displays whatever logging happens at run-time
this is just a bug in the UI, not specific to electric but I guess triggered by it throwing its own errors maybe?
this doesn't look like an error message from the shadow-cljs compiler, so I guess the UI just ends up in a path that is not normally taken (and wasn't tested)
this makes sense, the foreign interop in Electric is something that had recent changes and likely isn't perfected yet