1 Deprecations

1.1 Introduction

This document lists all deprecated functionality in Erlang/OTP. For more information regarding the strategy regarding deprecations see the documentation of Support, Compatibility, Deprecations, and Removal.

1.2 otp 24

Erlang Distribution Without Large Node Container Support

Communication over the Erlang distribution without support for large node container data types (version 4) is as of OTP 24 deprecated and is scheduled for removal in OTP 26. That is, as of OTP 26, support for large node container data types will become mandatory.

Old Link Protocol

The old link protocol used when communicating over the Erlang distribution is as of OTP 24 deprecated and support for it is scheduled for removal in OTP 26. As of OTP 26, the new link protocol will become mandatory. That is, Erlang nodes will then refuse to connect to nodes not implementing the new link protocol. If you implement the Erlang distribution yourself, you are, however, encouraged to implement the new link protocol as soon as possible since the old protocol can cause links to enter an inconsistent state.

?NO_APP macro

The ?NO_APP macro in the edoc include file edoc_doclet.hrl has been deprecated.

Functions Deprecated in OTP 24

  • code:is_module_native/1 (HiPE has been removed)
  • disk_log:accessible_logs/0 (use disk_log:all/0 instead)
  • disk_log:lclose/1 (use disk_log:close/1 instead)
  • disk_log:lclose/2 (use disk_log:close/1 instead)
  • erlang:phash/2 (use erlang:phash2/2 instead)
  • ftp:start_service/1 (use ftp:open/2 instead)
  • ftp:stop_service/1 (use ftp:close/1 instead)
  • httpd_util:flatlength/1 (use erlang:iolist_size/1 instead)
  • httpd_util:hexlist_to_integer/1 (use erlang:list_to_integer/2 with base 16 instead)
  • httpd_util:integer_to_hexlist/1 (use erlang:integer_to_list/2 with base 16 instead)
  • httpd_util:strip/1 (use string:trim/1 instead)
  • httpd_util:suffix/1 (use filename:extension/1 and string:trim/2 instead)
  • public_key:ssh_decode/2 (use ssh_file:decode/2 instead)
  • public_key:ssh_encode/2 (use ssh_file:encode/2 instead)
  • public_key:ssh_hostkey_fingerprint/1 (use ssh:hostkey_fingerprint/1 instead)
  • public_key:ssh_hostkey_fingerprint/2 (use ssh:hostkey_fingerprint/2 instead)
  • zlib:adler32/2 (use erlang:adler32/1 instead)
  • zlib:adler32/3 (use erlang:adler32/2 instead)
  • zlib:adler32_combine/4 (use erlang:adler_combine/3 instead)
  • zlib:crc32/1 (use erlang:crc32/1 on the uncompressed data instead)
  • zlib:crc32/2 (use erlang:crc32/1 instead)
  • zlib:crc32/3 (use erlang:crc32/2 instead)
  • zlib:crc32_combine/4 (use erlang:crc32_combine/3 instead)
  • zlib:getBufSize/1 (this function will be removed in a future release)
  • zlib:inflateChunk/1 (use safeInflate/2 instead)
  • zlib:inflateChunk/2 (use safeInflate/2 instead)
  • zlib:setBufSize/2 (this function will be removed in a future release)

1.3 otp 23

Crypto Old API

The Old API is deprecated as of OTP 23 and has been removed in OTP 24.

For replacement functions see the New API.

http_uri

Since OTP 21 the recommended module to handle URIs is uri_string. The module http_uri does not provide a implementation that satisfies the RFC.

ssh

The public key algorithm 'ssh-rsa is regarded as insecure due to its usage of SHA1, and is therfore deprecated. It will not be available by default from OTP-24.

The public key algorithm 'ssh-dss is regarded as insecure due to its usage of SHA1 and its short key length, and is therfore deprecated. It is not available by default from OTP-23.

Distributed Disk Logs

As of OTP 23, the distributed disk_log feature has been deprecated and it has also been removed in OTP 24.

erl_interface registry

As of OTP 23, the registry functionality part of erl_interface has been deprecated and it has also been removed in OTP 24.

