What is the reason / reasoning behind shadow (I have not actually checked whether the CLJ compiler does the same thing) producing a compilation error on unknown keywords in comment blocks and behind the #_ reader-tag?
(comment #_::i-dont-exist/stuff)
(comment #_::i-dont-exist/stuff)
--------------------------------------^-----------------------------------------
[...] Invalid keyword: ::i-dont-exist/stuff.
thats a reader problem. stuff still needs to be readable, i.e. have resolvable aliases
CLJ has the same problem
Is it possible to get exception stacktraces to point to the clojure files instead of the javascript files? Maybe some sort of source map configuration?
source maps should indeed take care of that and they are enabled by default
it is possible that you have a wrong configuration that prevents them from loading properly, check the browser console if there are some errors/warnings reported for them
The browser says that source maps are loaded
basically the only relevant option is :asset-path, which must be correct
and you are talking about stacktraces in the browser console?
Yes in the browser console
My config has
:output-dir "resources/public/js/app"
:asset-path "/js/app"
and serves assets out of the resources/public directory
ok that looks correct
then it should just work
are you asking about watch or release builds?
I'm getting stacktraces like this:
nexttick.js:195 2025-03-26T17:48:24.872Z ERROR [com.fulcrologic.statecharts.algorithms.v20150901-impl:85] - Expression failure
Error: Test
at new cljs$core$ExceptionInfo ()
at cljs$core$ex_info.eval [as cljs$core$IFn$_invoke$arity$3] ()
at cljs$core$ex_info.eval [as cljs$core$IFn$_invoke$arity$2] ()
at eval ()
at eval ()
at eval ()
at Object.eval [as com$fulcrologic$statecharts$protocols$ExecutionModel$run_expression_BANG_$arity$3] ()
at $fulcrologic$statecharts$protocols$run_expression_BANG_ [as run_expression_BANG_] ()
at $fulcrologic$statecharts$algorithms$v20150901_impl$run_expression_BANG_ [as run_expression_BANG_] ()
at eval () that looks like some logging impl, not a regular js/console.log
I tested it with (throw (ex-info "Test" {:foo "bar"}))
ex-info sucks for this. browsers don't source map custom error types
Is there a way I can verify that it works? A different error type?
(throw (js/Error. "Test"))
or just (throw "test") should also be mapped properly
I'm still getting javascript files in the stacktrace
as I said this is not a regular js/console.log, so I do not know what is causing the logging here
only actual (js/console.log the-original-exception) will cause things to be source map, nothing else is
so if whatever this logging impl is just logs (.-stack ex) then it will not be source mapped and there is nothing to get that
Oh it's just console.log that gets source mapped. Ok that makes sense
@eoogbe I think you might be looking for com.fulcrologic.fulcro.algorithms.timbre-support
I'm using telemere not timbre
wasn't telemere timbre-compatible? (or at least have some glue ns to help migrate?)