Uwe Raabe 2057 Posted November 23, 2020 This sources were initially provided in this thread: 64 bit compiler running out of memory The current thread is more or less a follow up of the former. There are plans to put the project on GutHub when I find some time. Share this post Link to post
mausmb 13 Posted November 24, 2020 (edited) Duplicate post Edited November 24, 2020 by mausmb Share this post Link to post
Ian Branch 127 Posted December 13, 2020 @Uwe Raabe What's the chances of UsesCleaner being able to process .dpr files?? Just a thought bubble... ;-) Ian Share this post Link to post
Uwe Raabe 2057 Posted December 13, 2020 17 minutes ago, Ian Branch said: What's the chances of UsesCleaner being able to process .dpr files?? Well, uses clauses in dpr files are a bit special. They are always formatted as one line per unit. The unit name can be followed by an in construct followed by a file name. After that can be a form name or a frame or datamodule declaration. Reordering the dpr uses clause can have severe impacts on the functionality of the program. Given that the support for dpr files would probably have to be restricted to resolving aliases and expanding unit scope names. Just curious, have you tried formatting a dpr with settings Compressed = 0 and GroupNames empty? Share this post Link to post
Ian Branch 127 Posted December 13, 2020 HI Uwe, I hadn't, but now did. It still made the project unusable. Whilst there may be a convention about the structure of the Uses clauses, one-line per, I'm not fussed. ;-) When I loaded the Project, the 'ProjectGroup' had gone from attached screenshot_4 to screenshot_3. :-( Don't sweat it. It was just a thought bubble. Regards, Ian Share this post Link to post
Uwe Raabe 2057 Posted December 14, 2020 Can you provide the original dpr file? Share this post Link to post
Ian Branch 127 Posted December 14, 2020 Sure. I suspect that is not all involved though. Here you go. DBiWorkflow.dpr Share this post Link to post
Uwe Raabe 2057 Posted December 14, 2020 OK, the IFDEF looks suspicious. Will have a look later. Share this post Link to post
Uwe Raabe 2057 Posted December 14, 2020 It was not the IFDEF, but the parsing of a form unit in the uses clause failed. Can you give this version a try, please? UsesCleaner.zip Share this post Link to post
Uwe Raabe 2057 Posted December 14, 2020 BTW, the sources are now on GitHub: https://github.com/UweRaabe/UsesCleaner (documentation still has to be done) 1 Share this post Link to post
Ian Branch 127 Posted December 14, 2020 Hi Uwe, I have a project Group with 18 projects, including DBiWorkflow. I ran UsesCleaner over the group. 1. Edited .cfg to make Compressed = 0 & GroupNames empty - No issues building or running the Apps. 2. Edited .cfg to make Compressed = 1 - No issues building or running the Apps. 3. Edited the GroupNames back in. - No issues building or running the Apps. Attached for your reference is the DBiWorkflow.dpr and the UsesCleaner.cfg from this exercise. Thank you. Regards, Ian UsesCleaner.cfg DBiWorkflow.dpr Share this post Link to post
Uwe Raabe 2057 Posted December 14, 2020 That is probably because of these new lines: if MatchText(TPath.GetExtension(SourceName), ['.dpr', '.dpk']) then begin UsesHelper.Compressed := False; UsesHelper.GroupNames := ''; end; Share this post Link to post