From e66e6efb13fc1db958dbc2cc357c1be56b70fcf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 19 Sep 2023 08:33:46 +0200 Subject: [PATCH 1/6] Improve put_env/1 docs --- lib/elixir/lib/system.ex | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/elixir/lib/system.ex b/lib/elixir/lib/system.ex index 005c9cbc33e..912b17b77a3 100644 --- a/lib/elixir/lib/system.ex +++ b/lib/elixir/lib/system.ex @@ -755,9 +755,12 @@ defmodule System do Sets multiple environment variables. Sets a new value for each environment variable corresponding - to each `{key, value}` pair in `enum`. Keys are automatically - converted to strings, values are sent as is. `nil` values erase + to each `{key, value}` pair in `enum`. Keys and non-nil values + are automatically converted to charlists. `nil` values erase the given keys. + + Overall, this is a convenience wrapper around `put_env/2` and + `delete_env/2` with support for different key and value formats. """ @spec put_env(Enumerable.t()) :: :ok def put_env(enum) do From a6b68dd6844b6dfa1531a1c125bb163924a350d3 Mon Sep 17 00:00:00 2001 From: Eksperimental Date: Wed, 20 Sep 2023 02:16:13 -0500 Subject: [PATCH 2/6] Update Unicode to version 15.1.0 (#12947) This is an automated commit created by the Maintenance project https://github.com/eksperimental/maintenance Before merging, please read the release notes by visiting and assess if additional changes are necessary in the code base. Co-authored-by: Maintenance App --- lib/elixir/lib/string.ex | 2 +- lib/elixir/unicode/IdentifierType.txt | 13 ++-- lib/elixir/unicode/PropList.txt | 78 ++++++++++++++++++--- lib/elixir/unicode/PropertyValueAliases.txt | 38 +++++++++- lib/elixir/unicode/ScriptExtensions.txt | 47 +++++++------ lib/elixir/unicode/Scripts.txt | 14 ++-- lib/elixir/unicode/SpecialCasing.txt | 6 +- lib/elixir/unicode/UnicodeData.txt | 7 ++ lib/elixir/unicode/confusables.txt | 10 +-- lib/elixir/unicode/unicode.ex | 2 +- 10 files changed, 164 insertions(+), 53 deletions(-) diff --git a/lib/elixir/lib/string.ex b/lib/elixir/lib/string.ex index fce586bf70c..c5c15142aaf 100644 --- a/lib/elixir/lib/string.ex +++ b/lib/elixir/lib/string.ex @@ -18,7 +18,7 @@ defmodule String do "hello world" The functions in this module act according to - [The Unicode Standard, Version 15.0.0](http://www.unicode.org/versions/Unicode15.0.0/). + [The Unicode Standard, Version 15.1.0](http://www.unicode.org/versions/Unicode15.1.0/). ## Interpolation diff --git a/lib/elixir/unicode/IdentifierType.txt b/lib/elixir/unicode/IdentifierType.txt index f0293ac88ee..695156e6ad7 100644 --- a/lib/elixir/unicode/IdentifierType.txt +++ b/lib/elixir/unicode/IdentifierType.txt @@ -1,11 +1,11 @@ # IdentifierType.txt -# Date: 2022-08-26, 16:49:09 GMT -# © 2022 Unicode®, Inc. +# Date: 2023-08-11, 17:46:40 GMT +# © 2023 Unicode®, Inc. # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. # For terms of use, see https://www.unicode.org/terms_of_use.html # # Unicode Security Mechanisms for UTS #39 -# Version: 15.0.0 +# Version: 15.1.0 # # For documentation and usage, see https://www.unicode.org/reports/tr39 # @@ -576,10 +576,11 @@ FA27..FA29 ; Recommended # 1.1 [3] CJK COMPATIBILITY ID 2B740..2B81D ; Recommended # 6.0 [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D 2B820..2CEA1 ; Recommended # 8.0 [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 2CEB0..2EBE0 ; Recommended # 10.0 [7473] CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0 +2EBF0..2EE5D ; Recommended # 15.1 [622] CJK UNIFIED IDEOGRAPH-2EBF0..CJK UNIFIED IDEOGRAPH-2EE5D 30000..3134A ; Recommended # 13.0 [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A 31350..323AF ; Recommended # 15.0 [4192] CJK UNIFIED IDEOGRAPH-31350..CJK UNIFIED IDEOGRAPH-323AF -# Total code points: 112139 +# Total code points: 112761 # Identifier_Type: Inclusion @@ -1892,6 +1893,7 @@ A8F8..A8FA ; Obsolete Not_XID # 5.2 [3] DEVANAGARI SIGN PUSH 2E9B..2E9E ; Not_XID # 3.0 [4] CJK RADICAL CHOKE..CJK RADICAL DEATH 2EA0..2EF2 ; Not_XID # 3.0 [83] CJK RADICAL CIVILIAN..CJK RADICAL J-SIMPLIFIED TURTLE 2FF0..2FFB ; Not_XID # 3.0 [12] IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO RIGHT..IDEOGRAPHIC DESCRIPTION CHARACTER OVERLAID +2FFC..2FFF ; Not_XID # 15.1 [4] IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM RIGHT..IDEOGRAPHIC DESCRIPTION CHARACTER ROTATION 3001..3004 ; Not_XID # 1.1 [4] IDEOGRAPHIC COMMA..JAPANESE INDUSTRIAL STANDARD SYMBOL 3008..301D ; Not_XID # 1.1 [22] LEFT ANGLE BRACKET..REVERSED DOUBLE PRIME QUOTATION MARK 301F..3020 ; Not_XID # 1.1 [2] LOW DOUBLE PRIME QUOTATION MARK..POSTAL MARK FACE @@ -1903,6 +1905,7 @@ A8F8..A8FA ; Obsolete Not_XID # 5.2 [3] DEVANAGARI SIGN PUSH 3190..3191 ; Not_XID # 1.1 [2] IDEOGRAPHIC ANNOTATION LINKING MARK..IDEOGRAPHIC ANNOTATION REVERSE MARK 31C0..31CF ; Not_XID # 4.1 [16] CJK STROKE T..CJK STROKE N 31D0..31E3 ; Not_XID # 5.1 [20] CJK STROKE H..CJK STROKE Q +31EF ; Not_XID # 15.1 IDEOGRAPHIC DESCRIPTION CHARACTER SUBTRACTION 3248..324F ; Not_XID # 5.2 [8] CIRCLED NUMBER TEN ON BLACK SQUARE..CIRCLED NUMBER EIGHTY ON BLACK SQUARE A67E ; Not_XID # 5.1 CYRILLIC KAVYKA A720..A721 ; Not_XID # 5.0 [2] MODIFIER LETTER STRESS AND HIGH TONE..MODIFIER LETTER STRESS AND LOW TONE @@ -2136,7 +2139,7 @@ FFFD ; Not_XID # 1.1 REPLACEMENT CHARACTE 1FB00..1FB92 ; Not_XID # 13.0 [147] BLOCK SEXTANT-1..UPPER HALF INVERSE MEDIUM SHADE AND LOWER HALF BLOCK 1FB94..1FBCA ; Not_XID # 13.0 [55] LEFT HALF INVERSE MEDIUM SHADE AND RIGHT HALF BLOCK..WHITE UP-POINTING CHEVRON -# Total code points: 5699 +# Total code points: 5704 # Identifier_Type: Not_NFKC diff --git a/lib/elixir/unicode/PropList.txt b/lib/elixir/unicode/PropList.txt index b49d6460c16..777e8a28818 100644 --- a/lib/elixir/unicode/PropList.txt +++ b/lib/elixir/unicode/PropList.txt @@ -1,6 +1,6 @@ -# PropList-15.0.0.txt -# Date: 2022-08-05, 22:17:16 GMT -# © 2022 Unicode®, Inc. +# PropList-15.1.0.txt +# Date: 2023-08-01, 21:56:53 GMT +# © 2023 Unicode®, Inc. # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. # For terms of use, see https://www.unicode.org/terms_of_use.html # @@ -856,11 +856,12 @@ FA70..FAD9 ; Ideographic # Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COM 2B740..2B81D ; Ideographic # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D 2B820..2CEA1 ; Ideographic # Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 2CEB0..2EBE0 ; Ideographic # Lo [7473] CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0 +2EBF0..2EE5D ; Ideographic # Lo [622] CJK UNIFIED IDEOGRAPH-2EBF0..CJK UNIFIED IDEOGRAPH-2EE5D 2F800..2FA1D ; Ideographic # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D 30000..3134A ; Ideographic # Lo [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A 31350..323AF ; Ideographic # Lo [4192] CJK UNIFIED IDEOGRAPH-31350..CJK UNIFIED IDEOGRAPH-323AF -# Total code points: 105854 +# Total code points: 106476 # ================================================ @@ -1241,9 +1242,10 @@ E0020..E007F ; Other_Grapheme_Extend # Cf [96] TAG SPACE..CANCEL TAG # ================================================ 2FF0..2FF1 ; IDS_Binary_Operator # So [2] IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO RIGHT..IDEOGRAPHIC DESCRIPTION CHARACTER ABOVE TO BELOW -2FF4..2FFB ; IDS_Binary_Operator # So [8] IDEOGRAPHIC DESCRIPTION CHARACTER FULL SURROUND..IDEOGRAPHIC DESCRIPTION CHARACTER OVERLAID +2FF4..2FFD ; IDS_Binary_Operator # So [10] IDEOGRAPHIC DESCRIPTION CHARACTER FULL SURROUND..IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM LOWER RIGHT +31EF ; IDS_Binary_Operator # So IDEOGRAPHIC DESCRIPTION CHARACTER SUBTRACTION -# Total code points: 10 +# Total code points: 13 # ================================================ @@ -1253,6 +1255,12 @@ E0020..E007F ; Other_Grapheme_Extend # Cf [96] TAG SPACE..CANCEL TAG # ================================================ +2FFE..2FFF ; IDS_Unary_Operator # So [2] IDEOGRAPHIC DESCRIPTION CHARACTER HORIZONTAL REFLECTION..IDEOGRAPHIC DESCRIPTION CHARACTER ROTATION + +# Total code points: 2 + +# ================================================ + 2E80..2E99 ; Radical # So [26] CJK RADICAL REPEAT..CJK RADICAL RAP 2E9B..2EF3 ; Radical # So [89] CJK RADICAL CHOKE..CJK RADICAL C-SIMPLIFIED TURTLE 2F00..2FD5 ; Radical # So [214] KANGXI RADICAL ONE..KANGXI RADICAL FLUTE @@ -1275,10 +1283,11 @@ FA27..FA29 ; Unified_Ideograph # Lo [3] CJK COMPATIBILITY IDEOGRAPH-FA27..C 2B740..2B81D ; Unified_Ideograph # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D 2B820..2CEA1 ; Unified_Ideograph # Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 2CEB0..2EBE0 ; Unified_Ideograph # Lo [7473] CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0 +2EBF0..2EE5D ; Unified_Ideograph # Lo [622] CJK UNIFIED IDEOGRAPH-2EBF0..CJK UNIFIED IDEOGRAPH-2EE5D 30000..3134A ; Unified_Ideograph # Lo [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A 31350..323AF ; Unified_Ideograph # Lo [4192] CJK UNIFIED IDEOGRAPH-31350..CJK UNIFIED IDEOGRAPH-323AF -# Total code points: 97058 +# Total code points: 97680 # ================================================ @@ -1376,8 +1385,58 @@ AABB..AABC ; Logical_Order_Exception # Lo [2] TAI VIET VOWEL AUE..TAI VIET 0387 ; Other_ID_Continue # Po GREEK ANO TELEIA 1369..1371 ; Other_ID_Continue # No [9] ETHIOPIC DIGIT ONE..ETHIOPIC DIGIT NINE 19DA ; Other_ID_Continue # No NEW TAI LUE THAM DIGIT ONE +200C..200D ; Other_ID_Continue # Cf [2] ZERO WIDTH NON-JOINER..ZERO WIDTH JOINER +30FB ; Other_ID_Continue # Po KATAKANA MIDDLE DOT +FF65 ; Other_ID_Continue # Po HALFWIDTH KATAKANA MIDDLE DOT -# Total code points: 12 +# Total code points: 16 + +# ================================================ + +00B2..00B3 ; ID_Compat_Math_Continue # No [2] SUPERSCRIPT TWO..SUPERSCRIPT THREE +00B9 ; ID_Compat_Math_Continue # No SUPERSCRIPT ONE +2070 ; ID_Compat_Math_Continue # No SUPERSCRIPT ZERO +2074..2079 ; ID_Compat_Math_Continue # No [6] SUPERSCRIPT FOUR..SUPERSCRIPT NINE +207A..207C ; ID_Compat_Math_Continue # Sm [3] SUPERSCRIPT PLUS SIGN..SUPERSCRIPT EQUALS SIGN +207D ; ID_Compat_Math_Continue # Ps SUPERSCRIPT LEFT PARENTHESIS +207E ; ID_Compat_Math_Continue # Pe SUPERSCRIPT RIGHT PARENTHESIS +2080..2089 ; ID_Compat_Math_Continue # No [10] SUBSCRIPT ZERO..SUBSCRIPT NINE +208A..208C ; ID_Compat_Math_Continue # Sm [3] SUBSCRIPT PLUS SIGN..SUBSCRIPT EQUALS SIGN +208D ; ID_Compat_Math_Continue # Ps SUBSCRIPT LEFT PARENTHESIS +208E ; ID_Compat_Math_Continue # Pe SUBSCRIPT RIGHT PARENTHESIS +2202 ; ID_Compat_Math_Continue # Sm PARTIAL DIFFERENTIAL +2207 ; ID_Compat_Math_Continue # Sm NABLA +221E ; ID_Compat_Math_Continue # Sm INFINITY +1D6C1 ; ID_Compat_Math_Continue # Sm MATHEMATICAL BOLD NABLA +1D6DB ; ID_Compat_Math_Continue # Sm MATHEMATICAL BOLD PARTIAL DIFFERENTIAL +1D6FB ; ID_Compat_Math_Continue # Sm MATHEMATICAL ITALIC NABLA +1D715 ; ID_Compat_Math_Continue # Sm MATHEMATICAL ITALIC PARTIAL DIFFERENTIAL +1D735 ; ID_Compat_Math_Continue # Sm MATHEMATICAL BOLD ITALIC NABLA +1D74F ; ID_Compat_Math_Continue # Sm MATHEMATICAL BOLD ITALIC PARTIAL DIFFERENTIAL +1D76F ; ID_Compat_Math_Continue # Sm MATHEMATICAL SANS-SERIF BOLD NABLA +1D789 ; ID_Compat_Math_Continue # Sm MATHEMATICAL SANS-SERIF BOLD PARTIAL DIFFERENTIAL +1D7A9 ; ID_Compat_Math_Continue # Sm MATHEMATICAL SANS-SERIF BOLD ITALIC NABLA +1D7C3 ; ID_Compat_Math_Continue # Sm MATHEMATICAL SANS-SERIF BOLD ITALIC PARTIAL DIFFERENTIAL + +# Total code points: 43 + +# ================================================ + +2202 ; ID_Compat_Math_Start # Sm PARTIAL DIFFERENTIAL +2207 ; ID_Compat_Math_Start # Sm NABLA +221E ; ID_Compat_Math_Start # Sm INFINITY +1D6C1 ; ID_Compat_Math_Start # Sm MATHEMATICAL BOLD NABLA +1D6DB ; ID_Compat_Math_Start # Sm MATHEMATICAL BOLD PARTIAL DIFFERENTIAL +1D6FB ; ID_Compat_Math_Start # Sm MATHEMATICAL ITALIC NABLA +1D715 ; ID_Compat_Math_Start # Sm MATHEMATICAL ITALIC PARTIAL DIFFERENTIAL +1D735 ; ID_Compat_Math_Start # Sm MATHEMATICAL BOLD ITALIC NABLA +1D74F ; ID_Compat_Math_Start # Sm MATHEMATICAL BOLD ITALIC PARTIAL DIFFERENTIAL +1D76F ; ID_Compat_Math_Start # Sm MATHEMATICAL SANS-SERIF BOLD NABLA +1D789 ; ID_Compat_Math_Start # Sm MATHEMATICAL SANS-SERIF BOLD PARTIAL DIFFERENTIAL +1D7A9 ; ID_Compat_Math_Start # Sm MATHEMATICAL SANS-SERIF BOLD ITALIC NABLA +1D7C3 ; ID_Compat_Math_Start # Sm MATHEMATICAL SANS-SERIF BOLD ITALIC PARTIAL DIFFERENTIAL + +# Total code points: 13 # ================================================ @@ -1398,6 +1457,7 @@ AABB..AABC ; Logical_Order_Exception # Lo [2] TAI VIET VOWEL AUE..TAI VIET 1367..1368 ; Sentence_Terminal # Po [2] ETHIOPIC QUESTION MARK..ETHIOPIC PARAGRAPH SEPARATOR 166E ; Sentence_Terminal # Po CANADIAN SYLLABICS FULL STOP 1735..1736 ; Sentence_Terminal # Po [2] PHILIPPINE SINGLE PUNCTUATION..PHILIPPINE DOUBLE PUNCTUATION +17D4..17D5 ; Sentence_Terminal # Po [2] KHMER SIGN KHAN..KHMER SIGN BARIYOOSAN 1803 ; Sentence_Terminal # Po MONGOLIAN FULL STOP 1809 ; Sentence_Terminal # Po MONGOLIAN MANCHU FULL STOP 1944..1945 ; Sentence_Terminal # Po [2] LIMBU EXCLAMATION MARK..LIMBU QUESTION MARK @@ -1462,7 +1522,7 @@ FF61 ; Sentence_Terminal # Po HALFWIDTH IDEOGRAPHIC FULL STOP 1BC9F ; Sentence_Terminal # Po DUPLOYAN PUNCTUATION CHINOOK FULL STOP 1DA88 ; Sentence_Terminal # Po SIGNWRITING FULL STOP -# Total code points: 154 +# Total code points: 156 # ================================================ diff --git a/lib/elixir/unicode/PropertyValueAliases.txt b/lib/elixir/unicode/PropertyValueAliases.txt index 863301b1e19..240cd28c4cc 100644 --- a/lib/elixir/unicode/PropertyValueAliases.txt +++ b/lib/elixir/unicode/PropertyValueAliases.txt @@ -1,6 +1,6 @@ -# PropertyValueAliases-15.0.0.txt -# Date: 2022-08-05, 23:42:17 GMT -# © 2022 Unicode®, Inc. +# PropertyValueAliases-15.1.0.txt +# Date: 2023-08-07, 15:21:34 GMT +# © 2023 Unicode®, Inc. # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. # For terms of use, see https://www.unicode.org/terms_of_use.html # @@ -91,6 +91,7 @@ age; 12.1 ; V12_1 age; 13.0 ; V13_0 age; 14.0 ; V14_0 age; 15.0 ; V15_0 +age; 15.1 ; V15_1 age; NA ; Unassigned # Alphabetic (Alpha) @@ -208,6 +209,7 @@ blk; CJK_Ext_E ; CJK_Unified_Ideographs_Extension_E blk; CJK_Ext_F ; CJK_Unified_Ideographs_Extension_F blk; CJK_Ext_G ; CJK_Unified_Ideographs_Extension_G blk; CJK_Ext_H ; CJK_Unified_Ideographs_Extension_H +blk; CJK_Ext_I ; CJK_Unified_Ideographs_Extension_I blk; CJK_Radicals_Sup ; CJK_Radicals_Supplement blk; CJK_Strokes ; CJK_Strokes blk; CJK_Symbols ; CJK_Symbols_And_Punctuation @@ -817,6 +819,21 @@ IDSB; Y ; Yes ; T IDST; N ; No ; F ; False IDST; Y ; Yes ; T ; True +# IDS_Unary_Operator (IDSU) + +IDSU; N ; No ; F ; False +IDSU; Y ; Yes ; T ; True + +# ID_Compat_Math_Continue (ID_Compat_Math_Continue) + +ID_Compat_Math_Continue; N ; No ; F ; False +ID_Compat_Math_Continue; Y ; Yes ; T ; True + +# ID_Compat_Math_Start (ID_Compat_Math_Start) + +ID_Compat_Math_Start; N ; No ; F ; False +ID_Compat_Math_Start; Y ; Yes ; T ; True + # ID_Continue (IDC) IDC; N ; No ; F ; False @@ -836,6 +853,13 @@ IDS; Y ; Yes ; T Ideo; N ; No ; F ; False Ideo; Y ; Yes ; T ; True +# Indic_Conjunct_Break (InCB) + +InCB; Consonant ; Consonant +InCB; Extend ; Extend +InCB; Linker ; Linker +InCB; None ; None + # Indic_Positional_Category (InPC) InPC; Bottom ; Bottom @@ -1074,7 +1098,10 @@ jt ; U ; Non_Joining # Line_Break (lb) lb ; AI ; Ambiguous +lb ; AK ; Aksara lb ; AL ; Alphabetic +lb ; AP ; Aksara_Prebase +lb ; AS ; Aksara_Start lb ; B2 ; Break_Both lb ; BA ; Break_After lb ; BB ; Break_Before @@ -1112,6 +1139,8 @@ lb ; SA ; Complex_Context lb ; SG ; Surrogate lb ; SP ; Space lb ; SY ; Break_Symbols +lb ; VF ; Virama_Final +lb ; VI ; Virama lb ; WJ ; Word_Joiner lb ; XX ; Unknown lb ; ZW ; ZWSpace @@ -1156,6 +1185,9 @@ NFKC_QC; M ; Maybe NFKC_QC; N ; No NFKC_QC; Y ; Yes +# NFKC_Simple_Casefold (NFKC_SCF) + + # NFKD_Quick_Check (NFKD_QC) NFKD_QC; N ; No diff --git a/lib/elixir/unicode/ScriptExtensions.txt b/lib/elixir/unicode/ScriptExtensions.txt index 2f5a1727e33..23141fb8241 100644 --- a/lib/elixir/unicode/ScriptExtensions.txt +++ b/lib/elixir/unicode/ScriptExtensions.txt @@ -1,6 +1,6 @@ -# ScriptExtensions-15.0.0.txt -# Date: 2022-02-02, 00:57:11 GMT -# © 2022 Unicode®, Inc. +# ScriptExtensions-15.1.0.txt +# Date: 2023-02-01, 23:02:24 GMT +# © 2023 Unicode®, Inc. # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. # For terms of use, see https://www.unicode.org/terms_of_use.html # @@ -136,20 +136,20 @@ # ================================================ -# Script_Extensions=Arab Rohg +# Script_Extensions=Arab Nkoo -06D4 ; Arab Rohg # Po ARABIC FULL STOP +FD3E ; Arab Nkoo # Pe ORNATE LEFT PARENTHESIS +FD3F ; Arab Nkoo # Ps ORNATE RIGHT PARENTHESIS -# Total code points: 1 +# Total code points: 2 # ================================================ -# Script_Extensions=Arab Nkoo +# Script_Extensions=Arab Rohg -FD3E ; Arab Nkoo # Pe ORNATE LEFT PARENTHESIS -FD3F ; Arab Nkoo # Ps ORNATE RIGHT PARENTHESIS +06D4 ; Arab Rohg # Po ARABIC FULL STOP -# Total code points: 2 +# Total code points: 1 # ================================================ @@ -553,17 +553,17 @@ FF64..FF65 ; Bopo Hang Hani Hira Kana Yiii # Po [2] HALFWIDTH IDEOGRAPHIC C # ================================================ -# Script_Extensions=Beng Deva Gran Knda Nand Orya Telu Tirh +# Script_Extensions=Adlm Arab Mand Mani Ougr Phlp Rohg Sogd Syrc -1CF2 ; Beng Deva Gran Knda Nand Orya Telu Tirh # Lo VEDIC SIGN ARDHAVISARGA +0640 ; Adlm Arab Mand Mani Ougr Phlp Rohg Sogd Syrc # Lm ARABIC TATWEEL # Total code points: 1 # ================================================ -# Script_Extensions=Adlm Arab Mand Mani Ougr Phlp Rohg Sogd Syrc +# Script_Extensions=Beng Deva Gran Knda Mlym Nand Orya Sinh Telu Tirh -0640 ; Adlm Arab Mand Mani Ougr Phlp Rohg Sogd Syrc # Lm ARABIC TATWEEL +1CF2 ; Beng Deva Gran Knda Mlym Nand Orya Sinh Telu Tirh # Lo VEDIC SIGN ARDHAVISARGA # Total code points: 1 @@ -572,10 +572,9 @@ FF64..FF65 ; Bopo Hang Hani Hira Kana Yiii # Po [2] HALFWIDTH IDEOGRAPHIC C # Script_Extensions=Deva Dogr Gujr Guru Khoj Kthi Mahj Modi Sind Takr Tirh A836..A837 ; Deva Dogr Gujr Guru Khoj Kthi Mahj Modi Sind Takr Tirh # So [2] NORTH INDIC QUARTER MARK..NORTH INDIC PLACEHOLDER MARK -A838 ; Deva Dogr Gujr Guru Khoj Kthi Mahj Modi Sind Takr Tirh # Sc NORTH INDIC RUPEE MARK A839 ; Deva Dogr Gujr Guru Khoj Kthi Mahj Modi Sind Takr Tirh # So NORTH INDIC QUANTITY MARK -# Total code points: 4 +# Total code points: 3 # ================================================ @@ -587,6 +586,14 @@ A839 ; Deva Dogr Gujr Guru Khoj Kthi Mahj Modi Sind Takr Tirh # So # ================================================ +# Script_Extensions=Deva Dogr Gujr Guru Khoj Kthi Mahj Modi Shrd Sind Takr Tirh + +A838 ; Deva Dogr Gujr Guru Khoj Kthi Mahj Modi Shrd Sind Takr Tirh # Sc NORTH INDIC RUPEE MARK + +# Total code points: 1 + +# ================================================ + # Script_Extensions=Beng Deva Gran Gujr Guru Knda Latn Mlym Orya Shrd Taml Telu Tirh 0951 ; Beng Deva Gran Gujr Guru Knda Latn Mlym Orya Shrd Taml Telu Tirh # Mn DEVANAGARI STRESS SIGN UDATTA @@ -595,17 +602,17 @@ A839 ; Deva Dogr Gujr Guru Khoj Kthi Mahj Modi Sind Takr Tirh # So # ================================================ -# Script_Extensions=Deva Dogr Gujr Guru Khoj Knda Kthi Mahj Modi Nand Sind Takr Tirh +# Script_Extensions=Deva Dogr Gujr Guru Khoj Knda Kthi Mahj Modi Nand Shrd Sind Takr Tirh -A833..A835 ; Deva Dogr Gujr Guru Khoj Knda Kthi Mahj Modi Nand Sind Takr Tirh # No [3] NORTH INDIC FRACTION ONE SIXTEENTH..NORTH INDIC FRACTION THREE SIXTEENTHS +A833..A835 ; Deva Dogr Gujr Guru Khoj Knda Kthi Mahj Modi Nand Shrd Sind Takr Tirh # No [3] NORTH INDIC FRACTION ONE SIXTEENTH..NORTH INDIC FRACTION THREE SIXTEENTHS # Total code points: 3 # ================================================ -# Script_Extensions=Deva Dogr Gujr Guru Khoj Knda Kthi Mahj Mlym Modi Nand Sind Takr Tirh +# Script_Extensions=Deva Dogr Gujr Guru Khoj Knda Kthi Mahj Mlym Modi Nand Shrd Sind Takr Tirh -A830..A832 ; Deva Dogr Gujr Guru Khoj Knda Kthi Mahj Mlym Modi Nand Sind Takr Tirh # No [3] NORTH INDIC FRACTION ONE QUARTER..NORTH INDIC FRACTION THREE QUARTERS +A830..A832 ; Deva Dogr Gujr Guru Khoj Knda Kthi Mahj Mlym Modi Nand Shrd Sind Takr Tirh # No [3] NORTH INDIC FRACTION ONE QUARTER..NORTH INDIC FRACTION THREE QUARTERS # Total code points: 3 diff --git a/lib/elixir/unicode/Scripts.txt b/lib/elixir/unicode/Scripts.txt index 2b138bffb88..0b3f717cb20 100644 --- a/lib/elixir/unicode/Scripts.txt +++ b/lib/elixir/unicode/Scripts.txt @@ -1,6 +1,6 @@ -# Scripts-15.0.0.txt -# Date: 2022-04-26, 23:15:02 GMT -# © 2022 Unicode®, Inc. +# Scripts-15.1.0.txt +# Date: 2023-07-28, 16:01:07 GMT +# © 2023 Unicode®, Inc. # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. # For terms of use, see https://www.unicode.org/terms_of_use.html # @@ -357,7 +357,7 @@ 2E5B ; Common # Ps BOTTOM HALF LEFT PARENTHESIS 2E5C ; Common # Pe BOTTOM HALF RIGHT PARENTHESIS 2E5D ; Common # Pd OBLIQUE HYPHEN -2FF0..2FFB ; Common # So [12] IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO RIGHT..IDEOGRAPHIC DESCRIPTION CHARACTER OVERLAID +2FF0..2FFF ; Common # So [16] IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO RIGHT..IDEOGRAPHIC DESCRIPTION CHARACTER ROTATION 3000 ; Common # Zs IDEOGRAPHIC SPACE 3001..3003 ; Common # Po [3] IDEOGRAPHIC COMMA..DITTO MARK 3004 ; Common # So JAPANESE INDUSTRIAL STANDARD SYMBOL @@ -399,6 +399,7 @@ 3192..3195 ; Common # No [4] IDEOGRAPHIC ANNOTATION ONE MARK..IDEOGRAPHIC ANNOTATION FOUR MARK 3196..319F ; Common # So [10] IDEOGRAPHIC ANNOTATION TOP MARK..IDEOGRAPHIC ANNOTATION MAN MARK 31C0..31E3 ; Common # So [36] CJK STROKE T..CJK STROKE Q +31EF ; Common # So IDEOGRAPHIC DESCRIPTION CHARACTER SUBTRACTION 3220..3229 ; Common # No [10] PARENTHESIZED IDEOGRAPH ONE..PARENTHESIZED IDEOGRAPH TEN 322A..3247 ; Common # So [30] PARENTHESIZED IDEOGRAPH MOON..CIRCLED IDEOGRAPH KOTO 3248..324F ; Common # No [8] CIRCLED NUMBER TEN ON BLACK SQUARE..CIRCLED NUMBER EIGHTY ON BLACK SQUARE @@ -629,7 +630,7 @@ FFFC..FFFD ; Common # So [2] OBJECT REPLACEMENT CHARACTER..REPLACEMENT CHAR E0001 ; Common # Cf LANGUAGE TAG E0020..E007F ; Common # Cf [96] TAG SPACE..CANCEL TAG -# Total code points: 8301 +# Total code points: 8306 # ================================================ @@ -1593,11 +1594,12 @@ FA70..FAD9 ; Han # Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILI 2B740..2B81D ; Han # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D 2B820..2CEA1 ; Han # Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 2CEB0..2EBE0 ; Han # Lo [7473] CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0 +2EBF0..2EE5D ; Han # Lo [622] CJK UNIFIED IDEOGRAPH-2EBF0..CJK UNIFIED IDEOGRAPH-2EE5D 2F800..2FA1D ; Han # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D 30000..3134A ; Han # Lo [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A 31350..323AF ; Han # Lo [4192] CJK UNIFIED IDEOGRAPH-31350..CJK UNIFIED IDEOGRAPH-323AF -# Total code points: 98408 +# Total code points: 99030 # ================================================ diff --git a/lib/elixir/unicode/SpecialCasing.txt b/lib/elixir/unicode/SpecialCasing.txt index 08d04fa9421..de08450a6b9 100644 --- a/lib/elixir/unicode/SpecialCasing.txt +++ b/lib/elixir/unicode/SpecialCasing.txt @@ -1,6 +1,6 @@ -# SpecialCasing-15.0.0.txt -# Date: 2022-02-02, 23:35:52 GMT -# © 2022 Unicode®, Inc. +# SpecialCasing-15.1.0.txt +# Date: 2023-01-05, 20:35:03 GMT +# © 2023 Unicode®, Inc. # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. # For terms of use, see https://www.unicode.org/terms_of_use.html # diff --git a/lib/elixir/unicode/UnicodeData.txt b/lib/elixir/unicode/UnicodeData.txt index ea963a7162c..bdcc41850d7 100644 --- a/lib/elixir/unicode/UnicodeData.txt +++ b/lib/elixir/unicode/UnicodeData.txt @@ -11231,6 +11231,10 @@ 2FF9;IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM UPPER RIGHT;So;0;ON;;;;;N;;;;; 2FFA;IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM LOWER LEFT;So;0;ON;;;;;N;;;;; 2FFB;IDEOGRAPHIC DESCRIPTION CHARACTER OVERLAID;So;0;ON;;;;;N;;;;; +2FFC;IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM RIGHT;So;0;ON;;;;;N;;;;; +2FFD;IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM LOWER RIGHT;So;0;ON;;;;;N;;;;; +2FFE;IDEOGRAPHIC DESCRIPTION CHARACTER HORIZONTAL REFLECTION;So;0;ON;;;;;N;;;;; +2FFF;IDEOGRAPHIC DESCRIPTION CHARACTER ROTATION;So;0;ON;;;;;N;;;;; 3000;IDEOGRAPHIC SPACE;Zs;0;WS; 0020;;;;N;;;;; 3001;IDEOGRAPHIC COMMA;Po;0;ON;;;;;N;;;;; 3002;IDEOGRAPHIC FULL STOP;Po;0;ON;;;;;N;IDEOGRAPHIC PERIOD;;;; @@ -11705,6 +11709,7 @@ 31E1;CJK STROKE HZZZG;So;0;ON;;;;;N;;;;; 31E2;CJK STROKE PG;So;0;ON;;;;;N;;;;; 31E3;CJK STROKE Q;So;0;ON;;;;;N;;;;; +31EF;IDEOGRAPHIC DESCRIPTION CHARACTER SUBTRACTION;So;0;ON;;;;;N;;;;; 31F0;KATAKANA LETTER SMALL KU;Lo;0;L;;;;;N;;;;; 31F1;KATAKANA LETTER SMALL SI;Lo;0;L;;;;;N;;;;; 31F2;KATAKANA LETTER SMALL SU;Lo;0;L;;;;;N;;;;; @@ -34035,6 +34040,8 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; 2CEA1;;Lo;0;L;;;;;N;;;;; 2CEB0;;Lo;0;L;;;;;N;;;;; 2EBE0;;Lo;0;L;;;;;N;;;;; +2EBF0;;Lo;0;L;;;;;N;;;;; +2EE5D;;Lo;0;L;;;;;N;;;;; 2F800;CJK COMPATIBILITY IDEOGRAPH-2F800;Lo;0;L;4E3D;;;;N;;;;; 2F801;CJK COMPATIBILITY IDEOGRAPH-2F801;Lo;0;L;4E38;;;;N;;;;; 2F802;CJK COMPATIBILITY IDEOGRAPH-2F802;Lo;0;L;4E41;;;;N;;;;; diff --git a/lib/elixir/unicode/confusables.txt b/lib/elixir/unicode/confusables.txt index 327a5f324e3..cf73eca009c 100644 --- a/lib/elixir/unicode/confusables.txt +++ b/lib/elixir/unicode/confusables.txt @@ -1,11 +1,11 @@ # confusables.txt -# Date: 2022-08-26, 16:49:08 GMT -# © 2022 Unicode®, Inc. +# Date: 2023-08-11, 17:46:40 GMT +# © 2023 Unicode®, Inc. # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. # For terms of use, see https://www.unicode.org/terms_of_use.html # # Unicode Security Mechanisms for UTS #39 -# Version: 15.0.0 +# Version: 15.1.0 # # For documentation and usage, see https://www.unicode.org/reports/tr39 # @@ -349,8 +349,8 @@ A4FA ; 002E 002E ; MA # ( ꓺ → .. ) LISU LETTER TONE MYA CYA → FULL STOP, F A6F4 ; A6F3 A6F3 ; MA #* ( ꛴ → ꛳꛳ ) BAMUM COLON → BAMUM FULL STOP, BAMUM FULL STOP # -30FB ; 00B7 ; MA #* ( ・ → · ) KATAKANA MIDDLE DOT → MIDDLE DOT # →•→ -FF65 ; 00B7 ; MA #* ( ・ → · ) HALFWIDTH KATAKANA MIDDLE DOT → MIDDLE DOT # →•→ +30FB ; 00B7 ; MA # ( ・ → · ) KATAKANA MIDDLE DOT → MIDDLE DOT # →•→ +FF65 ; 00B7 ; MA # ( ・ → · ) HALFWIDTH KATAKANA MIDDLE DOT → MIDDLE DOT # →•→ 16EB ; 00B7 ; MA #* ( ᛫ → · ) RUNIC SINGLE PUNCTUATION → MIDDLE DOT # 0387 ; 00B7 ; MA # ( · → · ) GREEK ANO TELEIA → MIDDLE DOT # 2E31 ; 00B7 ; MA #* ( ⸱ → · ) WORD SEPARATOR MIDDLE DOT → MIDDLE DOT # diff --git a/lib/elixir/unicode/unicode.ex b/lib/elixir/unicode/unicode.ex index 7cd5c0fb80f..f43d29ae85b 100644 --- a/lib/elixir/unicode/unicode.ex +++ b/lib/elixir/unicode/unicode.ex @@ -150,7 +150,7 @@ case_ignorable_categories = :binary.compile_pattern(["Mn", "Me", "Cf", "Lm", "Sk defmodule String.Unicode do @moduledoc false - def version, do: {15, 0, 0} + def version, do: {15, 1, 0} [unconditional_mappings, _conditional_mappings] = Path.join(__DIR__, "SpecialCasing.txt") From 6c1138d6f598e4f1a56c8484ad1949ca87233670 Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Wed, 20 Sep 2023 10:24:17 +0200 Subject: [PATCH 3/6] Improve Windows Installer (#12945) 1. If we couldn't verify installed OTP, don't quit but let user proceed with installing just Elixir 2. When checking installed OTPs, pick the recent most installed. Previously we were picking the first one which was basically guaranteed to be too old. 3. If we find an existing Elixir installation but it doesn't match the OTP version, offer to download the OTP version this Elixir installer was compiled against (which usually would be the newer version) 4. Add "Verify Erlang/OTP" button which re-checks for installed OTP. Closes #12678. --- .../scripts/windows_installer/installer.nsi | 124 +++++++++++++----- 1 file changed, 94 insertions(+), 30 deletions(-) diff --git a/lib/elixir/scripts/windows_installer/installer.nsi b/lib/elixir/scripts/windows_installer/installer.nsi index 945326007df..a9e8495ea67 100644 --- a/lib/elixir/scripts/windows_installer/installer.nsi +++ b/lib/elixir/scripts/windows_installer/installer.nsi @@ -12,10 +12,18 @@ InstallDir "$PROGRAMFILES64\Elixir" Page custom CheckOTPPageShow CheckOTPPageLeave -var Dialog -var DownloadOTPLink var InstalledOTPRelease var OTPPath + +var Dialog +var NoOTPLabel +var NoOTPLabelCreated +var OTPMismatchLabel +var OTPMismatchLabelCreated +var DownloadOTPLink +var DownloadOTPLinkCreated +var VerifyOTPButton +var VerifyOTPButtonCreated Function CheckOTPPageShow !insertmacro MUI_HEADER_TEXT "Checking Erlang/OTP" "" @@ -26,15 +34,61 @@ Function CheckOTPPageShow Abort ${EndIf} - EnumRegKey $0 HKLM "SOFTWARE\WOW6432NODE\Ericsson\Erlang" 0 - ReadRegStr $0 HKLM "SOFTWARE\WOW6432NODE\Ericsson\Erlang\$0" "" - StrCpy $OTPPath $0 + Call VerifyOTP - ${If} $OTPPath == "" - ${NSD_CreateLabel} 0 0 100% 20u "Couldn't find existing Erlang/OTP installation. Click the link below to download and install it before proceeding." - ${NSD_CreateLink} 0 25u 100% 20u "Download Erlang/OTP ${OTP_RELEASE}" + nsDialogs::Show +FunctionEnd + +Function VerifyOTP + ${If} $NoOTPLabelCreated == "true" + ShowWindow $NoOTPLabel ${SW_HIDE} + ${EndIf} + + ${If} $OTPMismatchLabelCreated == "true" + ShowWindow $OTPMismatchLabel ${SW_HIDE} + ${EndIf} + + ${If} $DownloadOTPLinkCreated == "true" + ShowWindow $DownloadOTPLink ${SW_HIDE} + ${Else} + StrCpy $DownloadOTPLinkCreated "true" + ${NSD_CreateLink} 0 60u 100% 20u "Download Erlang/OTP ${OTP_RELEASE}" Pop $DownloadOTPLink ${NSD_OnClick} $DownloadOTPLink OpenOTPDownloads + ShowWindow $DownloadOTPLink ${SW_HIDE} + ${EndIf} + + ${If} $VerifyOTPButtonCreated == "true" + ShowWindow $VerifyOTPButton ${SW_HIDE} + ${Else} + StrCpy $VerifyOTPButtonCreated "true" + ${NSD_CreateButton} 0 80u 25% 12u "Verify Erlang/OTP" + Pop $VerifyOTPButton + ${NSD_OnClick} $VerifyOTPButton VerifyOTP + ShowWindow $VerifyOTPButton ${SW_HIDE} + ${EndIf} + + StrCpy $0 0 + loop: + EnumRegKey $1 HKLM "SOFTWARE\WOW6432NODE\Ericsson\Erlang" $0 + StrCmp $1 "" done + ReadRegStr $1 HKLM "SOFTWARE\WOW6432NODE\Ericsson\Erlang\$1" "" + StrCpy $OTPPath $1 + IntOp $0 $0 + 1 + goto loop + done: + + ${If} $OTPPath == "" + ${If} $NoOTPLabelCreated != "true" + StrCpy $NoOTPLabelCreated "true" + ${NSD_CreateLabel} 0 0 100% 20u "Couldn't find existing Erlang/OTP installation. Click the link below to download and install it before proceeding." + Pop $NoOTPLabel + ${EndIf} + + ShowWindow $NoOTPLabel ${SW_SHOW} + ShowWindow $DownloadOTPLink ${SW_SHOW} + ShowWindow $VerifyOTPButton ${SW_SHOW} + ${Else} nsExec::ExecToStack `$OTPPath\bin\erl.exe -noinput -eval "\ io:put_chars(erlang:system_info(otp_release)),\ @@ -45,24 +99,25 @@ Function CheckOTPPageShow ${If} $0 == 0 StrCpy $InstalledOTPRelease $1 ${If} $InstalledOTPRelease == ${OTP_RELEASE} - ${NSD_CreateLabel} 0 0 100% 20u "Found existing Erlang/OTP $InstalledOTPRelease installation at $OTPPath. Please proceed." - ${ElseIf} $2 < ${OTP_RELEASE} - ${NSD_CreateLabel} 0 0 100% 30u "Found existing Erlang/OTP $InstalledOTPRelease installation at $OTPPath but this Elixir installer was precompiled for Erlang/OTP ${OTP_RELEASE}. \ - We recommend checking if there is an Elixir version precompiled for Erlang/OTP $InstalledOTPRelease. Otherwise, proceed." + ${NSD_CreateLabel} 0 0 100% 60u "Found existing Erlang/OTP $InstalledOTPRelease installation at $OTPPath. Please proceed." + ${Else} - SetErrorlevel 5 - MessageBox MB_ICONSTOP "Found existing Erlang/OTP $InstalledOTPRelease installation at $OTPPath but this Elixir version was precompiled for Erlang/OTP ${OTP_RELEASE}. \ - Please upgrade your Erlang/OTP version or choose an Elixir installer matching your Erlang/OTP version" - Quit + ${If} $OTPMismatchLabelCreated != "true" + StrCpy $OTPMismatchLabelCreated "true" + ${NSD_CreateLabel} 0 0 100% 60u "Found existing Erlang/OTP $InstalledOTPRelease installation at $OTPPath but this Elixir installer was precompiled for Erlang/OTP ${OTP_RELEASE}. \ + $\r$\n$\r$\nYou can either search for another Elixir installer precompiled for Erlang/OTP $InstalledOTPRelease or download Erlang/OTP ${OTP_RELEASE} and install before proceeding." + Pop $OTPMismatchLabel + ${EndIf} + + ShowWindow $OTPMismatchLabel ${SW_SHOW} + ShowWindow $DownloadOTPLink ${SW_SHOW} + ShowWindow $VerifyOTPButton ${SW_SHOW} ${EndIf} ${Else} SetErrorlevel 5 MessageBox MB_ICONSTOP "Found existing Erlang/OTP installation at $OTPPath but checking it exited with $0: $1" - Quit ${EndIf} ${EndIf} - - nsDialogs::Show FunctionEnd Function OpenOTPDownloads @@ -93,15 +148,18 @@ Function FinishPageShow Abort ${EndIf} - ${NSD_CreateCheckbox} 0 0 195u 10u "&Add $INSTDIR\bin to %PATH%" - Pop $AddElixirToPathCheckbox - SendMessage $AddElixirToPathCheckbox ${BM_SETCHECK} ${BST_CHECKED} 0 + ; we add to PATH using erlang, so there must be an OTP installed to do so. + ${If} "$OTPPath" != "" + ${NSD_CreateCheckbox} 0 0 195u 10u "&Add $INSTDIR\bin to %PATH%" + Pop $AddElixirToPathCheckbox + SendMessage $AddElixirToPathCheckbox ${BM_SETCHECK} ${BST_CHECKED} 0 + + ${NSD_CreateCheckbox} 0 20u 195u 10u "&Add $OTPPath\bin to %PATH%" + Pop $AddOTPToPathCheckbox + SendMessage $AddOTPToPathCheckbox ${BM_SETCHECK} ${BST_CHECKED} 0 - EnumRegKey $0 HKLM "SOFTWARE\WOW6432NODE\Ericsson\Erlang" 0 - ReadRegStr $0 HKLM "SOFTWARE\WOW6432NODE\Ericsson\Erlang\$0" "" - ${NSD_CreateCheckbox} 0 20u 195u 10u "&Add $0\bin to %PATH%" - Pop $AddOTPToPathCheckbox - SendMessage $AddOTPToPathCheckbox ${BM_SETCHECK} ${BST_CHECKED} 0 + ${NSD_CreateLabel} 0 40u 100% 20u "Note: you need to restart your shell for the environment variable changes to take effect." + ${EndIf} nsDialogs::Show FunctionEnd @@ -145,9 +203,15 @@ var RemoveElixirFromPathCheckbox Function un.FinishPageShow !insertmacro MUI_HEADER_TEXT "Remove from %PATH%" "" - EnumRegKey $0 HKLM "SOFTWARE\WOW6432NODE\Ericsson\Erlang" 0 - ReadRegStr $0 HKLM "SOFTWARE\WOW6432NODE\Ericsson\Erlang\$0" "" - StrCpy $OTPPath $0 + StrCpy $0 0 + loop: + EnumRegKey $1 HKLM "SOFTWARE\WOW6432NODE\Ericsson\Erlang" $0 + StrCmp $1 "" done + ReadRegStr $1 HKLM "SOFTWARE\WOW6432NODE\Ericsson\Erlang\$1" "" + StrCpy $OTPPath $1 + IntOp $0 $0 + 1 + goto loop + done: nsDialogs::Create 1018 Pop $Dialog From 4e96f92d1e042e93d3f998646d0cb0d6df8d02fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 20 Sep 2023 10:59:43 +0200 Subject: [PATCH 4/6] Update CHANGELOG --- CHANGELOG.md | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bda22966f3..ca7bf0e2b92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,18 +1,97 @@ # Changelog for Elixir v1.16 +## Code snippets in diagnostics + +Elixir v1.15 introduced a new compiler diagnostic format and the ability to print multiple error diagnostics per compilation (in addition to multiple warnings). + +With Elixir v1.16, we also include code snippets in exceptions and diagnostics raised by the compiler. For example, a syntax error now includes a pointer to where the error happened: + +``` +** (SyntaxError) invalid syntax found on nofile:1:17: + error: syntax error before: '*' + │ + 1 │ [1, 2, 3, 4, 5, *] + │ ^ + │ + └─ lib/my_app.ex:1:17 +``` + +For mismatched delimiters, it now shows both delimiters: + +``` +** (MismatchedDelimiterError) mismatched delimiter found on nofile:1:18: + error: unexpected token: ) + │ + 1 │ [1, 2, 3, 4, 5, 6) + │ │ └ mismatched closing delimiter (expected "]") + │ └ unclosed delimiter + │ + └─ lib/my_app.ex:1:18 +``` + +Errors and warnings diagnostics also include code snippets. When possible, we will show precise spans, such as on undefined variables: + +``` + error: undefined variable "unknown_var" + │ +5 │ a - unknown_var + │ ^^^^^^^^^^^ + │ + └─ lib/sample.ex:5:9: Sample.foo/1 +``` + +Otherwise the whole line is underlined: + +``` +error: function names should start with lowercase characters or underscore, invalid name CamelCase + │ +3 │ def CamelCase do + │ ^^^^^^^^^^^^^^^^ + │ + └─ lib/sample.ex:3 +``` + +## Revamped documentation + +TODO: Guides, diagrams, anti-patterns, cheatsheets. + ## v1.16.0-dev ### 1. Enhancements +#### EEx + + * [EEx] Include relative file information in diagnostics + +#### Elixir + + * [Code] Automatically include columns in parsing options + * [Code] Introduce `MismatchedDelimiterError` for handling mismatched delimiter exceptions + * [Code.Fragment] Handle anonymous calls in fragments + * [Kernel] Suggest module names based on suffix and casing errors when the module does not exist in `UndefinedFunctionError` + * [Kernel.ParallelCompiler] Introduce `Kernel.ParallelCompiler.pmap/2` to compile multiple additional entries in parallel + * [Macro] Add `Macro.compile_apply/4` + * [String] Update to Unicode 15.1.0 + ### 2. Bug fixes #### Elixir * [IO] Raise when using `IO.binwrite/2` on terminated device (mirroring `IO.write/2`) + * [Kernel] Do not expand aliases recursively (the alias stored in Macro.Env is already expanded) + * [Kernel] Ensure `dbg` module is a compile-time dependency + * [Kernel] Warn when a private function or macro uses `unquote/1` and the function/macro itself is unused * [Path] Ensure `Path.relative_to/2` returns a relative path when the given argument does not share a common prefix with `cwd` +#### ExUnit + + * [ExUnit] Raise on incorrectly dedented doctests + ### 3. Soft deprecations (no warnings emitted) +#### Elixir + + * [Kernel.ParallelCompiler] Deprecate `Kernel.ParallelCompiler.async/1` in favor of `Kernel.ParallelCompiler.pmap/2` * [Path] Deprecate `Path.safe_relative_to/2` in favor of `Path.safe_relative/2` ### 4. Hard deprecations From d1014500e88a4309e541191a26ef95b39513817c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 20 Sep 2023 13:00:34 +0200 Subject: [PATCH 5/6] Optimize Enum.random/1 for ranges --- lib/elixir/lib/enum.ex | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/lib/elixir/lib/enum.ex b/lib/elixir/lib/enum.ex index 6bf0be23277..eeb6737c59d 100644 --- a/lib/elixir/lib/enum.ex +++ b/lib/elixir/lib/enum.ex @@ -2390,7 +2390,14 @@ defmodule Enum do def random(enumerable) when is_list(enumerable) do case length(enumerable) do 0 -> raise Enum.EmptyError - length -> enumerable |> drop_list(random_integer(0, length - 1)) |> hd() + length -> enumerable |> drop_list(random_count(length)) |> hd() + end + end + + def random(first.._//step = range) do + case Range.size(range) do + 0 -> raise Enum.EmptyError + size -> first + random_count(size) * step end end @@ -2401,14 +2408,14 @@ defmodule Enum do [] {:ok, count, fun} when is_function(fun, 1) -> - slice_list(fun.(enumerable), random_integer(0, count - 1), 1, 1) + slice_list(fun.(enumerable), random_count(count), 1, 1) # TODO: Deprecate me in Elixir v1.18. {:ok, count, fun} when is_function(fun, 2) -> - fun.(random_integer(0, count - 1), 1) + fun.(random_count(count), 1) {:ok, count, fun} when is_function(fun, 3) -> - fun.(random_integer(0, count - 1), 1, 1) + fun.(random_count(count), 1, 1) {:error, _} -> take_random(enumerable, 1) @@ -2420,6 +2427,10 @@ defmodule Enum do end end + defp random_count(count) do + :rand.uniform(count) - 1 + end + @doc """ Invokes `fun` for each element in the `enumerable` with the accumulator. @@ -3609,7 +3620,7 @@ defmodule Enum do sample = Tuple.duplicate(nil, count) reducer = fn elem, {idx, sample} -> - jdx = random_integer(0, idx) + jdx = random_index(idx) cond do idx < count -> @@ -3630,7 +3641,7 @@ defmodule Enum do def take_random(enumerable, count) when is_integer(count) and count >= 0 do reducer = fn elem, {idx, sample} -> - jdx = random_integer(0, idx) + jdx = random_index(idx) cond do idx < count -> @@ -3666,6 +3677,9 @@ defmodule Enum do defp take_random_list_one([], current, _), do: [current] + defp random_index(0), do: 0 + defp random_index(idx), do: :rand.uniform(idx + 1) - 1 + @doc """ Takes the elements from the beginning of the `enumerable` while `fun` returns a truthy value. @@ -4149,18 +4163,6 @@ defmodule Enum do end) end - defp random_integer(limit, limit) when is_integer(limit) do - limit - end - - defp random_integer(lower_limit, upper_limit) when upper_limit < lower_limit do - random_integer(upper_limit, lower_limit) - end - - defp random_integer(lower_limit, upper_limit) do - lower_limit + :rand.uniform(upper_limit - lower_limit + 1) - 1 - end - ## Implementations ## all?/1 From 1ecdd2d736e1253545fdc4cdda831597eff72b57 Mon Sep 17 00:00:00 2001 From: Lucas Francisco da Matta Vegi Date: Thu, 21 Sep 2023 07:56:37 -0300 Subject: [PATCH 6/6] "Using application configuration for libraries" added (Anti-patterns documentation) (#12944) --- .../anti-patterns/design-anti-patterns.md | 57 ++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/lib/elixir/pages/anti-patterns/design-anti-patterns.md b/lib/elixir/pages/anti-patterns/design-anti-patterns.md index 5e955ce0327..c866062ac3e 100644 --- a/lib/elixir/pages/anti-patterns/design-anti-patterns.md +++ b/lib/elixir/pages/anti-patterns/design-anti-patterns.md @@ -279,4 +279,59 @@ A common practice followed by the community is to make the non-raising version t ## Using application configuration for libraries -TODO +#### Problem + +The [*application environment*](https://hexdocs.pm/elixir/Application.html#module-the-application-environment) can be used to parameterize global values that can be used in an Elixir system. This mechanism can be very useful and therefore is not considered an anti-pattern by itself. However, library authors should avoid using the application environment to configure their library. The reason is exactly that the application environment is a **global** state, so there can only be a single value for each key in the environment for an application. This makes it impossible for multiple applications depending on the same library to configure the same aspect of the library in different ways. + +#### Example + +The `DashSplitter` module represents a library that configures the behavior of its functions through the global application environment. These configurations are concentrated in the *config/config.exs* file, shown below: + +```elixir +import Config + +config :app_config, + parts: 3 + +import_config "#{config_env()}.exs" +``` + +One of the functions implemented by the `DashSplitter` library is `split/1`. This function aims to separate a string received via a parameter into a certain number of parts. The character used as a separator in `split/1` is always `"-"` and the number of parts the string is split into is defined globally by the application environment. This value is retrieved by the `split/1` function by calling `Application.fetch_env!/2`, as shown next: + +```elixir +defmodule DashSplitter do + def split(string) when is_binary(string) do + parts = Application.fetch_env!(:app_config, :parts) # <= retrieve parameterized value + String.split(string, "-", parts: parts) # <= parts: 3 + end +end +``` + +Due to this parameterized value used by the `DashSplitter` library, all applications dependent on it can only use the `split/1` function with identical behavior about the number of parts generated by string separation. Currently, this value is equal to 3, as we can see in the use examples shown below: + +```elixir +iex> DashSplitter.split("Lucas-Francisco-Vegi") +["Lucas", "Francisco", "Vegi"] +iex> DashSplitter.split("Lucas-Francisco-da-Matta-Vegi") +["Lucas", "Francisco", "da-Matta-Vegi"] +``` + +#### Refactoring + +To remove this anti-pattern and make the library more adaptable and flexible, this type of configuration must be performed via parameters in function calls. The code shown below performs the refactoring of the `split/1` function by accepting [keyword lists](`Keyword`) as a new optional parameter. With this new parameter, it is possible to modify the default behavior of the function at the time of its call, allowing multiple different ways of using `split/2` within the same application: + +```elixir +defmodule DashSplitter do + def split(string, opts \\ []) when is_binary(string) and is_list(opts) do + parts = Keyword.get(opts, :parts, 2) # <= default config of parts == 2 + String.split(string, "-", parts: parts) + end +end +``` + +```elixir +iex> DashSplitter.split("Lucas-Francisco-da-Matta-Vegi", [parts: 5]) +["Lucas", "Francisco", "da", "Matta", "Vegi"] +iex> DashSplitter.split("Lucas-Francisco-da-Matta-Vegi") #<= default config is used! +["Lucas", "Francisco-da-Matta-Vegi"] +```