YAWS, LFE, and Erlang 18

49 views
Skip to first unread message

Duncan McGreggor

unread,
Aug 13, 2015, 9:57:37 PM8/13/15
to Lisp Flavoured Erlang
Hey all,

For those who have generated YAWS projects with lfetool, you may find that compiles fail when using Erlang 18. There are two ways to address this:

1) Don't use Erlang 18; use Erlang 17.5.

2) Update to YAWS 2.0 (lfetool currently installs 1.99) and use either 17.x or 18.

A note about option #2: if your project uses lfest (a routes library for LFE+YAWS),  you will need to update that as well. Using an old lfest will cause an older YAWS to be downloaded, overriding whatever is defined in your project rebar.config with the rebar.config that is defined in the old version of lfest (this is due to a bug in rebar [1]).

I'm going to update lfest and make release 0.0.4 right now, so that you can do this. In a few minutes it should be available on Github.

d

Eric Bailey

unread,
Aug 19, 2015, 3:34:48 AM8/19/15
to Lisp Flavoured Erlang
PS I just started a new YAWS project and had to replace

(include-file "deps/lfest/include/macros.lfe")

with

(include-file "deps/lfest/include/lfest-macros.lfe")


I'm using lfest 0.0.4 and yaws 2.0

Duncan McGreggor

unread,
Aug 19, 2015, 10:16:11 AM8/19/15
to Lisp Flavoured Erlang
Quick note for those who don't track the various LFE projects: lfest allows you to create Compojure-like routes in YAWS applications using (defroutes ...)

More below ...

On Wed, Aug 19, 2015 at 2:34 AM, Eric Bailey <ifsixw...@gmail.com> wrote:
PS I just started a new YAWS project and had to replace

(include-file "deps/lfest/include/macros.lfe")

with

Side note: it's better not to use an explicit "deps/..." in your includes like this. I know you didn't do it -- the templates that are used in project creation are really old, from before I'd ironed out all the issues with ERL_LIBS, hyphen-based names, etc.

Instead you should use this:

(include-lib "lfest/include/lfest-macros.lfe")

This will work not only in your dev setup, but also in a full OTP release, whereas the other won't. (Unless you do some crazy work-arounds.)

Note that this assumes you have your ERL_LIBS set up correctly (lfetool's Makefile includes do this for you).
 

(include-file "deps/lfest/include/lfest-macros.lfe")


Yeah, the latest release of lfest changes to the less ambiguous lfest-macros.lfe. The lfetool templates need to be updated to reflect this change. It's on my list ...

d
 

I'm using lfest 0.0.4 and yaws 2.0


On Thursday, August 13, 2015 at 8:57:37 PM UTC-5, Duncan McGreggor wrote:
Hey all,

For those who have generated YAWS projects with lfetool, you may find that compiles fail when using Erlang 18. There are two ways to address this:

1) Don't use Erlang 18; use Erlang 17.5.

2) Update to YAWS 2.0 (lfetool currently installs 1.99) and use either 17.x or 18.

A note about option #2: if your project uses lfest (a routes library for LFE+YAWS),  you will need to update that as well. Using an old lfest will cause an older YAWS to be downloaded, overriding whatever is defined in your project rebar.config with the rebar.config that is defined in the old version of lfest (this is due to a bug in rebar [1]).

I'm going to update lfest and make release 0.0.4 right now, so that you can do this. In a few minutes it should be available on Github.

d

--
You received this message because you are subscribed to the Google Groups "Lisp Flavoured Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lisp-flavoured-e...@googlegroups.com.
To post to this group, send email to lisp-flavo...@googlegroups.com.
Visit this group at http://groups.google.com/group/lisp-flavoured-erlang.
For more options, visit https://groups.google.com/d/optout.

Eric Bailey

unread,
Aug 19, 2015, 12:30:26 PM8/19/15
to lisp-flavo...@googlegroups.com

On Aug 19, 2015, at 9:16 AM, Duncan McGreggor <dun...@mcgreggor.org> wrote:

Quick note for those who don't track the various LFE projects: lfest allows you to create Compojure-like routes in YAWS applications using (defroutes ...)

More below ...

On Wed, Aug 19, 2015 at 2:34 AM, Eric Bailey <ifsixw...@gmail.com> wrote:
PS I just started a new YAWS project and had to replace

(include-file "deps/lfest/include/macros.lfe")

with

Side note: it's better not to use an explicit "deps/..." in your includes like this. I know you didn't do it -- the templates that are used in project creation are really old, from before I'd ironed out all the issues with ERL_LIBS, hyphen-based names, etc.

Instead you should use this:

(include-lib "lfest/include/lfest-macros.lfe")

I figured. Thanks for the tip. I wanna to get the skeleton building before I started tweaking too much.


This will work not only in your dev setup, but also in a full OTP release, whereas the other won't. (Unless you do some crazy work-arounds.)

Note that this assumes you have your ERL_LIBS set up correctly (lfetool's Makefile includes do this for you).
 

(include-file "deps/lfest/include/lfest-macros.lfe")


Yeah, the latest release of lfest changes to the less ambiguous lfest-macros.lfe. The lfetool templates need to be updated to reflect this change. It's on my list ...


I also had to change `make get-deps` in resources/common/otp.mk for Travis builds to succeed.

Reply all
Reply to author
Forward
0 new messages