slouchpie

slouchpie

using map.field notation (without parentheses) to invoke X is deprecated, you must add parentheses instead

Does anyone know a quick way to suppress this? This warning is drowning out other logs.

0
Post #22
Eiji

Eiji

Doesn’t mix format solve this?

0
Post #23
slouchpie

slouchpie

It is warning about code in the deps.

0
Post #24
Eiji

Eiji

Oh, yeah - it’s often thing when you update your Elixir version. Well … you don’t need to see logs of dependencies, so maybe simply call mix deps.compile and mix compile separately then? After first one you can just clear your console. :see_no_evil:

3
Post #25
baa

baa

At the moment, Elixir developers will interact with set-theoretic types only through warnings found by the type system.

I’d love to test out the new type system and see the new warnings. I tried an example based on the reference document, but I think I must be doing something wrong:

defmodule Test do
  def negate(x) when is_integer(x), do: -x
  def negate(x) when is_boolean(x), do: not x

  def test() do
    IO.puts negate(1)
    IO.puts negate(true)
    
    # warning expected?
    IO.puts negate("Hello")
  end
end

Compile Output:

$ mix compile --force
Compiling 1 file (.ex)
Generated test_elixir_types app

Mix version:

$ mix --version
Erlang/OTP 26 [erts-14.2.5] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]

Mix 1.17.0-rc.0 (a2600ea) (compiled with Erlang/OTP 26)

Any ideas on what I’m missing?

3
Post #26
Eiji

Eiji

I have same results. It’s just a start and not everything is covered yet. However if you need to debug such mistakes you can try using dialyxir. :link:

0
Post #27
sodapopcan

sodapopcan

I noticed this too but on a re-read, I believe the opening paragraph of the Warnings from gradual set-theoretic types is slightly confusing and not meant to mean all patterns and guard. I believe it’s just examples in the second bulleted list that work (as in my experimenting everything there works).

2
Post #28
ChaseGilliam

ChaseGilliam

Has anyone been able to reproduce this ecto issue on 1.17? I’ll test it out on Tuesday, but I’m curious if it is expected to be resolved.

0
Post #29
kip

kip

ex_cldr Core Team

I can only suggest opening an issue in the relevant deps.

As a library writer I try to get ahead of the elixir release curve, but typically only work in earnest at the first release candidate (so now for Elixir 1.17). I suspect that’s true for other library writers too.

3
Post #30
mudasobwa

mudasobwa

Creator of Cure

At least for one of them, yes :slight_smile:

2
Post #31