-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Refactor Sobek out of locator business logic
#5244
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Since we don't need/want Sobek in the business logic, it'd be great if you could move the option parsing to the mapping layer as well, like this. Maybe in a separate PR?
Sure, in another PR 👍 |
|
@inancgumus i explored moving the parse logic, but it's a lot of changes, and I'm not sure this strategy is quite the right one we should be doing. Instead of just moving the parse logic to the browser package, I think we should move the types and the parse logic to a new package, one that both common and browser can reference without cyclic dependency issues. It feels odd to have types in common, parse in browser. Part of what i explored also brought out the issue of having to refactor frame, page and elementHandle too so that I could remove the parse logic completely from the browser package, and not leave duplicates around. Again, a lot of work. I propose we think about this properly and set out a plan to enable us to refactor with a bit more ease and that everyone agrees on. For now, i've abandoned the plan to move the parse logic out into common. |
|
The We can also move parsing to another package if it becomes unwieldy. I can give another look at this myself. Maybe we're not talking about the same thing. |
What?
This moves the use of
Sobekinto the mapping layer forlocatorand away from the business logic.Why?
Separating the two will help make things clearer and might also prevent race conditions with Sobek.
Checklist
make check) and all pass.Checklist: Documentation (only for k6 maintainers and if relevant)
Please do not merge this PR until the following items are filled out.
Related PR(s)/Issue(s)
Closes: #4223