檢視原始碼 已移除的功能

簡介

此文件列出 Erlang/OTP 中所有已移除的功能。關於移除策略的更多資訊,請參閱支援、相容性、棄用和移除文件。

OTP 27

Vanilla 驅動程式

已移除過時且未記錄的,透過將原子(或字串)作為 open_port() 的第一個參數來開啟外部資源端口的支援,此功能由 vanilla 驅動程式實作。此功能自 OTP 26 發佈以來,已排定於 OTP 27 中移除。

OTP 27 中已移除的函式

  • crypto:crypto_dyn_iv_init/3 (不支援,請改用 crypto:crypto_init/4)
  • crypto:crypto_dyn_iv_update/3 (不支援,請改用 crypto:crypto_update/2)
  • file:pid2name/1 (此功能不再支援)
  • zlib:adler32/2 (請改用 erlang:adler32/1)
  • zlib:adler32/3 (請改用 erlang:adler32/2)
  • zlib:adler32_combine/4 (請改用 erlang:adler_combine/3)
  • zlib:crc32/1 (請改在未壓縮的資料上使用 erlang:crc32/1)
  • zlib:crc32/2 (請改用 erlang:crc32/1)
  • zlib:crc32/3 (請改用 erlang:crc32/2)
  • zlib:crc32_combine/4 (請改用 erlang:crc32_combine/3)
  • zlib:getBufSize/1 (此函式已移除)
  • zlib:inflateChunk/1 (請改用 zlib:safeInflate/2)
  • zlib:inflateChunk/2 (請改用 zlib:safeInflate/2)
  • zlib:setBufSize/2 (此函式已移除)

OTP 26

不支援大型節點容器的 Erlang 分散式處理

在不支援大型節點容器資料類型(版本 4)的情況下,透過 Erlang 分散式處理進行通訊,已於 OTP 24 中棄用,並排定在 OTP 26 中移除。也就是說,從 OTP 26 開始,將強制支援大型節點容器資料類型。這也包括 term_to_binary()/term_to_iovec() 所產生的外部詞組格式。

透過 Erlang 分散式處理進行通訊時使用的舊連結協定,已於 OTP 24 中棄用,並排定在 OTP 26 中移除。從 OTP 26 開始,新的連結協定成為強制性的。也就是說,Erlang 節點將拒絕連線到未實作新連結協定的節點。

OTP 26 中已移除的函式

  • code:is_module_native/1 (已移除 HiPE)
  • code:rehash/0 (已移除程式碼路徑快取功能)
  • disk_log:accessible_logs/0 (請改用 disk_log:all/0)
  • disk_log:lclose/1 (請改用 disk_log:close/1)
  • disk_log:lclose/2 (請改用 disk_log:close/1)
  • erts_alloc_config:_/_ (此模組已於 OTP 26.0 移除)
  • ftp:start_service/1 (請改用 ftp:open/2)
  • ftp:stop_service/1 (請改用 ftp:close/1)
  • httpd_util:decode_hex/1 (請改用 uri_string:unquote 函式)
  • httpd_util:encode_hex/1 (請改用 uri_string:quote 函式)
  • httpd_util:flatlength/1 (請改用 erlang:iolist_size/1)
  • httpd_util:hexlist_to_integer/1 (請改用以 16 為底的 erlang:list_to_integer/2)
  • httpd_util:integer_to_hexlist/1 (請改用以 16 為底的 erlang:integer_to_list/2)
  • httpd_util:strip/1 (請改用 string:trim/1)
  • httpd_util:suffix/1 (請改用 filename:extension/1 和 string:trim/2)

OTP 26 中已移除的函式

  • code:is_module_native/1 (已移除 HiPE)
  • code:rehash/0 (已移除程式碼路徑快取功能)
  • disk_log:accessible_logs/0 (請改用 disk_log:all/0)
  • disk_log:lclose/1 (請改用 disk_log:close/1)
  • disk_log:lclose/2 (請改用 disk_log:close/1)
  • erts_alloc_config:_/_ (此模組已於 OTP 26.0 移除)
  • ftp:start_service/1 (請改用 ftp:open/2)
  • ftp:stop_service/1 (請改用 ftp:close/1)
  • httpd_util:decode_hex/1 (請改用 uri_string:unquote 函式)
  • httpd_util:encode_hex/1 (請改用 uri_string:quote 函式)
  • httpd_util:flatlength/1 (請改用 erlang:iolist_size/1)
  • httpd_util:hexlist_to_integer/1 (請改用以 16 為底的 erlang:list_to_integer/2)
  • httpd_util:integer_to_hexlist/1 (請改用以 16 為底的 erlang:integer_to_list/2)
  • httpd_util:strip/1 (請改用 string:trim/1)
  • httpd_util:suffix/1 (請改用 filename:extension/1 和 string:trim/2)

