Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loosen version constraint for childprocess dependency #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cjlarose
Copy link

@cjlarose cjlarose commented Jan 28, 2020

I have an application that uses childprocess (= 3.0.0). Trying to introduce browsermob-proxy-rb (~> 0.3.1) to that project produces a conflict because browsermob-proxy-rb declares a dependency on childprocess (~> 0.5). To resolve the conflict, I can downgrade childprocess, but I'd prefer not to. This project appears to be compatible with all versions of childprocess from 0.5 to 3.0.0, so this change just loosens the version constraint in the gemspec.

Resolving dependencies...
Bundler could not find compatible versions for gem "childprocess":
  In snapshot (Gemfile.lock):
    childprocess (= 3.0.0)

  In Gemfile:
    browsermob-proxy (~> 0.3.1) was resolved to 0.3.1, which depends on
      childprocess (~> 0.5)

    webdrivers was resolved to 4.2.0, which depends on
      selenium-webdriver (>= 3.0, < 4.0) was resolved to 3.142.7, which depends on
        childprocess (>= 0.5, < 4.0)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

If I remove the constraint in my Gemfile that I want the latest version of browsermob-proxy-rb, bundler installs version 0.1.7 since that version had no constraint at all on the childprocess version. This is similarly undesirable.

s.add_runtime_dependency "childprocess"

@thiagotrentin
Copy link

thiagotrentin commented Mar 30, 2020

@cjlarose did you gave up on this gem?I'm facing this childprocess conflict as well and unfortunately looks like this gem is unmaintained 😞

@cjlarose
Copy link
Author

cjlarose commented Mar 31, 2020

I was able to just use my fork (https://github.com/cjlarose/browsermob-proxy-rb) directly from github (branch: loosen-version-constraint-childprocess) in my Gemfile.

But ultimately, I ended up using a different solution to my problem altogether. Originally, I wanted to capture network traffic as a HAR when running my automated test suite. Browsermob proxy / Browserup proxy seemed like a good option, but ultimately, I went with a solution that connects to the browser (Chrome in this case) using puppeteer and that can also capture network activity and save it as a HAR.

See https://github.com/Everettss/puppeteer-har

I wrote a HTTP interface around that library so I could use it from Ruby

https://github.com/appfolio/puppeteer-har-server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants