Possible error in Mix.Config.read

I am using Mix.Config.read! to read a exs file at runtime as a configuration file. I think there may have been a regression in Elixir 1.4. I am now getting an error when I use Mix.Config.read!. This worked correctly in Elixir 1.3.

The offending line in my code can be found at Mix.Config.read!

An Example Config File is also available.

When I start my application, I get a traceback:

iex(1)> Mix.Config.read!('modbus_map.exs')
** (Mix.Config.LoadError) could not load config modbus_map.exs
     ** (CaseClauseError) no case clause matching: {:file, 'modbus_map.exs'}
     (elixir) lib/code.ex:170: Code.eval_string/3
                lib/mix/config.ex:180: Mix.Config.read!/2

should work with double quotes eg:

Thank you. You are correct. I come from a Python background where single and double quotes are treated pretty much the same way.

1 Like

For people who are curious what the difference is:

Single quotes create character lists (lists of integers representing characters, printed as single quoted strings if they only contain values within the printable ASCII range):

iex>  [h | t] = 'hej'
iex>  h
iex> t

Double quotes create/represent binaries.