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

Consider removal of dependency on sys_info crate #58

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

Conversation

mikebirdgeneau
Copy link

Summary

The sys_info crate is used to determine the current OS for installing the web driver.

  • I ran into issues cross-compiling, and noted that since we were not using sys_info for anything other than determining the OS for the webdriver download, we could simply replace this functionality with: std::env::consts::OS, removing this dependency.
  • This solves my cross-compilation issue, and can simplify crate dependencies.

Feel free to incorporate if you see fit!


Tests

   Finished test [unoptimized + debuginfo] target(s) in 0.07s
     Running unittests src/lib.rs (target/debug/deps/webdriver_install-504fbf892f449025)

running 5 tests
test geckodriver::direct_download_url_test ... ok
test chromedriver::direct_download_url_test ... ok
test chromedriver::version_from_output_panic_not_4_parts_test - should panic ... ok
test chromedriver::version_from_output_panic_test - should panic ... ok
test chromedriver::version_from_output_test ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

     Running unittests src/main.rs (target/debug/deps/webdriver_install-d9ed1320473136de)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/integration_test.rs (target/debug/deps/integration_test-8874bc6350bfbb78)

running 2 tests
test chromedriver_install_test ... ok
test geckodriver_install_test ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.93s

   Doc-tests webdriver_install

running 4 tests
test src/lib.rs - (line 22) - compile ... ok
test src/lib.rs - (line 7) - compile ... ok
test src/installer.rs - installer::Driver::install_into (line 51) - compile ... ok
test src/installer.rs - installer::Driver::install (line 29) - compile ... ok

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s

Dry Run

Dry run (cargo release alpha --dry-run) runs successfully per CONTRIBUTING.md

Remove reliance on `sys_info` crate to determine OS in favour of std::env::consts::OS
@phansch
Copy link
Owner

phansch commented Dec 8, 2023

Thanks, looks good to me! I'll get this merged and released once #59 and #60 are done.

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.

None yet

2 participants