Skip to content

Remove vendored try_call, use process.call instead#30

Open
GG-O-BP wants to merge 2 commits into
JonasGruenwald:mainfrom
GG-O-BP:issue-28-remove-try-call
Open

Remove vendored try_call, use process.call instead#30
GG-O-BP wants to merge 2 commits into
JonasGruenwald:mainfrom
GG-O-BP:issue-28-remove-try-call

Conversation

@GG-O-BP
Copy link
Copy Markdown
Contributor

@GG-O-BP GG-O-BP commented Mar 24, 2026

Replaced the vendored try_call with process.call directly in the chrome actor's quit, call, and listen_once functions, as discussed in #28.

ChromeAgentDown had no producer left after the change so I dropped it. Also updated the ChromeAgentTimeout comment since it's only used in polling now, not for actual actor timeouts those just panic. Fixed a stale try_await reference in do_poll while I was at it.

The code gets simpler since we no longer need CallError, map_call_error, or the vendored try_call/try_call_with_subject in the hot path.

Closes #28

Comment thread src/chrobot/chrome.gleam
process.send(browser, RemoveListener(event_subject))
call_response
|> result.map_error(map_call_error)
let assert Ok(event_data) = result
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I don't see a good reason to panic here, let's just return the result from process.receive

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.

Remove try_call

2 participants