by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 06 2019 21:34
    jcranky added as member
  • Apr 24 2019 11:03
    etorreborre removed as member
  • Apr 24 2019 11:03
    jcranky removed as member
  • Apr 24 2019 11:03
    danielkarch removed as member
  • Feb 25 2019 21:28
    karlroberts commented #125
  • Feb 12 2019 08:44
    etorreborre closed #125
  • Feb 12 2019 08:44
    etorreborre commented #125
  • Feb 11 2019 08:13
    etorreborre commented #125
  • Feb 10 2019 21:20
    karlroberts opened #125
  • Jan 21 2019 15:14
    etorreborre commented #124
  • Jan 21 2019 15:14
    etorreborre commented #124
  • Jan 18 2019 10:55
    etorreborre commented #124
  • Jan 18 2019 10:55
    etorreborre commented #124
  • Jan 18 2019 10:55
    etorreborre reopened #124
  • Jan 18 2019 10:55
    etorreborre reopened #124
  • Jan 18 2019 08:35
    alvarogimenez commented #124
  • Jan 18 2019 08:35
    alvarogimenez commented #124
  • Jan 18 2019 08:30
    alvarogimenez commented #124
  • Jan 18 2019 08:30
    alvarogimenez commented #124
  • Jan 17 2019 17:15
    etorreborre commented #124
Philipp Martini
@maphi
Error is: could not find implicit value for parameter someServiceReader: cats.data.Reader[...ApplicationConfig,....SomeService]
Bjørn Madsen
@aeons
can you try removing the @readers macro on HttpConfig?
i think it might generate an ambiguous implicit value
Philipp Martini
@maphi
Doesn't help. I think its missing an Reader[ApplicationConfig, HttpSubConfig2]
Bjørn Madsen
@aeons
does ApplicationConfig.cfg2Reader exist?
Philipp Martini
@maphi
scalac says no
Bjørn Madsen
@aeons
just for completeness does ApplicationConfig.cfg1Reader exist?
Philipp Martini
@maphi
Nope. Just for completeness: Using grafter 2.6.0
Bjørn Madsen
@aeons
can you try with 2.5.0
i think I might have broken this :|
Philipp Martini
@maphi
ok. just FYI (with 2.6.0): HttpConfig. cfg1Reader/cfg2Reader exists when using @readers on HttpConfig
Bjørn Madsen
@aeons
yeah, that makes sense
I think I’ve misunderstood something with how it should owkr :)
Philipp Martini
@maphi
same problem with 2.5.0
Bjørn Madsen
@aeons
ok, not my fault then :D
Philipp Martini
@maphi
^^ But it should be possible to nest configs?
Bjørn Madsen
@aeons
i thought so
but I can’t see where it can go down a level in the macros
Philipp Martini
@maphi
y that could be the problem as it got a Reader[ApplicationConfig, HttpConfig] and a Reader[HttpConfig, HttpSubConfig2] in scope and if i create Reader[ApplicationConfig, HttpConfig] manually from the two above it works
Bjørn Madsen
@aeons
in the documentation it does mention to annotate the configuration with @readers
which sounds like there’s only supposed to be one :)
Philipp Martini
@maphi
Y, looks like ^^, thanks 4 help. Macro expansion on ApplicationConfig shows only httpConfigReader, applicationConfigReader, thus scalac has no clue how to resolve it. I'll stick with flat config then.
Bjørn Madsen
@aeons
ok
Eric Torreborre
@etorreborre
@maphi I don’t have time to test this idea right now but I think putting a @reader annotation on top of HttpConfig might work, or something… I’ll come back to you
Philipp Martini
@maphi
I tried putting both(@reader and @readers) on top of HttpConfig but that didn't worked.
Eric Torreborre
@etorreborre
Fair enough, I'll check what I can do if can get enough battery time during my flight 😄
Philipp Martini
@maphi
cool thx, nice flight then
Bjørn Madsen
@aeons
Have you tried both at the same time?
Philipp Martini
@maphi
yes
Eric Torreborre
@etorreborre
@maphi I found a solution for this issue which unfortunately is breaking something else. In the meantime things should work if you annotate HttpConfig with @readers and then import HttpConfig._ where you want to create the application. I’ll try to find a fix that’s working in all cases.
Philipp Martini
@maphi
thx @etorreborre i'll try that
Eric Torreborre
@etorreborre
I’m unfortunately not sure that my solution can be implemented with the current Scala macros, we might have to resort to 2 different annotations, one for the “flat” case, one for the “nested” one
Eric Torreborre
@etorreborre
@maphi can you please try grafter-2.6.1 (and annotate your “nested” configs with @readers)?
Philipp Martini
@maphi
works now :), thanks a lot
Eric Torreborre
@etorreborre
Great it wasn’t obvious to get there :-)
Jakub Kozłowski
@kubukoz
hey, has anyone tried using grafter with Play?
Eric Torreborre
@etorreborre
I haven't but that's something I wanted to investigate
Jakub Kozłowski
@kubukoz
my team regularly has problems with components that don't have a bound implementation in production, so I'm trying to convince them to move to compile-time injection
so I'm investigating options :P
Bjørn Madsen
@aeons
i started scraping the surface some time ago, but it seemed really hard so I stopped again :)
Michal Matloka
@mmatloka
hi, is there known any regression for grafter 2.6.1? I've made an update from 2.5.0 and I get some errors related to ambignous implicit values. If not then I'll add more details.
Eric Torreborre
@etorreborre
Not that I know of but more details would be useful :-)
Mario Lyon
@mariolyon
Hi, we are using grafter in our project at Zalando. The code depends on an external library, which contains a trait and an Implementation. Is it possible to use the implementation as a wired in dependency in the code that we use? As far as I understand, the @defaultReader annotation needs to be placed in the actual source code of the (external library) trait.
Eric Torreborre
@etorreborre
Yes but you can also create an implicit Reader yourself for that component
Mario Lyon
@mariolyon
Great, thanks for confirming! Been thinking the same, but haven't managed to do it yet, will persist...
Mario Lyon
@mariolyon
@etorreborre Do I need to import my custom implicit Reader, in a particular class?
Eric Torreborre
@etorreborre
yes that the drawback of not being able to stick it with the original datatype
Mario Lyon
@mariolyon
hmm, so I need to import the implicit Reader, where I need the dependency injected, right?
Eric Torreborre
@etorreborre
where you able building your top-level application
Mario Lyon
@mariolyon
I see, makes sense.