[Lazarus] How to find out why a unit is used in a project?

Bo Berglund bo.berglund at gmail.com
Wed Sep 23 21:13:07 CEST 2020


On Wed, 23 Sep 2020 19:29:36 +0200, John Landmesser via lazarus
<lazarus at lists.lazarus-ide.org> wrote:

>> So now I wonder:
>> Is there a Lazarus tool to trace why the unit is referenced in the
>> first place? Is there such things as "chain of uses"?
>>
>> The application I am porting is a client communications app that talks
>> to a service over TCP/IP.
>> That service app uses the unit that pos up as erroneous now, but it
>> should not be used by the client comm app at all.
>> So I need to find out why it does.
>>
>
>Perhaps it can be find in Projects properties?

Well, that only shows the units specifc to the application itself...

I figured out that the reason this unit was brought in was via another
unit that *is* used since it contains declarations of the different
data records and classes handled by the server and the client.

In this unit that extra unit is listed in uses since it contains stuff
needed by functions inside this unit itself (but not needed by the
client application).

So there seems to be a chain reaction concerning units involved in the
application....

-- 
Bo Berglund
Developer in Sweden



More information about the lazarus mailing list