Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: Library Dependencies
Home

[Freeciv-Dev] Re: Library Dependencies

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Chris Richards <chrisr@xxxxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Library Dependencies
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 5 Jan 2002 18:46:07 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sun, Dec 30, 2001 at 01:19:25AM -0600, Chris Richards wrote:
> Howdy.  I ran a dependency check against the
> libraries--libcivserver.a, libcivai.a, libcivcommon.a, and
> libguiclient.a (specifically gui-xaw).  I'll follow with my
> expectations and where it differed.  It may be worthwhile to remove
> circular dependencies in the future?
> 
> I think it would nice to have something analogous to libcivrules.a.
> This would be dependent on libcivcommon.a and could provide all of the
> basic rules of how the game is played. :)
> 
> Anyway, I only share with the group because this helped me understand
> a little more how the code base was laid out.  It serves no other
> purpose.
> 
> My script that generated the output may have errors, so take that with
> a grain of salt.  For example, I only check .a's and so it looked like
> libclient was dependent on libserver due to advance_unit_focus and
> do_unit_focus because it was not part of the library, but rather in
> control.o.
> 
> What I Thought:
> 
> libcivcommon.a is standalone
> libcivserver.a depends on libcivcomon.a
> libcivai.a depends on libcivcommon.a

The AI has to depend on the server to execute commands so add
libserver here.

> libguiclient.a depends on libcivcommon.a
> 
> The Differences (format is in shorthand and follows library:symbol):
> 
> * All in all, not bad though the server->ai and ai->server plays fast
>   and loose against each other.
> 

> libcommon depends on libserver:dealloc_id
> libcommon depends on libserver:is_server
> libcommon depends on libserver:send_unit_info

Are defined in both server and client. It is possible that the
send_unit_info case may be fixed.

> libserver depends on libai:ai_advisor_choose_building
> libserver depends on libai:ai_do_first_activities
> libserver depends on libai:ai_do_last_activities
> libserver depends on libai:ai_eval_buildings
> libserver depends on libai:ai_fix_unhappy
> libserver depends on libai:ai_make_elvis
> libserver depends on libai:ai_manage_explorer
> libserver depends on libai:ai_next_tech_goal
> libserver depends on libai:ai_scientists_taxmen
> libserver depends on libai:assess_danger_player
> libserver depends on libai:could_unit_move_to_tile
> libserver depends on libai:dist_nearest_city
> libserver depends on libai:unit_belligerence_basic
> libserver depends on libai:unit_vulnerability_virtual

These are all conceptually bad and should be fixed. The server
shouldn't depend on the build-in AI.

[snip a lot of libai depends on libserver]

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 Make a software that is foolproof, and only fools will want to use it.


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: Library Dependencies, Raimar Falke <=