Fork me on GitHub
#pathom
<
2023-01-10
>
jjttjj15:01:52

I'm faced with using a big java library with tons of interconnected types that are hard just to construct, at least before I'm past the learning curve. I'm tempted to just do some sort of analysis on the java and use pathom as a construction engine, filling in default values in some places. Anyone use pathom like this?

souenzzo16:01:08

I tried to do something like that with AWS SDK long time ago. Not simple, but seems to be possible

souenzzo16:01:55

(I gave up because it was out of scope of my current task)

jjttjj17:01:22

Yeah I've found that to be a problem I hit with pathom. A problem starts to look graphy and seems like it would be great to work with it via pathom. But when I start to code up the resolvers it becomes apparent that there are a lot of decisions to make and that the wrapper itself would be a whole project that may not be justified. This isn't at all a critique of pathom just a pattern I catch myself in where I want to use it too frequently or possibly for the wrong things. Which I think is why I wanted to post the idea here first

Ben Grabow15:01:16

@U064UGEUQ I've stumbled across https://github.com/nivekuil/nexus that is a dependency injection library using Pathom under the hood. I haven't used it myself, but it seems to fit in the direction you're proposing.