Giter VIP home page Giter VIP logo

Comments (6)

jdegoes avatar jdegoes commented on June 26, 2024

/bounty $100

from zio.

algora-pbc avatar algora-pbc commented on June 26, 2024

πŸ’Ž $100 bounty β€’ ZIO

Steps to solve:

  1. Start working: Comment /attempt #8834 with your implementation plan
  2. Submit work: Create a pull request including /claim #8834 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to zio/zio!

Add a bounty β€’ Share on socials

Attempt Started (GMT+0) Solution
🟒 @andrzejressel May 20, 2024, 6:17:56 PM #8883

from zio.

andrzejressel avatar andrzejressel commented on June 26, 2024
Index: core/shared/src/main/scala-3/zio/internal/macros/LayerMacroUtils.scala
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/core/shared/src/main/scala-3/zio/internal/macros/LayerMacroUtils.scala b/core/shared/src/main/scala-3/zio/internal/macros/LayerMacroUtils.scala
--- a/core/shared/src/main/scala-3/zio/internal/macros/LayerMacroUtils.scala	(revision b9f54f5211389cf2fb807c3774f400e7ed336339)
+++ b/core/shared/src/main/scala-3/zio/internal/macros/LayerMacroUtils.scala	(date 1716157106781)
@@ -1,8 +1,9 @@
 package zio.internal.macros
 
-import zio._
-import scala.quoted._
-import scala.compiletime._
+import zio.*
+
+import scala.quoted.*
+import scala.compiletime.*
 import zio.internal.macros.StringUtils.StringOps
 import zio.internal.ansi.AnsiStringOps
 
@@ -61,7 +62,11 @@
         case '{$lhs: ZLayer[i, e, o]} =>
           rhs match {
             case '{$rhs: ZLayer[i2, e2, o2]} =>
-              '{$lhs.++($rhs)}
+              Expr.summon[Tag[o2]] match {
+                case Some(t) =>
+                  '{$lhs.++($rhs)(using $t)}
+                case _ => throw new Error("OptionalImplicit should be always available")
+              }
           }
       }

Seems to fix it, but I hate it. Maybe it's compiler problem?

EDIT: Yeah - it seems that compiler will take the most outer implicit instead of closest one

EDIT2: I've asked on users forum about that: https://users.scala-lang.org/t/scala-3-when-calling-method-with-implicit-value-within-quotes-implicit-in-scope-is-not-found/10003

EDIT3: I believe the message is not from implicitnotfound annotation, but from macro that generates Izumi tag - I'll try to verify it today

from zio.

andrzejressel avatar andrzejressel commented on June 26, 2024

/attempt #8834

Algora profile Completed bounties Tech Active attempts Options
@andrzejressel 6 ZIO bounties
Kotlin, Scala,
Java & more
Cancel attempt

from zio.

algora-pbc avatar algora-pbc commented on June 26, 2024

πŸ’‘ @andrzejressel submitted a pull request that claims the bounty. You can visit your bounty board to reward.

from zio.

algora-pbc avatar algora-pbc commented on June 26, 2024

πŸŽ‰πŸŽˆ @andrzejressel has been awarded $100! 🎈🎊

from zio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.