OTP 25

OTP 25 中已移除的函式

  • filename:safe_relative_path/1 (請改用 filelib:safe_relative_path/2)
  • http_uri:parse/1 (請改用 uri_string 函式)
  • http_uri:parse/2 (請改用 uri_string 函式)
  • http_uri:scheme_defaults/0 (請改用 uri_string 函式)
  • public_key:ssh_decode/2 (請改用 ssh_file:decode/2)
  • public_key:ssh_encode/2 (請改用 ssh_file:encode/2)
  • public_key:ssh_hostkey_fingerprint/1 (請改用 ssh:hostkey_fingerprint/1)
  • public_key:ssh_hostkey_fingerprint/2 (請改用 ssh:hostkey_fingerprint/2)

OTP 24

erl_interface 註冊表

erl_interfaceregistry 功能部分已於 OTP 23 中棄用,並於 OTP 24 中移除。

編譯以 Latin-1 編碼的 Erlang 檔案

Erlang 編譯器現在拒絕編譯以 Latin-1 編碼的原始程式碼檔案,除非檔案開頭有 %% coding: latin-1 註解。

syntax_tools 中的 igor 和 erl_tidy 模組

igorerl_tidy 模組已從 OTP 中移除,現在由其原始作者 Richard Carlsson 維護。它們可以在 github.com/richcarl/igorgithub.com/richcarl/erl_tidy 中找到。

分散式磁碟日誌

分散式 disk_log 功能已於 OTP 23 中棄用,並於 OTP 24 中移除。

舊的 Crypto API

舊的 API 已在 OTP 24 中移除。該支援已於 OTP 23 正式棄用。

關於替代函式,請參閱新的 API

Megaco 版本 3 編碼設定

預發佈版本 3 的編碼設定;prev3aprev3bprev3c 已在 OTP 24 中移除。請改用完整版本。

完整版本的(編碼)設定選項 {version3, 3} 仍將受到支援,即使不再需要以這種方式指定它。

OTP 24 中已移除的函式

  • crypto:block_decrypt/3 (請改用 crypto:crypto_one_time/4 或 crypto:crypto_init/3 + crypto:crypto_update/2 + crypto:crypto_final/1)
  • crypto:block_decrypt/4 (請改用 crypto:crypto_one_time/5、crypto:crypto_one_time_aead/6,7 或 crypto:crypto_init + crypto:crypto_update + crypto:crypto_final)
  • crypto:block_encrypt/3 (請改用 crypto:crypto_one_time/4 或 crypto:crypto_init/3 + crypto:crypto_update/2 + crypto:crypto_final/1)
  • crypto:block_encrypt/4 (請改用 crypto:crypto_one_time/5、crypto:crypto_one_time_aead/6,7 或 crypto:crypto_init + crypto:crypto_update + crypto:crypto_final)
  • crypto:cmac/3 (請改用 crypto:mac/4)
  • crypto:cmac/4 (請改用 crypto:macN/5)
  • crypto:hmac/3 (請改用 crypto:mac/4)
  • crypto:hmac/4 (請改用 crypto:macN/5)
  • crypto:hmac_final/1 (請改用 crypto:mac_final/1)
  • crypto:hmac_final_n/2 (請改用 crypto:mac_finalN/2)
  • crypto:hmac_init/2 (請改用 crypto:mac_init/3)
  • crypto:hmac_update/2 (請改用 crypto:mac_update/2)
  • crypto:next_iv/_ (請參閱 CRYPTO 使用者指南的「新舊 API」章節)
  • crypto:poly1305/2 (請改用 crypto:mac/3)
  • crypto:stream_decrypt/2 (請改用 crypto:crypto_update/2)
  • crypto:stream_encrypt/2 (請改用 crypto:crypto_update/2)
  • crypto:stream_init/_ (請改用 crypto:crypto_init/3 + crypto:crypto_update/2 + crypto:crypto_final/1 或 crypto:crypto_one_time/4)
  • filename:find_src/_ (請改用 filelib:find_source/1,3)
  • pg2:_/_ (此模組已於 OTP 24 中移除。請改用 'pg')
  • ssl:cipher_suites/0 (請改用 ssl:cipher_suites/2,3)
  • ssl:cipher_suites/1 (請改用 ssl:cipher_suites/2,3)
  • ssl:ssl_accept/_ (請改用 ssl:handshake/1,2,3)

