Eric,
Thanks for the response.
You know, I am of the old "if weird things are happening and you think
something is not being kept up to date, blow it all away and start fresh"
school of thought.
It worked in the older Make days when dependencies were not updated (or
defined) correctly, and it will work here too (for me, it's not for
everyone). I think I will create a makefile with a realclean target that
removes the entire .sinan/repo tree and also calls sinan clean. I will also
add a faxien publish under a make release target (i.e. sinan dist; faxien
publish). Then I'll ensure I only use the makefile. I have to do this anyway
because I have C code Erlang linked-in drivers that need to be compiled, so
it's no big deal. I don't really care about the time it takes to pull in
fresh code because I have a local DAV repo, a fast Internet connection, and
not that many dependencies.
For me, the *biggest problem now* is the
include_lib("rabbitmq_server/include/rabbit.hrl") conundrum. Either I build
and publish RabbitMQ myself (which entails renaming and munging their .app
file and some other hacks) or I create a fake rabbitmq_server Sinan project
that contains only the include files. Yuck. If there ever is one day a
rabbitmq_server that goes into the public Erlware repo it will really screw
up things! In the meantime I suppose I could do it like this:
1. Create a sinan project called rabbitmq_server using sinan gen.
2. Get rid of the app and supervisor source files.
3. Do sed magic to massage the project's rabbitmq_server.app file into
shape.
4. Copy the contents of the include subdirectory from Rabbit's official
release into a Sinan project named rabbitmq_server.
5. Publish it to my local faxien repo.
6. Put an {included_applications} dependency into my project's app file.
The *second biggest problem now* is the duplicate {include_applications}
sinan build issue. If I am forced to put dependencies into the
{applications} tuple, then things that have {mod} in their app files that I
really do not want to start (like Yaws), but only want to load, have to be
messed with. In the previous Erlware makefile stuff I munged the .rel file
to have "none" after it for things I didn't want started. That worked but is
butt-ugly. If this is an outstanding issue I will have a go at fixing it.
Hmm... maybe something in the sinan .cfg file that says "disable starting
this app, overriding whatever the app file says"?
disable_apps : [yaws],
Hmm?
Regards,
Edwin Fine
On Sat, Sep 6, 2008 at 9:02 PM, Eric Merritt <[EMAIL PROTECTED]> wrote:
>
> You aren't doing anything wrong. Just using the system more then most
> have. SInan only looks in the repo for dependencies right now. That
> means that any changes need to be pushed. Also as you saw in your last
> email, once a dependency is pulled it doesn't repull it. There needs
> to be some type of mechenism to tell it about local dependencies. I am
> working on that. In the mean time the easy fix for this is to symlink
> mylib into the myapp project tree. Its not a perfect solution by any
> means but it will get you through. It looks like I have some work to
> doy.
>
> On Fri, Sep 5, 2008 at 8:07 PM, Edwin <[EMAIL PROTECTED]> wrote:
> >
> > I have a bit to add here. Let's use the mylib/myapp scenario. I found
> > I must do a faxien publish before sinan will see mylib when building
> > myapp.
> >
> > In other words, if I do the sequence (on a clean system with all
> > traces of myapp/mylib removed from the local repo and uninstalled
> > using faxien) as follows:
> >
> > cd mylib
> > sinan dist
> > faxien install-release
> >
> > cd ../myapp
> > sinan
> >
> > the myapp build fails. To fix this, I have to
> >
> > cd ../mylib; faxien publish; cd -
> >
> > Now sinan builds ok.
> >
> > Let's say I now change mylib by adding mylib2.hrl.
> >
> > I'm developing iteratively, so I don't want to bump the release
> > number every 5 minutes. I've learned my lesson and after I make a
> > dist, I do both a faxien install-release and a faxien publish of
> > mylib.
> >
> > When I build, sinan does not see the new include file and I get this
> > error:
> >
> > starting run
> > [check_depends] start
> > [check_depends] stop
> > [build] start
> > [build] Building /tmp/sinan_test_case/myapp/lib/myapp/src/
> > myapp_sup.erl
> > [build] /tmp/sinan_test_case/myapp/lib/myapp/src/myapp_sup.erl:
> > 10:error:can't find include lib "mylib/include/mylib2.hrl"
> >
> > Even after I killed sinserv and did a sinan clean, it would not find
> > the new .hrl file.
> >
> > starting run
> > [check_depends] start
> > [depends] Pulling eunit-2.0 from repository if non-local
> > [depends] Pulling stdlib-1.15.3 from repository if non-local
> > [depends] Pulling mylib-0.1.0 from repository if non-local
> > [depends] Pulling kernel-2.12.3 from repository if non-local
> > [check_depends] stop
> > [build] start
> > [build] Building /tmp/sinan_test_case/myapp/lib/myapp_lib2/src/
> > myapp_lib2_sup.erl
> > [build] Building /tmp/sinan_test_case/myapp/lib/myapp_lib2/src/
> > myapp_lib2_app.erl
> > [build] Building /tmp/sinan_test_case/myapp/lib/myapp_lib1/src/
> > myapp_lib1_sup.erl
> > [build] Building /tmp/sinan_test_case/myapp/lib/myapp_lib1/src/
> > myapp_lib1_app.erl
> > [build] Building /tmp/sinan_test_case/myapp/lib/myapp/src/
> > myapp_sup.erl
> > [build] /tmp/sinan_test_case/myapp/lib/myapp/src/myapp_sup.erl:
> > 10:error:can't find include lib "mylib/include/mylib2.hrl"
> >
> > [build] Building /tmp/sinan_test_case/myapp/lib/myapp/src/
> > myapp_app.erl
> > [sin_erl_builder fault!!] build_errors
> > Task failed
> > run complete with faults
> >
> > I had to manually remove it from ~/.sinan/repo:
> >
> > [EMAIL PROTECTED]:/tmp/sinan_test_case/myapp$ rm -rf
> > /home/efine/.sinan/repo/
> > mylib-0.1.0/
> > [EMAIL PROTECTED]:/tmp/sinan_test_case/myapp$ sinan
> > starting run
> > [check_depends] start
> > [check_depends] stop
> > [build] start
> > [build] Building /tmp/sinan_test_case/myapp/lib/myapp/src/
> > myapp_sup.erl
> > [build] stop
> > run complete
> >
> > What am I doing wrong?
> >
> > Regards,
> > Edwin
> > >
> >
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"erlware-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/erlware-dev?hl=en
-~----------~----~----~----~------~----~------~--~---