Jump to content
Ian Branch

Issue with UsesCleaner..

Recommended Posts

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

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

Screenshot_3.jpg

Screenshot_4.jpg

Share this post


Link to post

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×