maxmindlin / scout-lang

A web crawling programming language
https://scout-lang.netlify.app
Apache License 2.0
110 stars 6 forks source link

Is possible to inline geckodriver? #5

Open linux-china opened 4 months ago

linux-china commented 4 months ago

For beginners, it's still some hard to try. You should install geckodriver command line and FireFox. Firefox is ok for developers and geckodriver is unfamiliar for most developers. Could Scout add geckodriver as dependency and inline geckodriver into Scout.

Stacktrace without geckodriver, not friendly for developers. Is possible to give hint to ask developers to install geckodriver.

$ scout scripts/demo.sct
thread 'main' panicked at /Users/user1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/scoutlang-0.6.0/src/main.rs:68:10:
error spinning up driver process: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Stacktrace without Firefox. Is possible to ask developers to install Firefox from https://www.mozilla.org/en-US/firefox/new/

❯ scout demo.sct
thread 'main' panicked at src/main.rs:90:10:
error starting browser: Failed(hyper::Error(Connect, ConnectError("tcp connect error", Os { code: 61, kind: ConnectionRefused, message: "Connection refused" })))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
maxmindlin commented 3 months ago

Hey @linux-china - yes I think including geckodriver and firefox in the install is a good idea and have always intended to do it, I just haven't decided on the best way to do so. I'm open to suggestions or PRs on this topic