Skip to content

v1.20.0-rc0 Compilation error BadMapError #15052

@Ljzn

Description

@Ljzn

Elixir and Erlang/OTP versions

elixir version:

1.20.0-rc.0-otp-26

Operating system

OSX

Current behavior

Compiling a project with dep https://github.com/beatrichartz/csv/releases/tag/v2.5.0

4> 
4> == Compilation error in file lib/csv/decoding/preprocessing/lines.ex ==
4> ** (RuntimeError) found error while checking types for CSV.Decoding.Preprocessing.Lines.process/1:
4> 
4> ** (RuntimeError) found error while checking types for CSV.Decoding.Preprocessing.Lines.process/2:
4> 
4> ** (RuntimeError) found error while checking types for CSV.Decoding.Preprocessing.Lines.d_process/2:
4> 
4> ** (RuntimeError) found error while checking types for CSV.Decoding.Preprocessing.Lines.do_process/4:
4> 
4> ** (RuntimeError) found error while checking types for CSV.Decoding.Preprocessing.Lines.start_sequence/3:
4> 
4> ** (RuntimeError) found error while checking types for CSV.Decoding.Preprocessing.Lines.starts_sequence?/2:
4> 
4> ** (RuntimeError) found error while checking types for CSV.Decoding.Preprocessing.Lines.starts_sequence?/5:
4> 
4> ** (BadMapError) expected a map, got:
4> 
4>     {false, %{bitmap: 9}}
4> 
4> The exception happened while checking this code:
4> 
4> defp starts_sequence?(<<34::utf8, tail::binary>>, last_token, false, separator, _)
4>      when :erlang.==(last_token, <<separator::utf8>>) do
4>   starts_sequence?(tail, 34, true, separator, tail)
4> end
4> 
4> Please report this bug at: https://github.com/elixir-lang/elixir/issues
4> 
4> The exception happened while checking this code:
4> 
4> defp starts_sequence?(line, separator) do
4>   starts_sequence?(line, "", false, separator, "")
4> end
4> 
4> Please report this bug at: https://github.com/elixir-lang/elixir/issues
4> 
4> The exception happened while checking this code:
4> 
4> defp start_sequence(line, line_index, separator) do
4>   {starts_sequence, sequence_start} = starts_sequence?(line, separator)
4> 
4>   cond do
4>     starts_sequence -> {[], {[line], sequence_start, line_index, 1}}
4>     true -> {[line], {[], "", 0, 0}}
4>   end
4> end
4> 
4> Please report this bug at: https://github.com/elixir-lang/elixir/issues
4> 
4> The exception happened while checking this code:
4> 
4> defp do_process({line, line_index}, {[], _, _, _}, separator, _) do
4>   start_sequence(line, line_index, separator)
4> end
4> 
4> Please report this bug at: https://github.com/elixir-lang/elixir/issues
4> 
4> The exception happened while checking this code:
4> 
4> defp d_process(stream, options) do
4>   separator = Keyword.get(options, :separator, 44)
4>   escape_max_lines = Keyword.get(options, :escape_max_lines, 1000)
4> 
4>   Stream.transform(
4>     Stream.with_index(stream),
4>     fn -> {[], "", 0, 0} end,
4>     fn capture, capture -> do_process(capture, capture, separator, escape_max_lines) end,
4>     fn _ -> :ok end
4>   )
4> end
4> 
4> Please report this bug at: https://github.com/elixir-lang/elixir/issues
4> 
4> The exception happened while checking this code:
4> 
4> def process(stream, options) do
4>   d_process(
4>     Stream.concat(
4>       stream,
4>       [:stream_end]
4>     ),
4>     options
4>   )
4> end
4> 
4> Please report this bug at: https://github.com/elixir-lang/elixir/issues
4> 
4> The exception happened while checking this code:
4> 
4> def process(x0) do
4>   super(x0, [])
4> end
4> 
4> Please report this bug at: https://github.com/elixir-lang/elixir/issues
4> 
4>     :erlang.map_size({false, %{bitmap: 9}})
4>     (elixir 1.20.0-rc.0) lib/module/types/descr.ex:5443: Module.Types.Descr.symmetrical_intersection/3
4>     (elixir 1.20.0-rc.0) lib/module/types/descr.ex:460: Module.Types.Descr.compatible_intersection/2
4>     (elixir 1.20.0-rc.0) lib/module/types/of.ex:108: Module.Types.Of.refine_body_var/5
4>     (elixir 1.20.0-rc.0) lib/module/types/of.ex:528: Module.Types.Of.bitstring_segment/5
4>     (elixir 1.20.0-rc.0) lib/module/types/of.ex:480: Module.Types.Of.bitstring/5
4>     (elixir 1.20.0-rc.0) lib/module/types/apply.ex:576: Module.Types.Apply.compare/8
4>     (elixir 1.20.0-rc.0) lib/module/types/apply.ex:346: Module.Types.Apply.remote/8
4> could not compile dependency :csv, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile csv --force", update it with "mix deps.update csv" or clean it with "mix deps.clean csv"
** (Mix) mix deps.partition #Port<0.72> closed unexpectedly (set MIX_OS_DEPS_COMPILE_PARTITION_COUNT=1 to run in serial)

Expected behavior

no error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions