Skip to content

Commit 4fe9f83

Browse files
authored
feat: upgrade to 1.17 and OTP 27 (#516)
Adds a zigpkgs input to use zig from a past rev of nixpkgs, as the 0.11 version in latest does not seem to work. related: NixOS/nixpkgs#299091 Updates credo to 1.7.7 as it supports Elixir 1.17.0
1 parent 2e9c45f commit 4fe9f83

File tree

7 files changed

+41
-16
lines changed

7 files changed

+41
-16
lines changed

Diff for: .mise.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
KERL_BUILD_DOCS = "yes"
33

44
[tools]
5-
erlang = "26.2.2"
6-
elixir = "ref:e3b6a91b173f7e836401a6a75c3906c26bd7fd39"
5+
erlang = "27.0"
6+
elixir = "1.17.0"
77
zig = "0.11.0"

Diff for: .tool-versions

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
erlang 26.2.2
2-
elixir ref:e3b6a91b173f7e836401a6a75c3906c26bd7fd39
1+
erlang 27.0
2+
elixir 1.17.0
33
zig 0.11.0

Diff for: flake.lock

+21-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: flake.nix

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
inputs = {
33
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
4+
zigpkgs = {
5+
url = "github:NixOS/nixpkgs/592a779f3c5e7bce1a02027abe11b7996816223f";
6+
};
47
};
58

69
nixConfig = {
@@ -11,6 +14,7 @@
1114
outputs = {
1215
self,
1316
nixpkgs,
17+
zigpkgs,
1418
}: let
1519
inherit (nixpkgs) lib;
1620

@@ -20,13 +24,14 @@
2024
forAllSystems = f:
2125
lib.genAttrs systems (system: let
2226
pkgs = nixpkgs.legacyPackages.${system};
23-
beamPackages = pkgs.beam_minimal.packages.erlang_26;
27+
zpkgs = zigpkgs.legacyPackages.${system};
28+
beamPackages = pkgs.beam_minimal.packages.erlang_27;
2429
otp = (pkgs.beam.packagesWith beamPackages.erlang).extend (final: prev: {
2530
elixir_1_17 = prev.elixir_1_16.override {
26-
rev = "e3b6a91b173f7e836401a6a75c3906c26bd7fd39";
31+
rev = "v1.17.0";
2732
# You can discover this using Trust On First Use by filling in `lib.fakeHash`
28-
sha256 = "sha256-RK0aMW7pz7kQtK9XXN1wVCBxKOJKdQD7I/53V8rWD04=";
29-
version = "1.17.0-dev";
33+
sha256 = "sha256-RBylCfD+aCsvCqWUIvqXi3izNqqQoNfQNnQiZxz0Igg=";
34+
version = "1.17.0";
3035
};
3136

3237
elixir = final.elixir_1_17;
@@ -36,7 +41,7 @@
3641
});
3742
elixir = otp.elixir;
3843
in
39-
f {inherit system pkgs beamPackages elixir;});
44+
f {inherit system pkgs zpkgs beamPackages elixir;});
4045

4146
systems = [
4247
"aarch64-darwin"
@@ -50,6 +55,7 @@
5055
system,
5156
beamPackages,
5257
elixir,
58+
...
5359
}: {
5460
default = lib.makeOverridable ({
5561
localBuild,
@@ -92,6 +98,7 @@
9298

9399
devShells = forAllSystems ({
94100
pkgs,
101+
zpkgs,
95102
beamPackages,
96103
elixir,
97104
...
@@ -117,7 +124,7 @@
117124
pkgs.openssl
118125
pkgs.starship
119126
pkgs.xz
120-
pkgs.zig_0_11
127+
zpkgs.zig_0_11
121128
pkgs.zsh
122129
];
123130
};

Diff for: mix.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ defmodule NextLS.MixProject do
7878
{:burrito, "~> 1.0", only: [:dev, :prod]},
7979
{:bypass, "~> 2.1", only: :test},
8080
{:dialyxir, ">= 0.0.0", only: [:dev, :test], runtime: false},
81-
{:credo, "~> 1.7.6", only: [:dev, :test], runtime: false},
81+
{:credo, "~> 1.7.7", only: [:dev, :test], runtime: false},
8282
{:ex_doc, ">= 0.0.0", only: :dev},
8383
{:styler, "~> 1.0-rc.0", only: :dev}
8484
]

Diff for: mix.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"cowboy": {:hex, :cowboy, "2.10.0", "ff9ffeff91dae4ae270dd975642997afe2a1179d94b1887863e43f681a203e26", [:make, :rebar3], [{:cowlib, "2.12.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "3afdccb7183cc6f143cb14d3cf51fa00e53db9ec80cdcd525482f5e99bc41d6b"},
1010
"cowboy_telemetry": {:hex, :cowboy_telemetry, "0.4.0", "f239f68b588efa7707abce16a84d0d2acf3a0f50571f8bb7f56a15865aae820c", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7d98bac1ee4565d31b62d59f8823dfd8356a169e7fcbb83831b8a5397404c9de"},
1111
"cowlib": {:hex, :cowlib, "2.12.1", "a9fa9a625f1d2025fe6b462cb865881329b5caff8f1854d1cbc9f9533f00e1e1", [:make, :rebar3], [], "hexpm", "163b73f6367a7341b33c794c4e88e7dbfe6498ac42dcd69ef44c5bc5507c8db0"},
12-
"credo": {:hex, :credo, "1.7.6", "b8f14011a5443f2839b04def0b252300842ce7388f3af177157c86da18dfbeea", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "146f347fb9f8cbc5f7e39e3f22f70acbef51d441baa6d10169dd604bfbc55296"},
12+
"credo": {:hex, :credo, "1.7.7", "771445037228f763f9b2afd612b6aa2fd8e28432a95dbbc60d8e03ce71ba4446", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "8bc87496c9aaacdc3f90f01b7b0582467b69b4bd2441fe8aae3109d843cc2f2e"},
1313
"ctx": {:hex, :ctx, "0.6.0", "8ff88b70e6400c4df90142e7f130625b82086077a45364a78d208ed3ed53c7fe", [:rebar3], [], "hexpm", "a14ed2d1b67723dbebbe423b28d7615eb0bdcba6ff28f2d1f1b0a7e1d4aa5fc2"},
1414
"db_connection": {:hex, :db_connection, "2.5.0", "bb6d4f30d35ded97b29fe80d8bd6f928a1912ca1ff110831edcd238a1973652c", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c92d5ba26cd69ead1ff7582dbb860adeedfff39774105a4f1c92cbb654b55aa2"},
1515
"dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"},

Diff for: test/next_ls/hover_test.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ defmodule NextLS.HoverTest do
313313
"contents" => %{
314314
"kind" => "markdown",
315315
"value" =>
316-
"## :timer.sleep/1\n\n`sleep/1`\n\nSuspends the process" <>
316+
"## :timer.sleep/1\n\n`sleep(Time)`\n\nSuspends the process" <>
317317
_
318318
},
319319
"range" => %{

0 commit comments

Comments
 (0)