Skip to content

Commit d365e19

Browse files
authored
Merge branch 'elixir-lang:main' into add-gleam-compiler
2 parents 2c51ca5 + 32ed2c3 commit d365e19

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1284
-1174
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ jobs:
113113

114114
sign:
115115
needs: [build]
116+
environment: release
116117
strategy:
117118
fail-fast: true
118119
matrix:
@@ -126,30 +127,28 @@ jobs:
126127

127128
permissions:
128129
contents: write
130+
id-token: write
129131

130132
steps:
131133
- name: "Download build"
132134
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
133135
with:
134136
name: build-${{ matrix.flavor }}-elixir-otp-${{ matrix.otp }}
135137

138+
- name: Log in to Azure
139+
if: ${{ matrix.flavor == 'windows' && vars.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
140+
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0
141+
with:
142+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
143+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
144+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
136145
- name: "Sign files with Trusted Signing"
137146
uses: azure/trusted-signing-action@0d74250c661747df006298d0fb49944c10f16e03 # v0.5.1
138-
if: github.repository == 'elixir-lang/elixir' && matrix.flavor == 'windows'
147+
if: ${{ matrix.flavor == 'windows' && vars.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
139148
with:
140-
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
141-
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
142-
# AZURE_TENANT_ID and AZURE_CLIENT_ID should stay the same,
143-
# but AZURE_CLIENT_SECRET has expiration date. When it expires go to
144-
# App Registrations / <app> / Certificates & secrets,
145-
# click (+) New client secret, note the "Value" (not "Secret ID")
146-
# and update it:
147-
#
148-
# $ gh --repo elixir-lang/elixir secret set AZURE_CLIENT_SECRET
149-
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
150149
endpoint: https://eus.codesigning.azure.net/
151-
trusted-signing-account-name: trusted-signing-elixir
152-
certificate-profile-name: Elixir
150+
trusted-signing-account-name: ${{ vars.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
151+
certificate-profile-name: ${{ vars.AZURE_CERTIFICATE_PROFILE_NAME }}
153152
files-folder: ${{ github.workspace }}
154153
files-folder-filter: exe
155154
file-digest: SHA256
@@ -218,7 +217,7 @@ jobs:
218217

219218
- name: Attest Distribution Assets with SBoM
220219
id: attest-sbom
221-
uses: actions/attest-sbom@115c3be05ff3974bcbd596578934b3f9ce39bf68 # v2.2.0
220+
uses: actions/attest-sbom@bd218ad0dbcb3e146bd073d1d9c6d78e08aa8a0b # v2.4.0
222221
with:
223222
subject-path: |
224223
/tmp/build-artifacts/{elixir-otp-*.*,Docs.zip}

CHANGELOG.md

Lines changed: 10 additions & 273 deletions
Large diffs are not rendered by default.

RELEASE.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88

99
## Shipping a new version
1010

11-
1. Update version in /VERSION, bin/elixir, bin/elixir.bat, and bin/elixir.ps1
11+
1. Update version in /VERSION, bin/elixir, and bin/elixir.bat
1212

1313
2. Ensure /CHANGELOG.md is updated, versioned and add the current date
14+
1415
- If this release addresses any publicly known security vulnerabilities with
1516
assigned CVEs, add a "Security" section to `CHANGELOG.md`. For example:
1617
```md
@@ -34,15 +35,15 @@
3435

3536
### In the new branch
3637

37-
1. Comment the `CANONICAL=` in /Makefile
38+
1. Comment out `CANONICAL := main/` in /Makefile
3839

3940
2. Update tables in /SECURITY.md and "Compatibility and Deprecations"
4041

4142
3. Commit "Branch out vMAJOR.MINOR"
4243

4344
### Back in main
4445

45-
1. Bump /VERSION file, bin/elixir, bin/elixir.bat, and bin/elixir.ps1
46+
1. Bump /VERSION file, bin/elixir, and bin/elixir.bat
4647

4748
2. Start new /CHANGELOG.md
4849

SECURITY.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ Elixir applies bug fixes only to the latest minor branch. Security patches are a
1212

1313
Elixir version | Support
1414
:------------- | :-----------------------------
15-
1.19 | Development
16-
1.18 | Bug fixes and security patches
15+
1.20 | Development
16+
1.19 | Bug fixes and security patches
17+
1.18 | Security patches only
1718
1.17 | Security patches only
1819
1.16 | Security patches only
1920
1.15 | Security patches only
20-
1.14 | Security patches only
2121

2222
## Announcements
2323

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.19.0-dev
1+
1.20.0-dev

bin/elixir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
set -e
88

9-
ELIXIR_VERSION=1.19.0-dev
9+
ELIXIR_VERSION=1.20.0-dev
1010

1111
if [ $# -eq 0 ] || { [ $# -eq 1 ] && { [ "$1" = "--help" ] || [ "$1" = "-h" ]; }; }; then
1212
cat <<USAGE >&2

bin/elixir.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
:: SPDX-FileCopyrightText: 2021 The Elixir Team
55
:: SPDX-FileCopyrightText: 2012 Plataformatec
66

7-
set ELIXIR_VERSION=1.19.0-dev
7+
set ELIXIR_VERSION=1.20.0-dev
88

99
if ""%1""=="""" if ""%2""=="""" goto documentation
1010
if /I ""%1""==""--help"" if ""%2""=="""" goto documentation

lib/elixir/lib/code/formatter.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2500,16 +2500,16 @@ defmodule Code.Formatter do
25002500

25012501
# Relying on the inner document is brittle and error prone.
25022502
# It would be best if we had a mechanism to apply this.
2503-
defp concat_to_last_group({:doc_cons, left, right}, concat) do
2504-
{:doc_cons, left, concat_to_last_group(right, concat)}
2503+
defp concat_to_last_group([left | right], concat) do
2504+
[left | concat_to_last_group(right, concat)]
25052505
end
25062506

25072507
defp concat_to_last_group({:doc_group, group, mode}, concat) do
2508-
{:doc_group, {:doc_cons, group, concat}, mode}
2508+
{:doc_group, concat(group, concat), mode}
25092509
end
25102510

25112511
defp concat_to_last_group(other, concat) do
2512-
{:doc_cons, other, concat}
2512+
concat(other, concat)
25132513
end
25142514

25152515
defp ungroup_if_group({:doc_group, group, _mode}), do: group

lib/elixir/lib/code/fragment.ex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,12 @@ defmodule Code.Fragment do
771771
{{:local_or_var, acc}, offset} ->
772772
build_surround({:local_or_var, acc}, reversed, line, offset)
773773

774+
{{:block_keyword_or_binary_operator, acc}, offset} when acc in @textual_operators ->
775+
build_surround({:operator, acc}, reversed, line, offset)
776+
777+
{{:block_keyword_or_binary_operator, acc}, offset} when acc in @keywords ->
778+
build_surround({:keyword, acc}, reversed, line, offset)
779+
774780
{{:module_attribute, ~c""}, offset} ->
775781
build_surround({:operator, ~c"@"}, reversed, line, offset)
776782

lib/elixir/lib/exception.ex

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,20 +1457,6 @@ defmodule BadFunctionError do
14571457
end
14581458
end
14591459

1460-
defmodule BadStructError do
1461-
@moduledoc deprecated:
1462-
"This exception is deprecated alongside the struct update syntax that raises it"
1463-
defexception [:struct, :term]
1464-
1465-
@impl true
1466-
def message(exception) do
1467-
Exception.__format_message_with_term__(
1468-
"expected a struct named #{inspect(exception.struct)}, got:",
1469-
exception.term
1470-
)
1471-
end
1472-
end
1473-
14741460
defmodule BadMapError do
14751461
@moduledoc """
14761462
An exception raised when a map is expected, but something else was given.
@@ -2605,10 +2591,6 @@ defmodule ErlangError do
26052591
%BadFunctionError{term: term}
26062592
end
26072593

2608-
def normalize({:badstruct, struct, term}, _stacktrace) do
2609-
%BadStructError{struct: struct, term: term}
2610-
end
2611-
26122594
def normalize({:badmatch, term}, _stacktrace) do
26132595
%MatchError{term: term}
26142596
end

lib/elixir/lib/file.ex

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ defmodule File do
317317
directories of `path`
318318
* `:enospc` - there is no space left on the device
319319
* `:enotdir` - a component of `path` is not a directory
320-
* `:eperm` - missed required permisions
320+
* `:eperm` - missed required permissions
321321
322322
## Examples
323323
@@ -2159,7 +2159,12 @@ defmodule File do
21592159
def stream!(path, line_or_bytes, modes)
21602160

21612161
def stream!(path, modes, line_or_bytes) when is_list(modes) do
2162-
# TODO: Deprecate this on Elixir v1.20
2162+
# TODO: Remove me on Elixir 2.0
2163+
IO.warn(
2164+
"File.stream!(path, modes, line_or_byte) is deprecated, " <>
2165+
"invoke File.stream!(path, line_or_bytes, modes) instead"
2166+
)
2167+
21632168
stream!(path, line_or_bytes, modes)
21642169
end
21652170

lib/elixir/lib/inspect.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ defimpl Inspect, for: BitString do
326326
end
327327

328328
defp each_bit(<<>>, _counter, _opts) do
329-
:doc_nil
329+
Inspect.Algebra.empty()
330330
end
331331

332332
defp each_bit(<<h::8>>, _counter, opts) do

0 commit comments

Comments
 (0)