Functions Deprecated in OTP 23

  • filename:safe_relative_path/1 (use filelib:safe_relative_path/2 instead)
  • http_uri:decode/1 (use uri_string functions instead)
  • http_uri:encode/1 (use uri_string functions instead)
  • http_uri:parse/1 (use uri_string functions instead)
  • http_uri:parse/2 (use uri_string functions instead)
  • http_uri:scheme_defaults/0 (use uri_string functions instead)
  • httpd:parse_query/1 (use uri_string:dissect_query/1 instead)
  • snmpm:async_get/3 (use snmpm:async_get2/3 instead.)
  • snmpm:async_get/4 (use snmpm:async_get2/4 instead.)
  • snmpm:async_get/5 (use snmpm:async_get2/4 instead.)
  • snmpm:async_get/6 (use snmpm:async_get2/4 instead.)
  • snmpm:async_get_bulk/5 (use snmpm:async_get_bulk2/5 instead.)
  • snmpm:async_get_bulk/6 (use snmpm:async_get_bulk2/6 instead.)
  • snmpm:async_get_bulk/7 (use snmpm:async_get_bulk2/6 instead.)
  • snmpm:async_get_bulk/8 (use snmpm:async_get_bulk2/6 instead.)
  • snmpm:async_get_next/3 (use snmpm:async_get_next2/3 instead.)
  • snmpm:async_get_next/4 (use snmpm:async_get_next2/4 instead.)
  • snmpm:async_get_next/5 (use snmpm:async_get_next2/4 instead.)
  • snmpm:async_get_next/6 (use snmpm:async_get_next2/4 instead.)
  • snmpm:async_set/3 (use snmpm:async_set2/3 instead.)
  • snmpm:async_set/4 (use snmpm:async_set2/4 instead.)
  • snmpm:async_set/5 (use snmpm:async_set2/4 instead.)
  • snmpm:async_set/6 (use snmpm:async_set2/4 instead.)
  • snmpm:sync_get/3 (use snmpm:sync_get2/3 instead.)
  • snmpm:sync_get/4 (use snmpm:sync_get2/4 instead.)
  • snmpm:sync_get/5 (use snmpm:sync_get2/4 instead.)
  • snmpm:sync_get/6 (use snmpm:sync_get2/4 instead.)
  • snmpm:sync_get_bulk/5 (use snmpm:sync_get_bulk2/5 instead.)
  • snmpm:sync_get_bulk/6 (use snmpm:sync_get_bulk2/6 instead.)
  • snmpm:sync_get_bulk/7 (use snmpm:sync_get_bulk2/6 instead.)
  • snmpm:sync_get_bulk/8 (use snmpm:sync_get_bulk2/6 instead.)
  • snmpm:sync_get_next/3 (use snmpm:sync_get_next2/3 instead.)
  • snmpm:sync_get_next/4 (use snmpm:sync_get_next2/4 instead.)
  • snmpm:sync_get_next/5 (use snmpm:sync_get_next2/4 instead.)
  • snmpm:sync_get_next/6 (use snmpm:sync_get_next2/4 instead.)
  • snmpm:sync_set/3 (use snmpm:sync_set2/3 instead.)
  • snmpm:sync_set/4 (use snmpm:sync_set2/4 instead.)
  • snmpm:sync_set/5 (use snmpm:sync_set2/4 instead.)
  • snmpm:sync_set/6 (use snmpm:sync_set2/4 instead.)

1.4 otp 22

VxWorks Support

Some parts of OTP has had limited VxWorks support, such as for example erl_interface. This support is as of OTP 22 formally deprecated and has also been removed in OTP 23.

Legacy parts of erl_interface

The old legacy erl_interface library (functions with prefix erl_) is deprecated as of OTP 22. These parts of erl_interface has been informally deprecated for a very long time. You typically want to replace the usage of the erl_interface library with the use of the ei library which also is part of the erl_interface application. The old legacy erl_interface library has also been removed in OTP 23.

System Events

The format of "System Events" as defined in the man page for sys has been clarified and cleaned up. Due to this, code that relied on the internal badly documented previous (before this change) format of OTP's "System Events", needs to be changed.

In the wake of this the function sys:get_debug/3 that returns data with undocumented and internal format (and therefore is practically useless) has been deprecated, and a new function sys:get_log/1 has been added, that hopefully does what the deprecated function was intended for.

Functions Deprecated in OTP 22

  • net:broadcast/3 (use rpc:eval_everywhere/3 instead)
  • net:call/4 (use rpc:call/4 instead)
  • net:cast/4 (use rpc:cast/4 instead)
  • net:ping/1 (use net_adm:ping/1 instead)
  • net:relay/1 (use slave:relay/1 instead)
  • net:sleep/1 (use 'receive after T -> ok end' instead)
  • sys:get_debug/3 (incorrectly documented and only for internal use. Can often be replaced with sys:get_log/1)

1.5 otp 20

Functions Deprecated in OTP 20

  • crypto:rand_uniform/2 (use rand:uniform/1 instead)
  • gen_fsm:_/_ (use the 'gen_statem' module instead)

1.6 otp 19

SSL/TLS

For security reasons SSL-3.0 is no longer supported by default, but can be configured.

Functions Deprecated in OTP 19

  • code:rehash/0 (the code path cache feature has been removed)
  • queue:lait/1 (use queue:liat/1 instead)
  • random:_/_ (use the 'rand' module instead)

1.7 otp 18

erlang:now/0

New time functionality and a new time API was introduced. For more information see the Time and Time Correction chapter in the ERTS User's guide and specifically the Dos and Donts section on how to replace usage of erlang:now/0.

httpd_conf module

API functions in the module httpd_conf was deprecated in favor of standard modules such as lists, string, filelib, and erlang.

Functions Deprecated in OTP 18

  • erlang:now/0 (see the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information)

1.8 otp 16

Functions Deprecated in OTP 16

  • wxCalendarCtrl:enableYearChange/1 (not available in wxWidgets-2.9 and later)
  • wxCalendarCtrl:enableYearChange/2 (not available in wxWidgets-2.9 and later)

1.9 otp 12

inets - httpd Apache config files

A new config file format was introduced.

Functions Deprecated in OTP 12

  • auth:cookie/0 (use erlang:get_cookie/0 instead)
  • auth:cookie/1 (use erlang:set_cookie/2 instead)
  • auth:is_auth/1 (use net_adm:ping/1 instead)
  • auth:node_cookie/_ (use erlang:set_cookie/2 and net_adm:ping/1 instead)
  • calendar:local_time_to_universal_time/1 (use calendar:local_time_to_universal_time_dst/1 instead)

© 2010–2021 Ericsson AB
Licensed under the Apache License, Version 2.0.