<@U766RQY2D> thanks! and agreed - we generally fin...
# http4k
d
@Razvan thanks! and agreed - we generally find code generators to be a massive red flag as they are often abused, and we would never ever be mandated that library users need to use them. But we are quite lazy and the extension functions did seem to be worth the effort to give people a more familiar API. 🙂 . You can (hopefully!) expect a few articles in the next few months about the connect patterns. ..
👍 1
r
If it’s possible, I’d like to see an exemple of how to make an independent lib using http4k-connect. By independent I mean that does not require the project that uses it to add the dependencies to
http4k-connect-core
&
core-fake
d
if you're going to extend it to create new connector library, then you will need those to hook into.
r
I saw this one. It does extend but it does not create a new stand alone lib. I agree that when you extend to add these dependencies. But I was thinking about other projects that uses a lib let’s say
http4k-connect-amazon-s3
why should he care about adding
connect-core
and
connect-fake-core
when he only needs what the lib provides. I just want the connecter to have these dependencies and not require the user to add then (unless he wants to extend)
d
ah - they shouldn't. there might be a problem with the dependencies.
r
the core it’s needed for Result (that it’s understandable it’s a return type), But the problem I have is with the Fake as if I don’t add the fake-core dependency it can’t figure out that ChaosFake is a HttpHandler.
d
we shouldn't need anything other than the particular client and fake library
so I've just removed those dependencies from the example and it still works ok. I can still resolve Result.
r
Ok I’ll try with one of the libs already inside the project, the probem was with personal lib I was trying to build and use in another project.
d
if you can push an example to github then we can take a look and try and see
is it an api/implementation problem with gradle?
r
Ok, I’ll do that tomorrow. thanks
Finally it was an api/implementation problem as you said. Reading the one in http4k-connect, and using the same api/implementation as in it was helpful. Now I'm fitting to understand how to manage to make two separate libs with the fake apart. but trying to apply your way is more challenging as the project structure is not the same.
d
yeah - it's probably easier to look at the http4k/examples repo, but I do want to make a stand alone project to make it ultra clear