-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Investigate problem in ZIO's promise #10808
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
Comments
Minimization: import Promise.internal.State
class Promise(state: State)
object Promise:
object internal:
trait State This gives:
|
Here's the observed completion sequence:
So, it tries to type the import, which means it needs to complete the |
The following variants work: import Promise.State
class Promise(state: State)
object Promise:
trait State and object Promise:
object internal:
trait State
import Promise.internal.State
class Promise(state: State) and class Promise(state: Promise.internal.State)
object Promise:
object internal:
trait State and object Promise:
object internal:
trait State
class Promise(state: Promise.internal.State) |
At this point, I don't see much we can do. I tried to delay resolving the import but that caused problems in other code. So I guess we have to live with the fact that this orderings of code and imports now gives a cycle. There are of course ways in which this could have given a cycle before, for instance if |
FWIW, this issue feels like a recent duplicate, but I couldn't find where I saw it. The forward-reference style of import from companion is common; the idiom always feels strange to me; maybe it's worth advertising its fragility, perhaps in the error message. |
This seems pretty bad to me. Is there no possible solution?
…On Wed, Dec 16, 2020 at 7:33 AM som-snytt ***@***.***> wrote:
FWIW, this issue feels like a recent duplicate, but I couldn't find where
I saw it. The forward-reference style of import from companion is common;
the idiom always feels strange to me; maybe it's worth advertising its
fragility, perhaps in the error message.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#10808 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAYAUEA7TNEKVR3YMFUMPTSVCSKRANCNFSM4U44JJVA>
.
|
In
Promise.scala
incore/shared/src/main/scala/zio
we get on error in the following line:We have to change
State[E, A]
toPromise.internal.State[E, A]
to make it pass. This since the new scheme forconstructor proxies #10784. We should find out the cause and see whether we can address it.
The text was updated successfully, but these errors were encountered: