Skip to content

Commit 3f0c4a9

Browse files
authored
Fix CI and bugs for Erlang 27 and Elixir 1.17 (#1926)
* Fix Erlang testcases to work with final Erlang 27 release If there are no doc attributes the doc chunk will not be emitted, so we need to add it to tests that don't have any. * Update CI to test/release with Erlang 27 and Elixir 1.17 * Ignore ... when autolinking spec closes #1925
1 parent 7018022 commit 3f0c4a9

File tree

5 files changed

+21
-8
lines changed

5 files changed

+21
-8
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
include:
19-
- pair:
19+
- pair: # Test very old elixir and Erlang
2020
elixir: "1.13"
2121
otp: "22"
22-
- pair:
22+
- pair: # Test Erlang without -doc attribute support
2323
elixir: "1.16"
2424
otp: "26"
25+
- pair: # Test Erlang with -doc attribute support
26+
elixir: "1.17"
27+
otp: "27"
2528
lint: lint
2629
steps:
2730
- uses: actions/checkout@v3

.github/workflows/release.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,16 @@ jobs:
2929
fail-fast: true
3030
matrix:
3131
include:
32-
- otp: 24
33-
otp_version: "24.0"
3432
- otp: 25
35-
otp_version: "25.0.4"
33+
otp_version: "25.3.2.12"
34+
elixir_version: "1.16.2"
3635
- otp: 26
37-
otp_version: "26.0.2"
36+
otp_version: "26.2.5"
37+
elixir_version: "1.16.2"
38+
- otp: 27
39+
otp_version: "27.0"
40+
elixir_version: "1.17.0"
41+
3842
runs-on: ubuntu-22.04
3943
steps:
4044
- uses: actions/checkout@v4
@@ -44,6 +48,7 @@ jobs:
4448
with:
4549
otp_version: ${{ matrix.otp_version }}
4650
otp: ${{ matrix.otp }}
51+
elixir_version: ${{ matrix.elixir_version }}
4752

4853
- name: Upload Pre-built
4954
env:

.github/workflows/release_pre_built/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ inputs:
55
description: "The major OTP version"
66
otp_version:
77
description: "The exact OTP version (major.minor[.patch])"
8+
elixir_version:
9+
description: "The exact Elixir version (major.minor[.patch])"
810
runs:
911
using: "composite"
1012
steps:
1113
- uses: erlef/[email protected]
1214
with:
1315
otp-version: ${{ inputs.otp_version }}
14-
elixir-version: "1.16.0"
16+
elixir-version: ${{ inputs.elixir_version }}
1517
- name: Build ex_doc
1618
shell: bash
1719
run: |

lib/ex_doc/language/erlang.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ defmodule ExDoc.Language.Erlang do
561561
name == :record and acc != [] ->
562562
{ast, acc}
563563

564-
name in [:"::", :when, :%{}, :{}, :|, :->] ->
564+
name in [:"::", :when, :%{}, :{}, :|, :->, :...] ->
565565
{ast, acc}
566566

567567
# %{required(...) => ..., optional(...) => ...}

test/ex_doc/retriever/erlang_test.exs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ defmodule ExDoc.Retriever.ErlangTest do
1111
test "module with no docs is generated", c do
1212
erlc(c, :mod, ~S"""
1313
-module(mod).
14+
-moduledoc("").
1415
""")
1516

1617
assert {[_], []} = Retriever.docs_from_modules([:mod], %ExDoc.Config{})
@@ -217,6 +218,7 @@ defmodule ExDoc.Retriever.ErlangTest do
217218
erlc(c, :mod, ~S"""
218219
-module(mod).
219220
-export([f/0]).
221+
-moduledoc("").
220222
221223
f() -> ok.
222224
""")
@@ -319,6 +321,7 @@ defmodule ExDoc.Retriever.ErlangTest do
319321
erlc(c, :mod, ~s"""
320322
-module(mod).
321323
-export([function/0]).
324+
-moduledoc("").
322325
323326
-record(a, { a = 1 :: pos_integer(),
324327
b :: non_neg_integer(),

0 commit comments

Comments
 (0)