Recent

Author Topic: Should View/Unit Dependencies use also lps files?  (Read 1368 times)

Чебурашка

  • Hero Member
  • *****
  • Posts: 586
  • СЛАВА УКРАЇНІ! / Slava Ukraïni!
Should View/Unit Dependencies use also lps files?
« on: August 29, 2023, 12:06:59 pm »
Today I was cleaning up a project, in the sense that I was trying to reduce the units dependencies.

I opened the View/Unit Dependiencies and I saw that there were some unexpected units visualized into the diagram. I tried to find them in the unit uses clauses all around but I did not find them. At the end I realized that these extra units were shown in the diagram just because they were opened (with File/Open) in the past and they were still present in the lps files, despite being never part neither of the lpi nor in any uses clause. Once I cleaned up the lps the units were no longer displayed in the Unit Dependencies as expected.

Is the usage of lps wanted?

« Last Edit: August 29, 2023, 12:24:00 pm by Чебурашка »
FPC 3.2.0/Lazarus 2.0.10+dfsg-4+b2 on Debian 11.5
FPC 3.2.2/Lazarus 2.2.0 on Windows 10 Pro 21H2

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Should View/Unit Dependencies use also lps files?
« Reply #1 on: September 03, 2023, 05:38:21 am »
Today I was cleaning up a project, in the sense that I was trying to reduce the units dependencies.

I opened the View/Unit Dependiencies and I saw that there were some unexpected units visualized into the diagram. I tried to find them in the unit uses clauses all around but I did not find them. At the end I realized that these extra units were shown in the diagram just because they were opened (with File/Open) in the past and they were still present in the lps files, despite being never part neither of the lpi nor in any uses clause. Once I cleaned up the lps the units were no longer displayed in the Unit Dependencies as expected.

Is the usage of lps wanted?
It seems like a bug to me.

Can you file a Lazarus bug report?
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Should View/Unit Dependencies use also lps files?
« Reply #2 on: September 03, 2023, 12:01:53 pm »
Have you ticked / unticked the checkbox "All source editor units" ?

Чебурашка

  • Hero Member
  • *****
  • Posts: 586
  • СЛАВА УКРАЇНІ! / Slava Ukraïni!
Re: Should View/Unit Dependencies use also lps files?
« Reply #3 on: September 04, 2023, 08:35:59 am »
Have you ticked / unticked the checkbox "All source editor units" ?

I don't think, now I opened the Unit Dependencies screen, and the default ins that checkbox is checked. I bet I did not uncheck it.

I understand that when checked it includes all units opened in source editor, even if they are not part of the project, while when unchecked it restricts exclusively to the unis which are part of the project. And this is ok for me.

I will check more to understand better what is kept into lps. I expect it to contain only the files opened durin last working session, not also files opened in the past.

FPC 3.2.0/Lazarus 2.0.10+dfsg-4+b2 on Debian 11.5
FPC 3.2.2/Lazarus 2.2.0 on Windows 10 Pro 21H2

Чебурашка

  • Hero Member
  • *****
  • Posts: 586
  • СЛАВА УКРАЇНІ! / Slava Ukraïni!
Re: Should View/Unit Dependencies use also lps files?
« Reply #4 on: September 04, 2023, 08:37:13 am »
Today I was cleaning up a project, in the sense that I was trying to reduce the units dependencies.

I opened the View/Unit Dependiencies and I saw that there were some unexpected units visualized into the diagram. I tried to find them in the unit uses clauses all around but I did not find them. At the end I realized that these extra units were shown in the diagram just because they were opened (with File/Open) in the past and they were still present in the lps files, despite being never part neither of the lpi nor in any uses clause. Once I cleaned up the lps the units were no longer displayed in the Unit Dependencies as expected.

Is the usage of lps wanted?
It seems like a bug to me.

Can you file a Lazarus bug report?
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues

Before registering a new issue, I will monitor better according to Martin_fr's suggestions.

Thank you anyway!
FPC 3.2.0/Lazarus 2.0.10+dfsg-4+b2 on Debian 11.5
FPC 3.2.2/Lazarus 2.2.0 on Windows 10 Pro 21H2

 

TinyPortal © 2005-2018