From 90e62012a5dfe5e900d67c9bb7edeb02c51b09b1 Mon Sep 17 00:00:00 2001 From: takasehideki Date: Wed, 6 Nov 2024 12:43:55 +0900 Subject: [PATCH 1/3] Bump Elixir and Erlang versions used for development --- .github/workflows/ci.yml | 4 ++-- .tool-versions | 4 ++-- README.md | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73e6d11..d6d1f65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,8 @@ name: CI env: - OTP_VERSION: 26.1.2 - ELIXIR_VERSION: 1.15.7 + OTP_VERSION: 27.1.2 + ELIXIR_VERSION: 1.17.3 MIX_ENV: test # based https://github.com/erlef/setup-beam diff --git a/.tool-versions b/.tool-versions index 510eaf4..d8df771 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -elixir 1.15.7-otp-26 -erlang 26.1.2 +elixir 1.17.3-otp-27 +erlang 27.1.2 diff --git a/README.md b/README.md index 421bcbb..3b304b5 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,12 @@ This allows the creation and communication of a large number of fault-tolerant n We recommend you use the same version to communicate with other Zenoh clients or routers since version compatibility is somewhat important for Zenoh. Please also check the description on [Releases](https://github.com/biyooon-ex/zenohex/releases) about the corresponding Zenoh version. +FYI, the development team currently uses the following versions. + +- Elixir 1.17.3-otp-27 +- Erlang/OTP 27.1.2 +- Rust 1.82.0 + ### Installation `zenohex` is [available in Hex](https://hex.pm/packages/zenohex). From b45426ffbf6594b18562dcff276366cb70b4f252 Mon Sep 17 00:00:00 2001 From: takasehideki Date: Wed, 6 Nov 2024 13:05:03 +0900 Subject: [PATCH 2/3] Fix floating value to `+0.0` explicitly --- test/zenohex/nif_test.exs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/zenohex/nif_test.exs b/test/zenohex/nif_test.exs index d777428..4832310 100644 --- a/test/zenohex/nif_test.exs +++ b/test/zenohex/nif_test.exs @@ -12,7 +12,7 @@ defmodule Zenohex.NifTest do describe "session" do for {type, value} <- [ {"integer", 0}, - {"float", 0.0}, + {"float", +0.0}, {"binary", :erlang.term_to_binary("binary")} ] do test "session_put_#{type}/2", %{session: session} do @@ -63,7 +63,7 @@ defmodule Zenohex.NifTest do for {type, value} <- [ {"integer", 0}, - {"float", 0.0}, + {"float", +0.0}, {"binary", :erlang.term_to_binary("binary")} ] do test "publisher_put_#{type}/2", %{session: session} do @@ -101,8 +101,8 @@ defmodule Zenohex.NifTest do Nif.publisher_put_integer(publisher, 0) assert {:ok, %Sample{value: 0}} = Nif.subscriber_recv_timeout(subscriber, 1000) - Nif.publisher_put_float(publisher, 0.0) - assert {:ok, %Sample{value: 0.0}} = Nif.subscriber_recv_timeout(subscriber, 1000) + Nif.publisher_put_float(publisher, +0.0) + assert {:ok, %Sample{value: +0.0}} = Nif.subscriber_recv_timeout(subscriber, 1000) Nif.publisher_put_binary(publisher, "binary") assert {:ok, %Sample{value: "binary"}} = Nif.subscriber_recv_timeout(subscriber, 1000) From ec176d6513a08eb939a2af245c22d39c896ca0a5 Mon Sep 17 00:00:00 2001 From: takasehideki Date: Wed, 6 Nov 2024 18:16:34 +0900 Subject: [PATCH 3/3] Set threshold of `mix.test --cover` to 80% --- mix.exs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index b84f5ed..905cdd7 100644 --- a/mix.exs +++ b/mix.exs @@ -93,7 +93,9 @@ defmodule Zenohex.MixProject do defp test_coverage() do [ - ignore_modules: [Zenohex.Nif] + ignore_modules: [Zenohex.Nif], + # WHY: see https://github.com/biyooon-ex/zenohex/issues/77 + summary: [threshold: 80] ] end