effect
effect copied to clipboard
From Discord: Resolving Kysely Integration Issues in Effect with SqlResolver
Summary
Summary
Issue Encountered:
- User xesrevinu encountered an error (
Proxy Magic) while using Kysely integration withSqlResolverin 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
compilemethod. - A fix was implemented and a PR was created and merged directly into the
next-minorbranch.
Additional Issue:
- User xesrevinu identified another scenario requiring handling of
Hash.symbolto avoid aTypeErrorwhen usingEffect.annotateLogs.
Key Takeaways
-
Proxy Whitelisting:
- Ensure all necessary methods (like
compile) are whitelisted in the proxy to avoid runtime errors.
- Ensure all necessary methods (like
-
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.
-
Handling Special Symbols:
- Additional handling may be required for special symbols like
Hash.symbolto ensure proper functionality and avoidTypeError.
- Additional handling may be required for special symbols like
-
Community Collaboration:
- Effective communication and collaboration (e.g., minimal repros, quick fixes) are crucial for resolving issues efficiently in open-source projects.
-
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
I'll add more tests to cover more use cases, and add corresponding proxy whitelisting