Hello community,

here is the log from the commit of package elixir for openSUSE:Factory checked 
in at 2019-02-20 14:12:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/elixir (Old)
 and      /work/SRC/openSUSE:Factory/.elixir.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "elixir"

Wed Feb 20 14:12:05 2019 rev:3 rq:677393 version:1.8.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/elixir/elixir.changes    2019-02-15 
09:55:43.391753852 +0100
+++ /work/SRC/openSUSE:Factory/.elixir.new.28833/elixir.changes 2019-02-20 
14:12:15.858920780 +0100
@@ -1,0 +2,15 @@
+Tue Feb 19 15:38:20 UTC 2019 - [email protected]
+
+- Elixir 1.8.1
+  * Bug fixes
+    Elixir
+    [Float] Fix rounding for subnormal floats
+    IEx
+    [IEx] Fix IEx.pry crash when IEx isn't running
+    [IEx.CLI] Add IEx warning when using --remsh with "dumb" terminal
+    [IEx.Helpers] Sort results by arity on h helper
+    Mix
+    [mix compile] Do not include optional dependencies in extra applications 
as it is 
+    incompatible with shared deps in umbrellas
+
+-------------------------------------------------------------------

Old:
----
  elixir-1.8.0.tar.gz

New:
----
  elixir-1.8.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ elixir-doc.spec ++++++
--- /var/tmp/diff_new_pack.BcXLOs/_old  2019-02-20 14:12:16.462920579 +0100
+++ /var/tmp/diff_new_pack.BcXLOs/_new  2019-02-20 14:12:16.462920579 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           elixir-doc
-Version:        1.8.0 
+Version:        1.8.1 
 Release:        0
 Summary:        Documentation for elixir
 License:        Apache-2.0

elixir.spec: same change
++++++ elixir-1.8.0.tar.gz -> elixir-1.8.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elixir-1.8.0/CHANGELOG.md 
new/elixir-1.8.1/CHANGELOG.md
--- old/elixir-1.8.0/CHANGELOG.md       2019-01-14 15:29:07.000000000 +0100
+++ new/elixir-1.8.1/CHANGELOG.md       2019-01-30 11:37:58.000000000 +0100
@@ -63,7 +63,25 @@
 
 This small feature is very powerful. It allows instrumentation and monitoring 
tools to better track and relate the events happening in your system. This 
feature can also be used by tools like the "Ecto Sandbox". The "Ecto Sandbox" 
allows developers to run tests concurrently against the database, by using 
transactions and an ownership mechanism where each process explicitly gets a 
connection assigned to it. Without `$callers`, every time you spawned a task 
that queries the database, the task would not know its caller, and therefore it 
would be unable to know which connection was assigned to it. This often meant 
features that relies on tasks could not be tested concurrently. With 
`$callers`, figuring out this relationship is trivial and you have more tests 
using the full power of your machine.
 
-## v1.8.0 (2018-01-14)
+## v1.8.1 (2019-01-30)
+
+### 1. Bug fixes
+
+#### Elixir
+
+  * [Float] Fix rounding for subnormal floats
+
+#### IEx
+
+  * [IEx] Fix `IEx.pry` crash when IEx isn't running
+  * [IEx.CLI] Add IEx warning when using `--remsh` with dumb terminal
+  * [IEx.Helpers] Sort results by arity on `h` helper
+
+#### Mix
+
+  * [mix compile] Do not include optional dependencies in extra applications 
as it is incompatible with shared deps in umbrellas
+
+## v1.8.0 (2019-01-14)
 
 ### 1. Enhancements
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elixir-1.8.0/VERSION new/elixir-1.8.1/VERSION
--- old/elixir-1.8.0/VERSION    2019-01-14 15:29:07.000000000 +0100
+++ new/elixir-1.8.1/VERSION    2019-01-30 11:37:58.000000000 +0100
@@ -1 +1 @@
-1.8.0
\ No newline at end of file
+1.8.1
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elixir-1.8.0/lib/elixir/lib/calendar/datetime.ex 
new/elixir-1.8.1/lib/elixir/lib/calendar/datetime.ex
--- old/elixir-1.8.0/lib/elixir/lib/calendar/datetime.ex        2019-01-14 
15:29:07.000000000 +0100
+++ new/elixir-1.8.1/lib/elixir/lib/calendar/datetime.ex        2019-01-30 
11:37:58.000000000 +0100
@@ -480,9 +480,11 @@
 
   ## Examples
 
