HackerExperience / Helix

GNU Affero General Public License v3.0
53 stars 10 forks source link

(CompileError) lib/software/model/file.ex:220: cannot verify size of binary expression in match #414

Open ssnodgrass opened 5 years ago

ssnodgrass commented 5 years ago

Receiving a compilation error when running: MIX_ENV=prod mix do deps.get, compile, release --env=prod

Full error is: `== Compilation error in file lib/software/model/file.ex == ** (CompileError) lib/software/model/file.ex:220: cannot verify size of binary expression in match. If you are concatenating two binaries or nesting a binary inside a bitstring, you need to make sure the size of all fieds in the binary expression are known. The following examples are invalid:

"foo" <> <<field, rest::bits>>
<<"foo", <<field, rest::bitstring>>::binary>>

They are invalid because there is a bits/bitstring component of unknown size given as argument. Those examples could be fixed as:

"foo" <> <<field, rest::binary>>
<<"foo", <<field, rest::bitstring>>::bitstring>>

Got: <<path::bitstring()-size(path_size)>> :: binary() (elixir) src/elixir_bitstring.erl:60: :elixir_bitstring.expand/7 (elixir) src/elixir_bitstring.erl:10: :elixir_bitstring.expand/4 (elixir) expanding macro: Kernel.<>/2 lib/software/model/file.ex:220: Helix.Software.Model.File.remove_trailing_slash/1 `