Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
# so keeping credo, dialyzer and formatting checks in the matrix
# would create an impossible situation, as different versions would have
# different rules
DEFAULT_ELIXIR: 1.14.3-otp-25
DEFAULT_ELIXIR: 1.15.8-otp-25
DEFAULT_OTP: 25.3.2.4

permissions:
Expand Down Expand Up @@ -162,13 +162,9 @@ jobs:
otp: "26"
- elixir: "1.16"
otp: "25"
- elixir: "1.15.6"
- elixir: "1.15.8"
otp: "26"
- elixir: "1.15.6"
otp: "25"
- elixir: "1.14"
otp: "25"
- elixir: "1.13"
- elixir: "1.15.8"
otp: "25"
steps:
# Step: Check out the code.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
otp-version: "24.3.4.12"
elixir-version: "1.13.4-otp-24"
otp-version: "25.0"
elixir-version: "1.15.8-otp-25"
version-type: strict

- name: Checkout code
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ Lexical will be available in `/path/to/lexical`.

## Development

Lexical is intended to run on any version of Erlang 24+ and Elixir
1.13+. Before beginning development, you should install Erlang
`24.3.4.12` and Elixir `1.13.4` and use those versions when you're
Lexical is intended to run on any version of Erlang 25+ and Elixir
1.15+. Before beginning development, you should install Erlang
`25.0` and Elixir `1.15.8` and use those versions when you're
building code.