OTP 23

VxWorks 支援

OTP 的某些部分(例如 erl_interface)具有有限的 VxWorks 支援。此支援已在 OTP 23 中移除。此有限支援已於 OTP 22 正式棄用。

erl_interface 的舊有部分

舊的 erl_interface 程式庫(前綴為 erl_ 的函式)已在 OTP 23 中移除。 erl_interface 的這些部分已經非正式棄用很長一段時間,並於 OTP 22 中正式棄用。您通常會希望將 erl_interface 程式庫的使用替換為 ei 程式庫的使用,該程式庫也是 erl_interface 應用程式的一部分。

httpd_conf 模組

名為 httpd_conf 模組中的 API 函式已被棄用,改用標準模組,例如 listsstringfileliberlang。自 OTP 18 起正式棄用。

inets - httpd Apache 設定檔

在 OTP 23 中移除了對 Apache 相容設定檔的支援。在 OTP 12 中引入了新的設定檔格式。

SSL/TLS

基於安全考量,已完全不再支援 SSL-3.0。

在 OTP 23 中移除的函式

  • erlang:get_stacktrace/0 (使用新的 try/catch 語法來擷取堆疊回溯)
  • httpd_conf:check_enum/2 (改用 lists:member/2)
  • httpd_conf:clean/1 (改用 string:strip/1 或可能的 re 模組)
  • httpd_conf:custom_clean/3 (改用 string:strip/1 或可能的 re 模組)
  • httpd_conf:is_directory/1 (改用 filelib:is_dir/1)
  • httpd_conf:is_file/1 (改用 filelib:is_file/1)
  • httpd_conf:make_integer/1 (改用 erlang:list_to_integer/1)

OTP 22

在 OTP 22 中移除的函式

  • os_mon_mib:_/_ (此模組已在 OTP 22.0 中移除)

OTP 20

在 OTP 20 中移除的函式

  • asn1ct:decode/_ (改用 Mod:decode/2)
  • asn1ct:encode/_ (改用 Mod:encode/2)
  • erlang:hash/2 (改用 erlang:phash2/2)
  • ssl:connection_info/1 (改用 ssl:connection_information/1,2)
  • ssl:negotiated_next_protocol/1 (改用 ssl:negotiated_protocol/1)

OTP 19

在 OTP 19 中移除的函式

  • core_lib:get_anno/1 (改用 cerl:get_ann/1)
  • core_lib:is_literal/1 (改用 cerl:is_literal/1)
  • core_lib:is_literal_list/1 (改用 cerl:is_literal_list/1)
  • core_lib:literal_value/1 (改用 cerl:concrete/1)
  • core_lib:set_anno/2 (改用 cerl:set_ann/2)
  • erl_lint:modify_line/2 (改用 erl_parse:map_anno/2)
  • erl_parse:get_attribute/2 (改用 erl_anno:{column,line,location,text}/1)
  • erl_parse:get_attributes/1 (改用 erl_anno:{column,line,location,text}/1)
  • erl_parse:set_line/2 (改用 erl_anno:set_line/2)
  • erl_scan:attributes_info/_ (改用 erl_anno:{column,line,location,text}/1)
  • erl_scan:set_attribute/3 (改用 erl_anno:set_line/2)
  • erl_scan:token_info/_ (改用 erl_scan:{category,column,line,location,symbol,text}/1)
  • rpc:safe_multi_server_call/2 (改用 rpc:multi_server_call/2)
  • rpc:safe_multi_server_call/3 (改用 rpc:multi_server_call/3)