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

feat: add possibility to select a version for geckodriver to install #897

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

arn-the-long-beard
Copy link

@arn-the-long-beard arn-the-long-beard commented Aug 9, 2020

Hello guys !!!

I checked! 📦✅

  • I have the latest version of rustfmt installed
$ rustup component add rustfmt 
->  info: component 'rustfmt' for target 'x86_64-unknown-linux-gnu' is up to date

Since the 27th of July there is a bug with headless mode for firefox on the latest geckodriver.
So, it could be nice to give us the opportunity to choose which version we want to install.

What we need to do :

  • Find a nice way to select a version of geckodriver
  • Make a good documentation on how to use this new feature
  • Having good test as a show case and be sure our stuff is working :)

This PR is draft, because I am not pro and maybe we can find a good solution together 😄

My first reflex is that we could use environment variable to do that, but maybe we can use feature or something else.

Thank you for your inputs.

By the way, the test I made is failing, and even with debugging in my IDE, I do not know where it is failing. Can somebody give me a hand on this ?

✨ Thank you for your inputs ✨

Issue : rustwasm/wasm-bindgen#2261 (comment)

@arn-the-long-beard arn-the-long-beard changed the title feat: added possibility to add a version for gecko driver to install feat: add possibility to select a version for gecko driver to install Aug 9, 2020
@arn-the-long-beard arn-the-long-beard changed the title feat: add possibility to select a version for gecko driver to install feat: add possibility to select a version for geckodriver to install Aug 9, 2020
@arn-the-long-beard arn-the-long-beard marked this pull request as draft August 9, 2020 11:41
let geckodriver_version = if target::WINDOWS {
log::info!(
"[geckodriver] Windows detected, holding geckodriver version to {}",
DEFAULT_WINDOWS_GECKODRIVER_VERSION
);
DEFAULT_WINDOWS_GECKODRIVER_VERSION.to_owned()
} else if specified_geckodriver_version.is_ok() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably switch conditions if target::WINDOWS and if specified_geckodriver_version.is_ok() otherwise you wouldn't be able to specify the version on Windows.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure because it seems the version for windows had to be 0.24.0.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

@arn-the-long-beard
Copy link
Author

Hello guys, what should we do with this PR ?

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