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

2020-09-23 Thread Sven Barth via lazarus
Bo Berglund via lazarus  schrieb am Mi., 23.
Sep. 2020, 21:13:

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

If course there is. That's how the unit system is supposed to work after
all.

Regards,
Sven

>
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


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

2020-09-23 Thread Bo Berglund via lazarus
On Wed, 23 Sep 2020 19:29:36 +0200, John Landmesser via lazarus
 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

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


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

2020-09-23 Thread Mattias Gaertner via lazarus
On Wed, 23 Sep 2020 18:59:58 +0200
Bo Berglund via lazarus  wrote:

>[...]
> Now when I try to compile it throws an error inside a unit I did not
> even know it used. And to further complicate the issue I cannot find a
> reference to the unit in question when doing a search in the project
> dir inside all pas files. This unit is not mentioned anywhere and
> still causes a compile error due to a missing reference.
> 
> I tried Lazarus Find In Files and set it to search "all files in
> project" and also search the project directory, but it comes up
> empty-handed...
> 
> 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"?

View / Unit Dependencies

Mattias
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


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

2020-09-23 Thread John Landmesser via lazarus

Am 23.09.20 um 18:59 schrieb Bo Berglund via lazarus:

I am porting a Delphi application to Linux and as a stop I am first
doing it from Delphi to Lazarus/Fpc on Windows.

Now when I try to compile it throws an error inside a unit I did not
even know it used. And to further complicate the issue I cannot find a
reference to the unit in question when doing a search in the project
dir inside all pas files. This unit is not mentioned anywhere and
still causes a compile error due to a missing reference.

I tried Lazarus Find In Files and set it to search "all files in
project" and also search the project directory, but it comes up
empty-handed...

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?

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


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

2020-09-23 Thread Bo Berglund via lazarus
I am porting a Delphi application to Linux and as a stop I am first
doing it from Delphi to Lazarus/Fpc on Windows.

Now when I try to compile it throws an error inside a unit I did not
even know it used. And to further complicate the issue I cannot find a
reference to the unit in question when doing a search in the project
dir inside all pas files. This unit is not mentioned anywhere and
still causes a compile error due to a missing reference.

I tried Lazarus Find In Files and set it to search "all files in
project" and also search the project directory, but it comes up
empty-handed...

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.

-- 
Bo Berglund
Developer in Sweden

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus