lfe/rebar3

Old rebar3_lfe plugin reference

houdelou opened this issue · 4 comments

I created a new project with rebar3 new lfe-app lfebudget and the rebar3_lfe plugin is version 0.3.0. I got an undef error. I changed it to 0.4.8 and problem solved. I noticed the templates still contains 0.3.0.

Hrm. I've checked the rebar.config* here: https://github.com/lfe/rebar3/tree/release/0.4.x/priv/templates

It looks like they all have the correct versions.

There's some caching that rebar3 does on our systems, and perhaps you have an older version that's being used, instead of the latest from hex.pm/Github?

Try this, and then create another project -- hopefully you'll see the same versions that are in the repo:

rm -rf ~/.cache/rebar3/plugins/rebar3_lfe/ 

You should probably check to see if you have a ~/.config/rebar3/rebar.config file; one can pin dep/plugin versions there, too ... so versions should be checked there, too.

Just to be sure, I'll do the same at my end, and make sure the latest release on Hex.pm has the same version of templates that are in the repo ...

Yeah, just confirmed when rebar3_lfe isn't on the system locally (deleted from the cache), the latest version pulled down from hex.pm is rebar3_lfe v0.4.8, and after creating a new project (using the command as you did above), the correct version of the dep is present:

$ grep rebar3_lfe lfebudget/rebar.config
    {rebar3_lfe, "0.4.8"}

I'm going to be updating the LFE manual/book with upgrading instructions, since this particular issue gets people all the time.

In fact, it may be worth adding a command (e.g., rebar3 lfe upgrade) that does this for people ...

Thanks ! 👍