-      iex> {:ok, datetime} = DateTime.now("Europe/Copenhagen", 
FakeTimeZoneDatabase)
+      iex> {:ok, datetime} = DateTime.now("Etc/UTC")
       iex> datetime.time_zone
-      "Europe/Copenhagen"
+      "Etc/UTC"
+      iex> DateTime.now("Europe/Copenhagen")
+      {:error, :utc_only_time_zone_database}
       iex> DateTime.now("not a real time zone name", FakeTimeZoneDatabase)
       {:error, :time_zone_not_found}
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elixir-1.8.0/lib/elixir/lib/float.ex 
new/elixir-1.8.1/lib/elixir/lib/float.ex
--- old/elixir-1.8.0/lib/elixir/lib/float.ex    2019-01-14 15:29:07.000000000 
+0100
+++ new/elixir-1.8.1/lib/elixir/lib/float.ex    2019-01-30 11:37:58.000000000 
+0100
@@ -268,16 +268,14 @@
     raise ArgumentError, invalid_precision_message(precision)
   end
 
+  defp round(0.0, _precision, _rounding), do: 0.0
+
   defp round(float, precision, rounding) do
     <<sign::1, exp::11, significant::52-bitstring>> = <<float::float>>
     {num, count, _} = decompose(significant, 1)
     count = count - exp + 1023
 
     cond do
-      # There is no decimal precision on subnormal floats
-      count <= 0 or exp == 0 ->
-        float
-
       # Precision beyond 15 digits
       count >= 104 ->
         case rounding do
@@ -444,11 +442,11 @@
     {acc, last_count, last_power}
   end
 
+  @compile {:inline, sign: 2, shift_left: 2}
   defp sign(0, num), do: num
   defp sign(1, num), do: -num
 
-  defp shift_left(num, 0), do: num
-  defp shift_left(num, times), do: shift_left(num <<< 1, times - 1)
+  defp shift_left(num, times), do: num <<< times
 
   defp shift_right(num, 0), do: {num, 0}
   defp shift_right(1, times), do: {1, times}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elixir-1.8.0/lib/elixir/test/elixir/float_test.exs 
new/elixir-1.8.1/lib/elixir/test/elixir/float_test.exs
--- old/elixir-1.8.0/lib/elixir/test/elixir/float_test.exs      2019-01-14 
15:29:07.000000000 +0100
+++ new/elixir-1.8.1/lib/elixir/test/elixir/float_test.exs      2019-01-30 
11:37:58.000000000 +0100
@@ -55,21 +55,41 @@
     assert Float.floor(1.32453e-10) === 0.0
   end
 
-  test "floor/2 with precision" do
-    assert Float.floor(12.524235, 0) === 12.0
-    assert Float.floor(-12.524235, 0) === -13.0
-
-    assert Float.floor(12.52, 2) === 12.51
-    assert Float.floor(-12.52, 2) === -12.52
-
-    assert Float.floor(12.524235, 2) === 12.52
-    assert Float.floor(-12.524235, 3) === -12.525
+  describe "floor/2" do
+    test "with 0.0" do
+      for precision <- 0..15 do
+        assert Float.floor(0.0, precision) === 0.0
+        assert Float.floor(-0.0, precision) === -0.0
+      end
+    end
 
-    assert Float.floor(12.32453e-20, 2) === 0.0
-    assert Float.floor(-12.32453e-20, 2) === -0.01
+    test "floor/2 with precision" do
+      assert Float.floor(12.524235, 0) === 12.0
+      assert Float.floor(-12.524235, 0) === -13.0
+
+      assert Float.floor(12.52, 2) === 12.51
+      assert Float.floor(-12.52, 2) === -12.52
+
+      assert Float.floor(12.524235, 2) === 12.52
+      assert Float.floor(-12.524235, 3) === -12.525
+
+      assert Float.floor(12.32453e-20, 2) === 0.0
+      assert Float.floor(-12.32453e-20, 2) === -0.01
+
+      assert_raise ArgumentError, "precision 16 is out of valid range of 
0..15", fn ->
+        Float.floor(1.1, 16)
+      end
+    end
 
-    assert_raise ArgumentError, "precision 16 is out of valid range of 0..15", 
fn ->
-      Float.floor(1.1, 16)
+    test "with subnormal floats" do
+      assert Float.floor(-5.0e-324, 0) === -1.0
+      assert Float.floor(-5.0e-324, 1) === -0.1
+      assert Float.floor(-5.0e-324, 2) === -0.01
+      assert Float.floor(-5.0e-324, 15) === -0.000000000000001
+
+      for precision <- 0..15 do
+        assert Float.floor(5.0e-324, precision) === 0.0
+      end
     end
   end
 
