Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Elixir 1.16 #38

Merged
merged 5 commits into from
Jan 2, 2024
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
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
uses: DeterminateSystems/magic-nix-cache-action@v2
with:
diagnostic-endpoint: ""
- run: nix -L flake check ./dev
- run: nix -L flake check --all-systems
- run: nix -L flake check ./dev --all-systems

packages:
name: Build Packages
Expand Down
4 changes: 2 additions & 2 deletions .justfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ add-elixir version:
add-erlang version:
nix run ./dev#add-otp-version {{ version }}
check:
nix flake check
nix flake check ./dev
nix flake check --all-systems
nix flake check ./dev --all-systems
doc:
nix build .#optionsDoc
cat ./result > docs/options.md
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ A complete example:
enable = true;
devShell.languageServers.elixir = true;
versions = {
elixir = "1.15.7";
elixir = "1.16.0";
erlang = "26.2";
};
};
Expand Down Expand Up @@ -138,7 +138,7 @@ setting `perSystem.beamWorkspace.devShell.enable = false;`
#
# Everything after the first hyphen is stripped and handled according
# to the defined erlang version instead.
elixir = "1.15.7";
elixir = "1.16.0";
erlang = "26.2";
};
};
Expand Down Expand Up @@ -206,7 +206,7 @@ If you are a Nix user, this is already automated:

```shell
nix develop ./dev
just add-elixir 1.15.7
just add-elixir 1.16.0
just add-erlang 26.2
```

Expand Down
1 change: 1 addition & 0 deletions data/elixir.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"1.15.5": "1b9mxlb0x301lmjd5wvhw23vliv265wx384bpd76phk0grx73kfq",
"1.15.6": "19vhci9dxdm3sb937ba3np5gadgfcsnrnc30n17c4xk556mk473r",
"1.15.7": "0yfp16fm8v0796f1rf1m2r0m2nmgj3qr7478483yp1x5rk4xjrz8",
"1.16.0": "01sdmnbyz2r780437h160ka7zb605b08w9ar031xikbwgnjx7kcw",
"1.2.0": "1rhj4sgn4czw12k69ln62lvlp96ak9fhjdz21gzrc8hzr9gfz5s1",
"1.2.1": "1n5j7xb8bc6pqayb2pmhjf9dn7smqlnqbrngjdk0qajjfyq23d1z",
"1.2.2": "0d6m1bf6gcn5jx6z61xs0aknyd4k5ayas36axxfi4aiib98jvkmb",
Expand Down
2 changes: 1 addition & 1 deletion dev/example/.tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elixir 1.15.7-otp-26
elixir 1.16.0-otp-26
erlang 26.2
2 changes: 1 addition & 1 deletion dev/example/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
devShell.languageServers.erlang = false;
flakePackages = true;
versions = {
elixir = "1.15.7-otp-26";
elixir = "1.16.0-otp-26";
erlang = "26.2";
};
# versions.fromToolVersions = ./.tool-versions;
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ If you are a Nix user, this is already automated:

```shell
nix develop ./dev
just add-elixir 1.15.7
just add-elixir 1.16.0
just add-erlang 26.2
```

Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ This approach is mutually exclusive with the syntax [described above](#explicitl

```
# .toolversions
elixir 1.15.7
elixir 1.16.0
erlang 26.2
```

Expand Down
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,17 @@
// (
if elixirLanguageServer
then {
elixir-ls = beamPkgs.elixir-ls.override {inherit elixir;};
elixir-ls = (beamPkgs.elixir-ls.override {inherit elixir;}).overrideAttrs (old: {
buildPhase =
# Elixir 1.16.0 or newer
if ((builtins.compareVersions elixir.version "1.16.0") != -1)
then ''
runHook preBuild
mix do compile --no-deps-check, elixir_ls.release2
runHook postBuild
''
else old.buildPhase;
});
}
else {}
)
Expand Down
2 changes: 1 addition & 1 deletion local-parts/devshells.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
devShells.example = let
pkgSet = self.lib.mkPackageSet {
inherit pkgs;
elixirVersion = "1.15.7";
elixirVersion = "1.16.0";
erlangVersion = "26.2";
elixirLanguageServer = true;
};
Expand Down
4 changes: 2 additions & 2 deletions templates/default/.tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elixir 1.15.6-otp-26
erlang 26.1.2
elixir 1.16.0-otp-26
erlang 26.2
2 changes: 1 addition & 1 deletion templates/default/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
languageServers.erlang = false;
};
versions = {
elixir = "1.15.7";
elixir = "1.16.0";
erlang = "26.2";
};
};
Expand Down
4 changes: 2 additions & 2 deletions templates/phoenix/.tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elixir 1.15.6-otp-26
erlang 26.1.2
elixir 1.16.0-otp-26
erlang 26.2
2 changes: 1 addition & 1 deletion templates/phoenix/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
phoenix = true;
};
versions = {
elixir = "1.15.7";
elixir = "1.16.0";
erlang = "26.2";
};
};
Expand Down