Tommi Prami 130 Posted August 14, 2020 Sometimes one have questions that answer is not that easy 🙂 Or need quite bit of work.  Lately I've had two.  Where this unit is linking from? Which units in this project has initialization and/or finalization sections?  I bet there are tons of these good questions we sometimes would need answers for 🙂  There might be something for these. Plain search for files does not help usually, because all depends what is linked into the specific project.  -Tee- Share this post Link to post
Lars Fosdal 1792 Posted August 14, 2020 I used to use Peganza, but I stopped renewing it, since I used it so seldom. Â My current approach in principle Build project with detailed MAP file enabled Extract the unit list to a separate file Load the unit list in a PowerShell script Define the include paths in the PS script Walk the paths/files and search for the objectives, using PS Share this post Link to post
Uwe Raabe 2057 Posted August 14, 2020 The Uses Report from Pascal Analyzer (Peganza) is pretty close to your needs. Perhaps even the free Pascal Analyzer Lite version will do here. Â Regarding other analyzers I can speak for Understand, which gives much more information but for a higher cost. About the same is true for Lattix Architect, for which MMX can produce the necessary output. Â I make use of all three tools quite often. Share this post Link to post
Dinar 22 Posted August 14, 2020 (edited) 3 hours ago, Tommi Prami said: Where this unit is linking from? Delphi Unit Dependency Scanner or one of the fork of this project will help answer this question Edited August 14, 2020 by Dinar Share this post Link to post
Dinar 22 Posted August 14, 2020 (edited) 3 hours ago, Tommi Prami said: Which units in this project has initialization and/or finalization sections? For this purpose, you can use the standard search with the appropriate parameters. Alternatively, you can use the Grep Search included with the GExperts plugin to take advantage of the finer tuning and search the map file as well Edited August 14, 2020 by Dinar Share this post Link to post
Bill Meyer 337 Posted August 14, 2020 Pascal Analyzer Lite is helpful; I have not used the full product. It is the only tool I have used which can advise as to uses references which can be demoted from interface to implementation. It does give some false positives, however. The CnPack Uses Cleaner is also helpful, though like Pascal Analyzer Lite, it will give some false positives. It doesn't take long, however, to build a mental list of the modules you can't remove, despite its advice. MMX is great for tabulating unit dependency cycles, and although the report it generates is huge, it is easily parsed, and I have built a simple tool to do that and present in a grid the cycle counts per unit, which is helpful. DUDS is quite fast, and its tree view seems to me to communicate a more useful sense of dependency relations than the Cartesian map in MMX.  I have not found any single tool which does all that I could wish. The Pascal Analyzer Lite Uses report is very useful, and for demoting uses references, MMX is far superior to hand editing. Pascal Analyzer Lite is slow, and if your project is large, definitely use the 64-bit version, or it will run out of memory. If you are in a VM, give it plenty of RAM. PAL has used about 2.6GB on the large project I have been reworking.  The thing I really would like is to find a tool which can help you discover which modules in dependency cycle chains are villains, and which are victims. In a large legacy project, it is very difficult to identify the modules which are most in need of rework. 2 Share this post Link to post
Uwe Raabe 2057 Posted August 14, 2020 1 hour ago, Bill Meyer said: its tree view seems to me to communicate a more useful sense of dependency relations than the Cartesian map in MMX. MMX has two displays for cycles: a treeview and a Dependency Structure Matrix: 1 Share this post Link to post