Skip to content

v0.69.2

Choose a tag to compare

@github-actions github-actions released this 18 Jan 17:40
· 137 commits to main since this release
4ec3535

Patch Changes

  • #612 2b49181 Thanks @mattiamanzati! - Improve effectFnIife diagnostic message to suggest Effect.withSpan with the trace name when available

    When Effect.fn("traceName") is used as an IIFE, the diagnostic now suggests using Effect.gen with Effect.withSpan("traceName") piped at the end to maintain tracing spans. For Effect.fnUntraced, it simply suggests using Effect.gen without the span suggestion.

  • #615 ae4f054 Thanks @mattiamanzati! - Improve effectFnOpportunity diagnostic with more specific messages and configurable fixes

    • Add new effectFn configuration 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.withSpan vs 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*() { ... })