* Project With Reusable Libraries
@ 2009-03-24 16:40 John Dlugosz
2009-03-25 8:13 ` Andreas Ericsson
0 siblings, 1 reply; 2+ messages in thread
From: John Dlugosz @ 2009-03-24 16:40 UTC (permalink / raw)
To: git
Consider a directory tree something like this:
...
foo\
bar\
project-root\
app1\
contents of app1
app2\
contents of app2
lib1\
contents of library 1
lib2\
contents of library 2
Each project, whether application or library, has its own git repository
already. A program, say app1, is now dependant on the libraries. The
libraries are meant to be used in multiple applications.
This is not like what is described under subprojects, since the libs are
not "under" the application, but are peers in the directory structure.
It would be wrong to put lib1 and lib2 as subdirectories of app1 because
they are also used by app2, right?
Then again... if app1 and app2 are not always built as part of the same
set, they might have different versions of the libs specified. I
understand that the newer versions of msysgit do hard linking so having
multiple repositories for the same thing won't waste disk space, but
still requires fetching to keep them in sync?
Anyway, how would you do it?
TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited.
If you received this in error, please contact the sender and delete the material from any computer.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Project With Reusable Libraries
2009-03-24 16:40 Project With Reusable Libraries John Dlugosz
@ 2009-03-25 8:13 ` Andreas Ericsson
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Ericsson @ 2009-03-25 8:13 UTC (permalink / raw)
To: John Dlugosz; +Cc: git
John Dlugosz wrote:
> Consider a directory tree something like this:
>
> ...
> foo\
> bar\
> project-root\
> app1\
> contents of app1
> app2\
> contents of app2
> lib1\
> contents of library 1
> lib2\
> contents of library 2
>
>
> Each project, whether application or library, has its own git repository
> already. A program, say app1, is now dependant on the libraries. The
> libraries are meant to be used in multiple applications.
>
> This is not like what is described under subprojects, since the libs are
> not "under" the application, but are peers in the directory structure.
> It would be wrong to put lib1 and lib2 as subdirectories of app1 because
> they are also used by app2, right?
>
> Then again... if app1 and app2 are not always built as part of the same
> set, they might have different versions of the libs specified. I
> understand that the newer versions of msysgit do hard linking so having
> multiple repositories for the same thing won't waste disk space, but
> still requires fetching to keep them in sync?
>
> Anyway, how would you do it?
>
If app1 and app2 requires different versions of the same library, I'd
make them separate git projects entirely.
If they have to stay in the same project, I'd put their respective
libraries as a submodule under each app. You could get away without
having to fetch them if you stash the lib projects in the super
project and then link the app project's lib-submodules to the one
in the super-project, but it gets messy when you try to explain
that without some simple means of drawing things, so if you can't
write a "sync-submodules" script, I guess it's not really worth
the problem. Especially if the lib-repositories aren't huge.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-25 8:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-24 16:40 Project With Reusable Libraries John Dlugosz
2009-03-25 8:13 ` Andreas Ericsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).