Repository navigation
v0.69.2
Patch Changes
-
#612
2b49181Thanks @mattiamanzati! - Improve effectFnIife diagnostic message to suggest Effect.withSpan with the trace name when availableWhen
Effect.fn("traceName")is used as an IIFE, the diagnostic now suggests usingEffect.genwithEffect.withSpan("traceName")piped at the end to maintain tracing spans. ForEffect.fnUntraced, it simply suggests usingEffect.genwithout the span suggestion. -
#615
ae4f054Thanks @mattiamanzati! - Improve effectFnOpportunity diagnostic with more specific messages and configurable fixes- Add new
effectFnconfiguration option to control which code fix variants are offered:"untraced","span","inferred-span","no-span"(defaults to["span"]) - Diagnostic message now shows the exact expected signature for the rewrite
- Distinguish between explicit trace from
Effect.withSpanvs inferred trace from function name - Skip functions with return type annotations to avoid issues with recursive functions
Before:
This function could benefit from Effect.fn's automatic tracing...After:
Can be rewritten as a reusable function: Effect.fn("myFunction")(function*() { ... }) - Add new