Describe the problem as clearly as you can
Hey apologies for using this format for asking a question that could be answered by grokking the source code.
Feel free to point me elsewhere if that's better. I just suspect it may take a while for me, and hopefully it's an easy question to answer for a maintainer. maybe @deivid-rodriguez you could help?
I'm working on a way to detect potential thread safety issues, and one of the final pieces of the puzzle is conveying this information in a usable way.
So I have a list of potential problems for a codebase, but I want to be able to exclude certain gems based on a presumption of thread safety.
E.g. If I were to say mark rails as thread safe. I'd like to then get a list of its dependencies that I can also mark as considered safe. I'm also using the bundle outdated info to help in a similar way to suggest updates to the Gemfile that could resolve a bunch of issues.
I can see this kind of information is available to bundler, but I'm not sure if there's a simple programmatic way to find this out, or if I'd need to hack something together with internal classes.
Ideally it would be something like
# FYI: within the context of the current application bundle
Gems.dependent_on('some_outdated_gem')
Gems.dependencies_of('rails')
and return a list of Gem objects of some kind.
Does that exist? If not is it something you'd be interested in having a similar API provided as a PR?
Describe the problem as clearly as you can
Hey apologies for using this format for asking a question that could be answered by grokking the source code.
Feel free to point me elsewhere if that's better. I just suspect it may take a while for me, and hopefully it's an easy question to answer for a maintainer. maybe @deivid-rodriguez you could help?
I'm working on a way to detect potential thread safety issues, and one of the final pieces of the puzzle is conveying this information in a usable way.
So I have a list of potential problems for a codebase, but I want to be able to exclude certain gems based on a presumption of thread safety.
E.g. If I were to say mark
railsas thread safe. I'd like to then get a list of its dependencies that I can also mark as considered safe. I'm also using thebundle outdatedinfo to help in a similar way to suggest updates to the Gemfile that could resolve a bunch of issues.I can see this kind of information is available to bundler, but I'm not sure if there's a simple programmatic way to find this out, or if I'd need to hack something together with internal classes.
Ideally it would be something like
and return a list of
Gemobjects of some kind.Does that exist? If not is it something you'd be interested in having a similar API provided as a PR?