Skip to content

rpc: Remove deprecated catch#10837

Open
Maria-12648430 wants to merge 2 commits intoerlang:masterfrom
Maria-12648430:rpc_remove_deprecated_catch
Open

rpc: Remove deprecated catch#10837
Maria-12648430 wants to merge 2 commits intoerlang:masterfrom
Maria-12648430:rpc_remove_deprecated_catch

Conversation

@Maria-12648430
Copy link
Contributor

This PR removes all deprecated old-style catches from the rpc module. The test suite didn't contain any catches, but I fixed an export from call warning there.

More comments inline.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 11, 2026

CT Test Results

    2 files     74 suites   1h 9m 2s ⏱️
1 795 tests 1 376 ✅ 418 💤 1 ❌
2 047 runs  1 570 ✅ 476 💤 1 ❌

For more details on these failures, see this check.

Results for commit 2a82abd.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

Comment on lines -565 to -584
do_srv_call(Node, Request, infinity) ->
rpc_check(catch gen_server:call({?NAME,Node}, Request, infinity));
do_srv_call(Node, Request, Timeout) ->
Tag = make_ref(),
{Receiver,Mref} =
erlang:spawn_monitor(
fun() ->
%% Middleman process. Should be unsensitive to regular
%% exit signals.
process_flag(trap_exit, true),
Result = gen_server:call({?NAME,Node}, Request, Timeout),
exit({self(),Tag,Result})
end),
receive
{'DOWN',Mref,_,_,{Receiver,Tag,Result}} ->
rpc_check(Result);
{'DOWN',Mref,_,_,Reason} ->
%% The middleman code failed. Or someone did
%% exit(_, kill) on the middleman process => Reason==killed
rpc_check_t({'EXIT',Reason})
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This seems to be a leftover from OTP pre-24, where you needed a middleman process to defend against late replies.

@bjorng
Copy link
Contributor

bjorng commented Mar 13, 2026

@Maria-12648430

Thanks for all your work on getting rid of obsolete language constructs! It is much appreciated.

We are getting very close to RC2.

This PR will not make it into RC2 but we might consider it for inclusion in RC3, if we can determine that it is completely safe.

From now on we will concentrate on bug fixes and fixing failed test cases. We will not include any removals of old-style catch from application code for OTP 29. However, for another 2 or 3 three weeks, we can probably still accept removals of obsolete language constructs from test suites. (Note: I'm working on cleaning up the compiler test suite and plan to soon make a PR.)

@Maria-12648430
Copy link
Contributor Author

Thanks for all your work on getting rid of obsolete language constructs! It is much appreciated.

You're welcome 😺

We are getting very close to RC2.

This PR will not make it into RC2 but we might consider it for inclusion in RC3, if we can determine that it is completely safe.

No hurry 😉

Co-authored-by: Jan Uhlig <juhlig@hnc-agency.org>
@IngelaAndin IngelaAndin added the team:VM Assigned to OTP team VM label Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:VM Assigned to OTP team VM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants