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

webdriver might be part of public API #225

Open
davidpdrsn opened this issue Aug 7, 2023 · 1 comment
Open

webdriver might be part of public API #225

davidpdrsn opened this issue Aug 7, 2023 · 1 comment

Comments

@davidpdrsn
Copy link

I was watching your most recent stream where you mentioned that webdriver isn't part of fantoccini's public API. I have a little experimental tool called cargo-public-api-crates which can find crates your public API, so naturally, I ran it.

It found this for webdriver:

webdriver
├── webdriver::command::WebDriverCommand
│   └── src/session.rs:38:0
└── webdriver::command::VoidWebDriverExtensionCommand
    └── src/session.rs:38:0

That is this impl which does appear to contain types from webdriver.

I'm wondering if this is something you're aware of and if its a false positive in my tool, or if this impl actually does leak the webdriver version.

@jonhoo
Copy link
Owner

jonhoo commented Aug 20, 2023

Ah, interesting, your tool is entirely correct, that is a leak. The intent is for this impl to be a private impl of the trait, not a public one, but at the moment that's not a thing we can express. The way to fix this short-term is to add a private wrapper type for Wcmd and implement the trait for that instead, and then convert all the code that currently passes in Wcmds to issue_cmd to inject that wrapper type as well. It's pretty annoying, but it's what we'll have to do I suppose. Any chance you'd want to take a stab at that?

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

No branches or pull requests

2 participants