wende / elchemy

Write Elixir code using statically-typed Elm-like syntax (compatible with Elm tooling)

Home Page:https://wende.github.io/elchemy/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New projects no longer work with current instructions

deke opened this issue · comments

With the introduction of commit ce82efb, the current instruction of

Make sure to add:
|> Code.eval_file(".elchemy.exs").init
to your mix.exs file as the last line of the project() function.

is no longer sufficient.

elchemy new myapp does not generate a :name atom in the project keyword list, so line 6 in the .elchemy.exs file if !project || !project[:name] do will always fail.

Some possible fixes:

  • The warning message should reflect that the project keyword list should contain a :name and the instructions updated

  • the requirement should be dropped

  • elchemy new myapp` should generate the :name

  • the value of :app turned into a string and added to the projects keyword list as :name in ElchemyInit.init function

Good call @deke. Mentioned in a PR, how about checking for :deps instead. I don't think it's possible to create a project without deps field in it.

Fix released in 0.7.3