Open richardscarrott opened 1 year ago
It seems introspectValidator
is problematic because it does in fact have a side-effect (throws), however it's only relevant if the return value is used so prob a legit case for PURE annotation, however it's all so brittle I think it'd be better to have a test which bundles w/ rollup and asserts the output.
Also, might want to try: https://github.com/Andarist/babel-plugin-annotate-pure-calls
Both rollup and webpack fail to efficiently tree-shake the codebase which, although very small, would be still be nice given it is side effect free.
I think it's related to curried functions being executed on import but also specifically seems to be related to newing up errors in
and
,or
etc.https://github.com/richardscarrott/ok-computer/pull/21