From cf9cb7b33599ec2947121df48c588314c705de19 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 22 Feb 2024 12:47:01 +0100 Subject: [PATCH 1/2] Deprecate mnesia_registry functions It should have only been used by erl_interface and that functionality have been removed a long time ago. --- lib/mnesia/src/mnesia_registry.erl | 37 +++++++++++++--------------- system/doc/general_info/DEPRECATIONS | 6 +++++ 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/lib/mnesia/src/mnesia_registry.erl b/lib/mnesia/src/mnesia_registry.erl index d73d8c195140..ee6a56f35979 100644 --- a/lib/mnesia/src/mnesia_registry.erl +++ b/lib/mnesia/src/mnesia_registry.erl @@ -21,27 +21,16 @@ %% -module(mnesia_registry). -moduledoc """ -Dump support for registries in erl_interface. +This module is deprecated and the functions should not be used. -This module is usually part of the `erl_interface` application, but is currently -part of the Mnesia application. +This module was intended for internal use within OTP by the `erl_interface` application, +but it has two functions that are exported for public use. -This module is mainly intended for internal use within OTP, but it has two -functions that are exported for public use. - -On C-nodes, `erl_interface` has support for registry tables. These tables reside -in RAM on the C-node, but can also be dumped into Mnesia tables. By default, the -dumping of registry tables through `erl_interface` causes a corresponding Mnesia -table to be created with `mnesia_registry:create_table/1`, if necessary. - -Tables that are created with these functions can be administered as all other -Mnesia tables. They can be included in backups, replicas can be added, and so -on. The tables are normal Mnesia tables owned by the user of the corresponding -`erl_interface` registries. +Since the `erl_interface` have removed the registry functionality a long time ago, +these functions are deprecated. ## See Also - -[erl_interface(3)](`e:erl_interface:index.html`), `m:mnesia` + `m:mnesia` """. %%%---------------------------------------------------------------------- @@ -94,7 +83,9 @@ on. The tables are normal Mnesia tables owned by the user of the corresponding -export([start_dump/2, start_restore/2]). -export([create_table/1, create_table/2]). -%% Internal exports +-deprecated([{create_table, '_', "use mnesia:create_table/2 instead"}]). + +%% Internal exports -export([init/4]). -record(state, {table, ops = [], link_to}). @@ -169,7 +160,10 @@ start_restore(Tab, LinkTo) -> start(restore, Tab, LinkTo). -doc """ -create_table(Tab) -> ok | exit(Reason) +> #### Warning {: .warning } +> +> _This function is deprecated. Do not use it._ +> A wrapper function for `mnesia:create_table/2`, which creates a table (if there is no existing table) with an appropriate set of `attributes`. The table only @@ -187,7 +181,10 @@ create_table(Tab) -> create_table(Tab, [{Storage, [node()]}]). -doc """ -create_table(Tab, TabDef) -> ok | exit(Reason) +> #### Warning {: .warning } +> +> _This function is deprecated. Do not use it._ +> A wrapper function for `mnesia:create_table/2`, which creates a table (if there is no existing table) with an appropriate set of `attributes`. The attributes diff --git a/system/doc/general_info/DEPRECATIONS b/system/doc/general_info/DEPRECATIONS index d746d6927e54..8015dece1f6a 100644 --- a/system/doc/general_info/DEPRECATIONS +++ b/system/doc/general_info/DEPRECATIONS @@ -17,6 +17,12 @@ # is scheduled to be removed in OTP 25. # +# +# Added in OTP 27. +# + +mnesia_registry:create_table/_ since=27 remove=28 + # # Added in OTP 26. # From 5dec40a02344982bf717eec6f7cca2698e3dd1e6 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 22 Feb 2024 12:51:27 +0100 Subject: [PATCH 2/2] Update deprecations --- bootstrap/lib/stdlib/ebin/otp_internal.beam | Bin 6100 -> 6172 bytes lib/stdlib/src/otp_internal.erl | 2 ++ 2 files changed, 2 insertions(+) diff --git a/bootstrap/lib/stdlib/ebin/otp_internal.beam b/bootstrap/lib/stdlib/ebin/otp_internal.beam index 3d2bbf0f1b6e99287069c32eddaa40f4c795e731..753d84100826f34c7ae88d4ed15d7d807d7dc63b 100644 GIT binary patch delta 4292 zcmYk92|QK#`^WD=I(_R~xVW~sC@uD_WXUDFkUd#1UAv5(lw+xDE87)=Xj3U^TFgXL zmeHm~v}(+libf-;RR2s zyz{OiP>k9Tzm>;eEJ#Fk63FmhGqMB7#0ZHR2@xqZJ%Vi}3X55!odGPchPfUvClqES z!t`7iUIBTB;ns67xCaIeLceFw`yJc_B%m9RgswmeIs+zj0MgJN$UrL~3ps!VO@JKK z1M*N8C_rizP=qU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9-?3i_Fj_n;*Q4ci&Ju z5jOdBQ(2`UbKK*nWMOi@m}yZ;PR!}kb%P7E3U=82)?NSL?W4V@c-h!_k9k)H;#yw5 z6`udIv(pIuR?#l5>Z*RGMY={~w|{~D^;Y55)7=Kij|yzeg>Q?d{;HW6YYXUkS33LG z%Ixejmg$F3RNX(F-ln&Isp=II=$FJ_8R&dE)a~}OZFiLh)4hkUIi!4~c6(`(&w1m` zhYF~cRWZ8rTC;fRapxR2JV(oqTpV@|(VDfxcFu8Vyq)}9uHe#H9qqaGx4L-VT*=?B zYxsEfT-B=bRXU{p-RpHu`ICw*(dzeq6u%OuxW`N4*mlkRor0&o-^)@tR%(sSp*#C#SJ==yCj4am6n{|bx3(&cz{j^@ zK(1}pA`qPY5Y_OBTd2za)=%f=$n7ZmjPT@?_uVPp8I^*W2O_f<+G?0L2lvzly1d&p zK0MrMV{UET*Znf`WAM7qU+x8%G$(+u=iWE*Hg`1a#dEvb?mlCTX2rjFGcmi-Rj$;& zZs$ik^h(JkCgJ@_%ljs}{v&rwrZ$z2&!K8muc~J%KiVXJ!7o_-o6hQyODXk7;tn)U zDNiWR{(X;@N~w44`Hr|3!*5=cpOX(6SP(Uk=yGG*f1P@76GywcTB|=L z^t+MVeEQ{*mCy7)I2H~upYpAY6CZh;)%eSJ&Xo(%T^A=GW+w8keom=pg6!8zS5I2P z#%<_q>&Kd0LGZB;(BpeVX~zA)gb39{LC|NL>IWSA~r5kpFmVX;Dk) zhmR43nm00jN;oi>9(n(0veBHzi6728o~yG1N?JRO?R}*?3=pEs)}-M zTk$p5x*pq?OARvoO`BKql*Zf8=hgRGNB29KCnh+mF*>=eU7DVE4(V%VqgbK?6j)&Tsimi$vuqJ41 {removed, "this function has been removed"}; obsolete(auth, node_cookie, _) -> {deprecated, "use erlang:set_cookie/2 and net_adm:ping/1 instead"}; +obsolete(mnesia_registry, create_table, _) -> + {deprecated, "Use mnesia:create_table/2 instead", "OTP 28"}; obsolete(asn1ct, decode, _) -> {removed, "use Mod:decode/2 instead"}; obsolete(asn1ct, encode, _) ->