← Back to context

Comment by __mharrison__

18 hours ago

I'm curious. Do you have real world examples of when you want to do this?

This is Java, but recently I had a case where one library depended on a version of an Apache Commons library, and another library depended on a different version of the same Apache Commons library, and neither version worked with both libraries. In my case, I was able to upgrade one of them to a newer version so that I could use just one Apache Commons version, but I got lucky there.

The monolith I work on has this dependency chain:

  monolith -> openai
  monolith -> langchain-openai -> openai

openai, thus, is both a direct and indirect dependency. langchain-openai recently had a vulnerability, and the patch fix is only after a major upgrade to openai. Thus, to upgrade langchain-openai here, I also need to upgrade monolith's use of openai. (From v1 to v2.)