@@ -88,36 +108,72 @@
     assert Float.ceil(0.0) === 0.0
   end
 
-  test "ceil/2 with precision" do
-    assert Float.ceil(12.524235, 0) === 13.0
-    assert Float.ceil(-12.524235, 0) === -12.0
+  describe "ceil/2" do
+    test "with 0.0" do
+      for precision <- 0..15 do
+        assert Float.ceil(0.0, precision) === 0.0
+        assert Float.ceil(-0.0, precision) === -0.0
+      end
+    end
 
-    assert Float.ceil(12.52, 2) === 12.52
-    assert Float.ceil(-12.52, 2) === -12.51
+    test "with regular floats" do
+      assert Float.ceil(12.524235, 0) === 13.0
+      assert Float.ceil(-12.524235, 0) === -12.0
 
-    assert Float.ceil(12.524235, 2) === 12.53
-    assert Float.ceil(-12.524235, 3) === -12.524
+      assert Float.ceil(12.52, 2) === 12.52
+      assert Float.ceil(-12.52, 2) === -12.51
 
-    assert Float.ceil(12.32453e-20, 2) === 0.01
-    assert Float.ceil(-12.32453e-20, 2) === 0.0
+      assert Float.ceil(12.524235, 2) === 12.53
+      assert Float.ceil(-12.524235, 3) === -12.524
 
-    assert Float.ceil(0.0, 2) === 0.0
+      assert Float.ceil(12.32453e-20, 2) === 0.01
+      assert Float.ceil(-12.32453e-20, 2) === 0.0
 
-    assert_raise ArgumentError, "precision 16 is out of valid range of 0..15", 
fn ->
-      Float.ceil(1.1, 16)
+      assert Float.ceil(0.0, 2) === 0.0
+
+      assert_raise ArgumentError, "precision 16 is out of valid range of 
0..15", fn ->
+        Float.ceil(1.1, 16)
+      end
+    end
+
+    test "with subnormal floats" do
+      assert Float.ceil(5.0e-324, 0) === 1.0
+      assert Float.ceil(5.0e-324, 1) === 0.1
+      assert Float.ceil(5.0e-324, 2) === 0.01
+      assert Float.ceil(5.0e-324, 15) === 0.000000000000001
+
+      for precision <- 0..15 do
+        assert Float.ceil(-5.0e-324, precision) === -0.0
+      end
     end
   end
 
-  test "round/2" do
-    assert Float.round(5.5675, 3) === 5.567
-    assert Float.round(-5.5674, 3) === -5.567
-    assert Float.round(5.5, 3) === 5.5
-    assert Float.round(5.5e-10, 10) === 5.0e-10
-    assert Float.round(5.5e-10, 8) === 0.0
-    assert Float.round(5.0, 0) === 5.0
+  describe "round/2" do
+    test "with 0.0" do
+      for precision <- 0..15 do
+        assert Float.round(0.0, precision) === 0.0
+        assert Float.round(-0.0, precision) === -0.0
+      end
+    end
 
-    assert_raise ArgumentError, "precision 16 is out of valid range of 0..15", 
fn ->
-      Float.round(1.1, 16)
+    test "with regular floats" do
+      assert Float.round(5.5675, 3) === 5.567
+      assert Float.round(-5.5674, 3) === -5.567
+      assert Float.round(5.5, 3) === 5.5
+      assert Float.round(5.5e-10, 10) === 5.0e-10
+      assert Float.round(5.5e-10, 8) === 0.0
+      assert Float.round(5.0, 0) === 5.0
+
+      assert_raise ArgumentError, "precision 16 is out of valid range of 
0..15", fn ->
+        Float.round(1.1, 16)
+      end
+    end
+
+    test "with subnormal floats" do
+      for precision <- 0..15 do
+        assert Float.round(5.0e-324, precision) === 0.0
+        assert Float.round(-5.0e-324, precision) === -0.0
+      end
     end
   end
 
@@ -126,6 +182,12 @@
       assert Float.ratio(0.0) == {0, 1}
     end
 
