Release generation failure due to duplicate mochiglobal.erl in Nitrogen and mochiweb on R14B03

57 views
Skip to first unread message

Brian Rowe

unread,
Jun 17, 2011, 11:43:41 AM6/17/11
to nitro...@googlegroups.com
Hello,

It appears that rebar fails to generate a release for nitrogen_core
and mochiweb due to the duplication of the mochiglobal.erl file. Is
there a reason this needs to be in nitrogen_core? I plan on branching
and removing the lib in nitrogen_core but wanted to see if there was a
specific reason why it's explicitly included in the project.

In R14B02, there is no failure, but in R14B03, I get the below error.

==> rel (generate)
{"init terminating in do_boot","Module mochiglobal potentially
included by two different applications: mochiweb and nitrogen_core."}

Crash dump was written to: erl_crash.dump
init terminating in do_boot (Module mochiglobal potentially included
by two different applications: mochiweb and nitrogen_core.)
make: *** [release] Error 1

The files appear to be the same based on the below diff command
$ diff -w -B deps/nitrogen_core/src/lib/mochiglobal.erl
deps/mochiweb/src/mochiglobal.erl
$

Here is a snippet of my deps in rebar.config:
{deps, [
{bunny_farm, ".*", {git,
"git://github.com/muxspace/bunny_farm.git", "master"}},
{mochiweb, "2.0.*", {git, "git://github.com/mochi/mochiweb.git", "master"}},
{nitrogen_core, "2.1.*", {git,
"git://github.com/nitrogen/nitrogen_core", "HEAD"}},
...

Regards,
Brian Rowe

Jesse Gumm

unread,
Jun 17, 2011, 11:53:30 AM6/17/11
to nitro...@googlegroups.com
Hi!

mochiglobal:get and mochiglobal:put are both used in
element_template.erl, and since Nitrogen can use multiple webservers
(yaws, webmachine, inets), it's needed at least at the moment.

So if you were to remove it, that'd be fine as long as you stick with
mochiweb as your webserver.

-Jesse

> --
> You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
> To post to this group, send email to nitro...@googlegroups.com.
> To unsubscribe from this group, send email to nitrogenweb...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nitrogenweb?hl=en.
>
>

--
Jesse Gumm
Sigma Star Systems
414.940.4866
gu...@sigma-star.com
http://www.sigma-star.com

Brian Rowe

unread,
Jun 17, 2011, 12:05:34 PM6/17/11
to nitro...@googlegroups.com
Jesse,

Thanks for the response. Based on your response, I suppose it's better
to remove the beam in the Makefile as opposed to branching. What is
the longer term plan as more people migrate to R14B03?

Brian

Jesse Gumm

unread,
Jun 17, 2011, 12:07:54 PM6/17/11
to nitro...@googlegroups.com
I don't know the longer term plan, to be honest: Rusty's the man with the plan.

Rusty? Thoughts on this?

-Jesse

Roman Shestakov

unread,
Jun 18, 2011, 7:10:40 AM6/18/11
to nitro...@googlegroups.com

hi,

it should be possible to excl. mochiglobal.erl (and mochijson2) from nitrogen_core in reltool.config

{app, nitrogen_core, [{incl_cond, include},
         {mod, mochiglobal, [{incl_cond, exclude}]},
     {mod, mochijson2, [{incl_cond, exclude}]}]},


Regards, Roman


Reply all
Reply to author
Forward
0 new messages