You should also look at the [complete compatibility
Expand Down
6 changes: 1 addition & 5 deletions apps/common/lib/lexical/document/lines.ex
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,7 @@ defimpl Enumerable, for: Lexical.Document.Lines do

def slice(%Lines{} = document) do
slicing_function =
if Version.match?(System.version(), ">= 1.14.0") do
fn start, len, step -> do_slice(document, start, len, step) end
else
fn start, len -> do_slice(document, start, len, 1) end
end
fn start, len, step -> do_slice(document, start, len, step) end

{:ok, Lines.size(document), slicing_function}
end
Expand Down
2 changes: 1 addition & 1 deletion apps/common/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule Common.MixProject do
[
app: :common,
version: "0.7.2",
elixir: "~> 1.13",
elixir: "~> 1.15",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps(),
Expand Down
14 changes: 7 additions & 7 deletions apps/common/test/lexical/ast/tokens_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,23 @@ defmodule Lexical.Ast.TokensTest do
tokens = Tokens.prefix_stream(document, position)

assert Enum.to_list(tokens) == [
{:eol, '\n', []},
{:eol, '\n', []},
{:eol, '\n', []},
{:eol, '\n', []},
{:eol, ~c"\n", []},
{:eol, ~c"\n", []},
{:eol, ~c"\n", []},
{:eol, ~c"\n", []},
{
:interpolated_string,
[
{:literal, "foo«", {{1, 1}, {1, 5}}},
{:interpolation,
[{:eol, {3, 18, 1}}, {:int, {4, 13, 2}, '2'}, {:eol, {4, 14, 1}}],
[{:eol, {3, 18, 1}}, {:int, {4, 13, 2}, ~c"2"}, {:eol, {4, 14, 1}}],
{{3, 18}, {5, 11}}},
{:literal, "»bar", {{5, 11}, {5, 15}}}
],
{3, 11}
},
{:eol, '\n', []},
{:eol, '\n', []}
{:eol, ~c"\n", []},
{:eol, ~c"\n", []}
]
end
end
Expand Down
16 changes: 8 additions & 8 deletions apps/common/test/lexical/vm/versions_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -85,29 +85,29 @@ defmodule Lexical.VM.VersionTest do

describe "compatible?/1" do
test "lower major versions of erlang are compatible with later major versions" do
patch_system_versions("1.14.5", "26.0")
patch_tagged_versions("1.14.5", "25.0")
patch_system_versions("1.15.8", "26.0")
patch_tagged_versions("1.15.8", "25.0")

assert compatible?("/foo/bar/baz")
end

test "higher major versions are not compatible with lower major versions" do
patch_system_versions("1.14.5", "25.0")
patch_tagged_versions("1.14.5", "26.0")
patch_system_versions("1.15.8", "25.0")
patch_tagged_versions("1.15.8", "26.0")

refute compatible?("/foo/bar/baz")
end

test "the same versions are compatible with each other" do
patch_system_versions("1.14.5", "25.3.3")
patch_tagged_versions("1.14.5", "25.0")
patch_system_versions("1.15.8", "25.3.3")
patch_tagged_versions("1.15.8", "25.0")

assert compatible?("/foo/bar/baz")
end

test "higher minor versions are compatible" do
patch_system_versions("1.14.5", "25.3.0")
patch_tagged_versions("1.14.5", "25.0")
patch_system_versions("1.15.8", "25.3.0")
patch_tagged_versions("1.15.8", "25.0")

assert compatible?("/foo/bar/baz")
end
Expand Down
2 changes: 1 addition & 1 deletion apps/lexical_credo/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defmodule LexicalCredo.MixProject do
[
app: :lexical_credo,
version: @version,
elixir: "~> 1.13",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: docs(),
Expand Down
2 changes: 1 addition & 1 deletion apps/proto/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule Proto.MixProject do
[
app: :proto,
version: "0.7.2",
elixir: "~> 1.13",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps(),
dialyzer: Mix.Dialyzer.config(add_apps: [:jason])
Expand Down
2 changes: 1 addition & 1 deletion apps/protocol/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule Lexical.Protocol.MixProject do
app: :protocol,
env: Mix.env(),
version: "0.7.2",
elixir: "~> 1.13",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps(),
dialyzer: Mix.Dialyzer.config(add_apps: [:jason]),
Expand Down
2 changes: 1 addition & 1 deletion apps/remote_control/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule Lexical.RemoteControl.MixProject do
[
app: :remote_control,
version: "0.7.2",
elixir: "~> 1.13",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps(),
dialyzer: Mix.Dialyzer.config(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule CompilationCallbackErrors.MixProject do
[
app: :compilation_callback_errors,
version: "0.1.0",
elixir: "~> 1.13",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps()
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule CompilationErrors.MixProject do
[
app: :compilation_errors,
version: "0.1.0",
elixir: "~> 1.13",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps()
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule CompilationWarnings.MixProject do
[
app: :compilation_warnings,
version: "0.1.0",
elixir: "~> 1.13",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps()
]
Expand Down
2 changes: 1 addition & 1 deletion apps/remote_control/test/fixtures/navigations/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule Navigations.MixProject do
[
app: :navigations,
version: "0.1.0",
elixir: "~> 1.13",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps()
]
Expand Down
2 changes: 1 addition & 1 deletion apps/remote_control/test/fixtures/parse_errors/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule ParseErrors.MixProject do
[
app: :parse_errors,
version: "0.1.0",
elixir: "~> 1.13",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps()
]
Expand Down
2 changes: 1 addition & 1 deletion apps/remote_control/test/fixtures/project/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule Project.MixProject do
[
app: :project,
version: "0.1.0",
elixir: "~> 1.13",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps()
]
Expand Down
2 changes: 1 addition & 1 deletion apps/remote_control/test/fixtures/project_metadata/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule ProjectMetadata.MixProject do
[
app: :project_metadata,
version: "0.1.0",
elixir: "~> 1.13",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps()
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule Umbrella.First.MixProject do
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.13",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps()
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule Umbrella.Second.MixProject do
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.13",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps()
]
Expand Down
4 changes: 1 addition & 3 deletions apps/server/lib/lexical/server/boot.ex
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ defmodule Lexical.Server.Boot do
end

@allowed_elixir %{
"1.13.0" => ">= 1.13.0",
"1.14.0" => ">= 1.14.0",
"1.15.0" => ">= 1.15.3",
"1.15.0" => ">= 1.15.8",
"1.16.0" => ">= 1.16.0",
"1.17.0-rc" => ">= 1.17.0-rc",
"1.17.0" => ">= 1.17.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/server/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule Lexical.Server.MixProject do
[
app: :server,
version: "0.7.2",
elixir: "~> 1.13",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps(),
dialyzer: Mix.Dialyzer.config(add_apps: [:jason, :proto]),
Expand Down
10 changes: 5 additions & 5 deletions apps/server/test/lexical/server/boot_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ defmodule Lexical.Server.BootTest do

describe "detect_errors/0" do
test "returns empty list when all checks succeed" do
patch_runtime_versions("1.14.5", "25.0")
patch_compiled_versions("1.14.5", "25.0")
patch_runtime_versions("1.15.8", "25.0")
patch_compiled_versions("1.15.8", "25.0")

assert [] = Boot.detect_errors()
end
Expand All @@ -22,16 +22,16 @@ defmodule Lexical.Server.BootTest do
end

test "includes error when runtime erlang is incompatible" do
patch_runtime_versions("1.13.4", "23.0")
patch_compiled_versions("1.13.4", "23.0")
patch_runtime_versions("1.15.8", "23.0")
patch_compiled_versions("1.15.8", "23.0")

assert [error] = Boot.detect_errors()
assert error =~ "FATAL: Lexical is not compatible with Erlang/OTP 23.0.0"
end

test "includes multiple errors when runtime elixir and erlang are incompatible" do
patch_runtime_versions("1.15.2", "26.0.0")
patch_compiled_versions("1.15.6", "26.1")
patch_compiled_versions("1.15.8", "26.1")

assert [elixir_error, erlang_error] = Boot.detect_errors()
assert elixir_error =~ "FATAL: Lexical is not compatible with Elixir 1.15.2"
Expand Down
2 changes: 1 addition & 1 deletion integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ $ LX_DEBUG=1 ./integration/test.sh
test_find_asdf_directory...
> No version manager detected
> Found asdf. Activating...
> Detected Elixir through asdf: /root/.asdf/installs/elixir/1.15.6-otp-26/bin/elixir
> Detected Elixir through asdf: /root/.asdf/installs/elixir/1.15.8-otp-26/bin/elixir
Pass
...
```
17 changes: 7 additions & 10 deletions pages/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@ Lexical supports the following versions of Elixir and Erlang:

| Erlang | Version range | Notes |
| ----------- |----------------- | ------ |
| 24 | `>= 24.3.4.12` | Might run on older versions; this was the lowest that would compile on arm |
| 25 | `>= 25.0` | |
| 26 | `>= 26.0.2` | |
| 27 | `>= 27.0` | Will use dramatically more memory due to a bug in Erlang's ETS table compression |
| 27 | `>= 27.0` | `27.0` - `27.0.1` Will use dramatically more memory due to a bug in Erlang's ETS table compression |

| Elixir | Version Range | Notes |
| -------- | -------------- | -------- |
| 1.13 | `>= 1.13.4` | |
| 1.14 | `all` | |
| 1.15 | `>= 1.15.3` | `1.15.0` - `1.15.2` had compiler bugs that prevented lexical from working |
| 1.15 | `>= 1.15.8` | |
| 1.16 | `>= 1.16.0` | |
| 1.17 | `>= 1.17.0` | |

Expand All @@ -29,12 +26,12 @@ supports, but it's important to understand that Lexical needs to be
compiled under the lowest version of elixir and erlang that you intend
to use it with. That means if you have the following projects:

* `first`: elixir `1.14.4` erlang `24.3.2`
* `second`: elixir `1.14.3` erlang `25.0`
* `third`: elixir: `1.13.3` erlang `25.2.3`
* `first`: elixir `1.18.3` erlang `27.3.3`
* `second`: elixir `1.16.1` erlang `25.2.3`
* `third`: elixir: `1.15.8` erlang `26.0`

Lexical would need to be compiled with Erlang `24.3.2` and Elixir `1.13.3`.
Lexical's prepackaged builds use Erlang `24.3.4.12` and Elixir `1.13.4`
Lexical would need to be compiled with Erlang `25.2.3` and Elixir `1.15.8`.
Lexical's prepackaged builds use Erlang `25.0` and Elixir `1.15.8`

## Prerequisites
First, Install git LFS by [following these instructions](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage).
Expand Down
Loading