+    test "with regular floats" do
+      assert Float.ratio(3.14) == {7_070_651_414_971_679, 
2_251_799_813_685_248}
+      assert Float.ratio(-3.14) == {-7_070_651_414_971_679, 
2_251_799_813_685_248}
+      assert Float.ratio(1.5) == {3, 2}
+    end
+
     test "with subnormal floats" do
       assert Float.ratio(5.0e-324) ==
                {1,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elixir-1.8.0/lib/iex/lib/iex/broker.ex 
new/elixir-1.8.1/lib/iex/lib/iex/broker.ex
--- old/elixir-1.8.0/lib/iex/lib/iex/broker.ex  2019-01-14 15:29:07.000000000 
+0100
+++ new/elixir-1.8.1/lib/iex/lib/iex/broker.ex  2019-01-30 11:37:58.000000000 
+0100
@@ -82,7 +82,13 @@
   @spec take_over(binary, keyword) ::
           {:ok, server :: pid, group_leader :: pid} | {:error, :no_iex | 
:refused}
   def take_over(identifier, opts) do
-    GenServer.call(@name, {:take_over, identifier, opts}, :infinity)
+    case GenServer.whereis(@name) do
+      nil ->
+        {:error, :no_iex}
+
+      _pid ->
+        GenServer.call(@name, {:take_over, identifier, opts}, :infinity)
+    end
   end
 
   ## Callbacks
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elixir-1.8.0/lib/iex/lib/iex/cli.ex 
new/elixir-1.8.1/lib/iex/lib/iex/cli.ex
--- old/elixir-1.8.0/lib/iex/lib/iex/cli.ex     2019-01-14 15:29:07.000000000 
+0100
+++ new/elixir-1.8.1/lib/iex/lib/iex/cli.ex     2019-01-30 11:37:58.000000000 
+0100
@@ -53,6 +53,13 @@
     if tty_works?() do
       :user_drv.start([:"tty_sl -c -e", tty_args()])
     else
+      if get_remsh(:init.get_plain_arguments()) do
+        IO.puts(
+          :stderr,
+          "warning: the --remsh option will be ignored because IEx is running 
on limited shell"
+        )
+      end
+
       :application.set_env(:stdlib, :shell_prompt_func, {__MODULE__, :prompt})
       :user.start()
       local_start()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elixir-1.8.0/lib/iex/lib/iex/introspection.ex 
new/elixir-1.8.1/lib/iex/lib/iex/introspection.ex
--- old/elixir-1.8.0/lib/iex/lib/iex/introspection.ex   2019-01-14 
15:29:07.000000000 +0100
+++ new/elixir-1.8.1/lib/iex/lib/iex/introspection.ex   2019-01-30 
11:37:58.000000000 +0100
@@ -283,6 +283,7 @@
             true ->
               module.module_info(:exports)
           end
+          |> Enum.sort()
 
         result =
           for {^function, arity} <- exports,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elixir-1.8.0/lib/iex/test/iex/helpers_test.exs 
new/elixir-1.8.1/lib/iex/test/iex/helpers_test.exs
--- old/elixir-1.8.0/lib/iex/test/iex/helpers_test.exs  2019-01-14 
15:29:07.000000000 +0100
+++ new/elixir-1.8.1/lib/iex/test/iex/helpers_test.exs  2019-01-30 
11:37:58.000000000 +0100
@@ -343,6 +343,12 @@
              """
 
       assert capture_io(fn -> h(:timer.send_interval()) end) == """
+             * :timer.send_interval/2
+
+               @spec send_interval(time, message) :: {:ok, tRef} | {:error, 
reason}
+                     when time: time(), message: term(), tRef: tref(), reason: 
term()
+
+             Module was compiled without docs. Showing only specs.
              * :timer.send_interval/3
 
                @spec send_interval(time, pid, message) :: {:ok, tRef} | 
{:error, reason}
@@ -353,12 +359,6 @@
                           reason: term()
 
              Module was compiled without docs. Showing only specs.
-             * :timer.send_interval/2
-
-               @spec send_interval(time, message) :: {:ok, tRef} | {:error, 
reason}
-                     when time: time(), message: term(), tRef: tref(), reason: 
term()
-
-             Module was compiled without docs. Showing only specs.
              """
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elixir-1.8.0/lib/mix/lib/mix/dep.ex 
new/elixir-1.8.1/lib/mix/lib/mix/dep.ex
--- old/elixir-1.8.0/lib/mix/lib/mix/dep.ex     2019-01-14 15:29:07.000000000 
+0100
+++ new/elixir-1.8.1/lib/mix/lib/mix/dep.ex     2019-01-30 11:37:58.000000000 
+0100
@@ -132,13 +132,18 @@
       for dep <- deps,
           dep.app == app,
           child <- dep.deps,
-          do: {child.app, true},
+          do: {child.app, Keyword.get(child.opts, :optional, false)},
           into: %{}
 
-    Enum.map(children, fn %{app: app} = dep ->
+    Enum.map(children, fn %{app: app, opts: opts} = dep ->
+      # optional only matters at the top level. Any non-top level dependency
+      # that is optional and is still available means it has been fulfilled.
       case top_level do
-        %{^app => _} -> %{dep | top_level: true}
-        %{} -> %{dep | top_level: false}
+        %{^app => optional} ->
+          %{dep | top_level: true, opts: Keyword.put(opts, :optional, 
optional)}
+
+        %{} ->
+          %{dep | top_level: false, opts: Keyword.delete(opts, :optional)}
       end
     end)
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elixir-1.8.0/lib/mix/lib/mix/tasks/compile.app.ex 
new/elixir-1.8.1/lib/mix/lib/mix/tasks/compile.app.ex
--- old/elixir-1.8.0/lib/mix/lib/mix/tasks/compile.app.ex       2019-01-14 
15:29:07.000000000 +0100
+++ new/elixir-1.8.1/lib/mix/lib/mix/tasks/compile.app.ex       2019-01-30 
11:37:58.000000000 +0100
@@ -212,7 +212,7 @@
     apps =
       properties
       |> Keyword.get(:applications)
-      |> Kernel.||(apps_from_prod_deps(properties, config))
+      |> Kernel.||(apps_from_prod_non_optional_deps(properties, config))
       |> normalize_apps(extra, config)
 
     Keyword.put(properties, :applications, apps)
@@ -317,11 +317,12 @@
     end)
   end
 
-  defp apps_from_prod_deps(properties, config) do
+  defp apps_from_prod_non_optional_deps(properties, config) do
     included_applications = Keyword.get(properties, :included_applications, [])
     non_runtime_deps = non_runtime_deps(config)
 
-    for %{app: app, top_level: true} <- Mix.Dep.cached(),
+    for %{app: app, opts: opts, top_level: true} <- Mix.Dep.cached(),
+        not Keyword.get(opts, :optional, false),
         not Map.has_key?(non_runtime_deps, app),
         app not in included_applications,
         do: app
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elixir-1.8.0/lib/mix/test/mix/dep_test.exs 
new/elixir-1.8.1/lib/mix/test/mix/dep_test.exs
--- old/elixir-1.8.0/lib/mix/test/mix/dep_test.exs      2019-01-14 
15:29:07.000000000 +0100
+++ new/elixir-1.8.1/lib/mix/test/mix/dep_test.exs      2019-01-30 
11:37:58.000000000 +0100
@@ -196,6 +196,31 @@
     end)
   end
 
+  test "nested deps with optional matching" do
+    Process.put(:custom_deps_git_repo_opts, optional: true)
+
+    # deps_repo brings git_repo but it is optional
+    deps = [
+      {:deps_repo, "0.1.0", path: "custom/deps_repo"},
+      {:git_repo, "0.1.0", git: MixTest.Case.fixture_path("git_repo")}
+    ]
+
+    with_deps(deps, fn ->
+      in_fixture("deps_status", fn ->
+        File.mkdir_p!("custom/deps_repo/lib")
+
+        File.write!("custom/deps_repo/lib/a.ex", """
+        # Check that the child dependency is top_level and optional
+        [%Mix.Dep{app: :git_repo, top_level: true, opts: opts}] = 
Mix.Dep.cached()
+        true = Keyword.fetch!(opts, :optional)
+        """)
+
+        Mix.Tasks.Deps.Get.run([])
+        Mix.Tasks.Deps.Compile.run([])
+      end)
+    end)
+  end
+
   test "nested deps with convergence and optional dependencies" do
     deps = [
       {:deps_repo, "0.1.0", path: "custom/deps_repo"},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/elixir-1.8.0/lib/mix/test/mix/tasks/compile.app_test.exs 
new/elixir-1.8.1/lib/mix/test/mix/tasks/compile.app_test.exs
--- old/elixir-1.8.0/lib/mix/test/mix/tasks/compile.app_test.exs        
2019-01-14 15:29:07.000000000 +0100
+++ new/elixir-1.8.1/lib/mix/test/mix/tasks/compile.app_test.exs        
2019-01-30 11:37:58.000000000 +0100
@@ -99,7 +99,7 @@
       properties = parse_resource_file(:custom_deps)
 
       assert properties[:applications] ==
-               [:kernel, :stdlib, :elixir, :logger, :ok1, :ok3, :ok4, :ok6, 
:ok7]
+               [:kernel, :stdlib, :elixir, :logger, :ok1, :ok3, :ok4, :ok7]
     end)
   end
 


Reply via email to