-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
avoid generating internal frames #589
Conversation
@@ -1,4 +1,4 @@ | |||
package kyo.examples.ledger | |||
package examples.ledger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moves the examples out of the kyo
package so they can generate frames.
private def frameImpl(using Quotes): Expr[String] = | ||
private[kyo] inline def internal: Frame = ${ frameImpl(true) } | ||
|
||
private val allowKyoFileSuffixes = Set("Test.scala", "Spec.scala", "Bench.scala") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The macro has this allow list for tests and benchmarks.
d8746c5
to
15bfd94
Compare
15bfd94
to
e7fffd5
Compare
@@ -17,6 +17,7 @@ given zioSchema[R, A: Flat, S](using ev: Schema[R, A], ev2: (A < S) <:< (A < (Ab | |||
ev.toType_(isInput, isSubscription) | |||
|
|||
override def resolve(value: A < S): Step[R] = | |||
given Frame = Frame.internal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some situations where an internal frame is necessary. Frame.internal
is a private[kyo]
API that allows generating a frame within the kyo
package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there is an issue with kyo-sttp files under JS
s"""Frame cannot be derived within the kyo package: ${sym.owner.fullName} | ||
| | ||
|To resolve this issue: | ||
|1. Propagate the Frame from user code using an implicit parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implicit
?? What is this, Scala 2.13?
This PR makes the
Frame
macro fail to compile in case the frame is in thekyo
package and fixes the methods in the codebase that were missing the implicit.