Skip to content

Commit

Permalink
Update to Elixir 1.18 (#1540)
Browse files Browse the repository at this point in the history
* ci and readme

* replace List.zip

* replace unless link

* remove stray file

* use 1.18.1 and otp 27.2
  • Loading branch information
jiegillet authored Jan 6, 2025
1 parent a6e44e8 commit ad095ee
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
elixir: [1.17]
otp: [27.0]
elixir: [1.18.1]
otp: [27.2]

steps:
- name: Checkout code
Expand Down Expand Up @@ -76,8 +76,6 @@ jobs:
strategy:
matrix:
include:
- elixir: '1.13.0'
otp: '24.1'
- elixir: '1.14.0'
otp: '25.0'
- elixir: '1.15.0'
Expand All @@ -86,6 +84,8 @@ jobs:
otp: '26.2'
- elixir: '1.17.0'
otp: '27.0'
- elixir: '1.18.1'
otp: '27.2'

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## Setup

The exercises currently target Elixir versions from 1.13 to 1.17 and Erlang/OTP versions from 24 to 27. Detailed installation instructions can be found at
The exercises currently target Elixir versions from 1.14 to 1.18 and Erlang/OTP versions from 25 to 27. Detailed installation instructions can be found at
[https://elixir-lang.org/install.html](https://elixir-lang.org/install.html). We recommend using the [asdf version manager](https://github.com/asdf-vm/asdf) to manage multiple Elixir versions.

## Testing
Expand Down
2 changes: 1 addition & 1 deletion concepts/cond/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ The `cond` conditional is usually used when there are more than two logical bran

[cond]: https://hexdocs.pm/elixir/case-cond-and-if.html#cond
[case]: https://hexdocs.pm/elixir/case-cond-and-if.html#case
[if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if-unless
[if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if
2 changes: 1 addition & 1 deletion concepts/if/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ truthy?.(nil)
# => true
```

[getting-started-if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if-unless
[getting-started-if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if
[kernel-if]: https://hexdocs.pm/elixir/Kernel.html#if/2
[kernel-boolean-and]: https://hexdocs.pm/elixir/Kernel.html#and/2
[kernel-boolean-or]: https://hexdocs.pm/elixir/Kernel.html#or/2
Expand Down
2 changes: 1 addition & 1 deletion concepts/if/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ This syntax is helpful for very short expressions, but should be avoided if the

In Elixir, all datatypes evaluate to a _truthy_ or _falsy_ value when they are encountered in a boolean context (like an `if` expression). All data is considered _truthy_ **except** for `false` and `nil`. In particular, empty strings, the integer `0`, and empty lists are all considered _truthy_ in Elixir.

[getting-started-if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if-unless
[getting-started-if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if
[kernel-if]: https://hexdocs.pm/elixir/Kernel.html#if/2
2 changes: 1 addition & 1 deletion concepts/if/links.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"url": "https://hexdocs.pm/elixir/case-cond-and-if.html#if-unless",
"url": "https://hexdocs.pm/elixir/case-cond-and-if.html#if",
"description": "Getting Started: `if`"
},
{
Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/file-sniffer/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- You can use the [`if` macro conditional][if] for binary conditions.

[binary-matching]: https://hexdocs.pm/elixir/binaries-strings-and-charlists.html#binaries
[if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if-unless
[if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if
[mfc]: https://hexdocs.pm/elixir/modules-and-functions.html#function-definition
[mimetype]: https://en.wikipedia.org/wiki/Media_type
[pattern-matching]: https://hexdocs.pm/elixir/pattern-matching.html#pattern-matching
Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/name-badge/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@

[kernel-if]: https://hexdocs.pm/elixir/Kernel.html#if/2
[getting-started-basic-strings]: https://hexdocs.pm/elixir/basic-types.html#strings
[getting-started-if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if-unless
[getting-started-if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if
[elixirschool-if]: https://elixirschool.com/en/lessons/basics/control-structures/#if-and-unless-0
2 changes: 1 addition & 1 deletion exercises/concept/name-badge/.docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ This syntax is helpful for very short expressions, but should be avoided if the
In Elixir, all datatypes evaluate to a _truthy_ or _falsy_ value when they are encountered in a boolean context (like an `if` expression). All data is considered _truthy_ **except** for `false` and `nil`. In particular, empty strings, the integer `0`, and empty lists are all considered _truthy_ in Elixir.

[nil-dictionary]: https://www.merriam-webster.com/dictionary/nil
[getting-started-if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if-unless
[getting-started-if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if
[kernel-if]: https://hexdocs.pm/elixir/Kernel.html#if/2
2 changes: 1 addition & 1 deletion exercises/practice/crypto-square/.meta/example.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defmodule CryptoSquare do
normalized
|> String.graphemes()
|> Enum.chunk_every(section_length, section_length, List.duplicate(" ", section_length))
|> List.zip()
|> Enum.zip()
|> Enum.map(&Tuple.to_list/1)
|> Enum.join(" ")
end
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/matrix/.meta/example.ex
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defmodule Matrix do

%Matrix{
matrix: rows,
transposed_matrix: rows |> List.zip() |> Enum.map(&Tuple.to_list/1)
transposed_matrix: rows |> Enum.zip() |> Enum.map(&Tuple.to_list/1)
}
end

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/saddle-points/.meta/example.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defmodule SaddlePoints do
def columns(str) do
str
|> rows
|> List.zip()
|> Enum.zip()
|> Enum.map(&Tuple.to_list/1)
end

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/spiral-matrix/.meta/example.ex
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ defmodule Spiral do
end

defp transpose(matrix) do
matrix |> List.zip() |> Enum.map(&Tuple.to_list/1)
matrix |> Enum.zip() |> Enum.map(&Tuple.to_list/1)
end
end
2 changes: 1 addition & 1 deletion exercises/practice/transpose/.meta/example.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ defmodule Transpose do
rows
|> Enum.map(fn x -> get_padded_row(x, max_length) end)
|> Enum.map(&String.to_charlist/1)
|> List.zip()
|> Enum.zip()
|> Enum.map(&Tuple.to_list/1)
|> Enum.map(&List.to_string/1)
|> Enum.map(fn x -> x |> String.trim_trailing("*") |> String.replace("*", " ") end)
Expand Down

0 comments on commit ad095ee

Please sign in to comment.