Skip to content

From Discord: Resolving Kysely Integration Issues in Effect with SqlResolver #3299

@effect-bot

Description

@effect-bot

Summary

Summary

Issue Encountered:

  • User xesrevinu encountered an error (Proxy Magic) while using Kysely integration with SqlResolver in Effect.
  • The error was temporarily resolved by wrapping the database query in Effect.suspend.

Reproduction:

  • A minimal reproduction of the issue was provided using Vitest for testing in the Effect repository.

Resolution:

  • User ecyrbedev identified the issue as related to the proxy not whitelisting the compile method.
  • A fix was implemented and a PR was created and merged directly into the next-minor branch.

Additional Issue:

  • User xesrevinu identified another scenario requiring handling of Hash.symbol to avoid a TypeError when using Effect.annotateLogs.

Key Takeaways

  1. Proxy Whitelisting:

    • Ensure all necessary methods (like compile) are whitelisted in the proxy to avoid runtime errors.
  2. Auto-Merge Behavior:

    • Be cautious with PR titles and branches to avoid unexpected auto-merges.
    • Confirm if auto-merge is enabled and understand its behavior in the repository.
  3. Handling Special Symbols:

    • Additional handling may be required for special symbols like Hash.symbol to ensure proper functionality and avoid TypeError.
  4. Community Collaboration:

    • Effective communication and collaboration (e.g., minimal repros, quick fixes) are crucial for resolving issues efficiently in open-source projects.
  5. Testing and Validation:

    • Use testing frameworks like Vitest to create minimal reproductions and validate fixes before merging changes.

By addressing these points, the Effect-TS ecosystem can improve its robustness and developer experience.

Discord thread

https://discord.com/channels/795981131316985866/1262774065819811983

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions