View Issue Details

IDProjectCategoryView StatusLast Update
0023928Lazarus-public2021-05-13 16:28
ReporterJohn Shand Assigned ToBart Broersma  
Status resolvedResolutionno change required 
Platformlinux x86_64OSopensuse 
Product Version1.1 (SVN) 
Summary0023928: Removing unneeded controls and lazarus automatically removes those required units for that or those controls
DescriptionI am just wondering if this feature could be added to lazarus.

1. you removed unneeded controls from your form (but units relating to those controls are left behind in the uses clause.

2. after removing those controls, lazarus should also remove those units required for the removed controls.
TagsNo tags attached.
Fixed in Revision
WidgetsetGTK 2
Attached Files


related to 0023045 closedJuha Manninen registersqldb: Auto declare unit in uses 


Martin Friebe

2013-02-20 22:28

manager   ~0065789

Not fully automated, but: Menu > Source > Refactoring > Unused Units

John Shand

2013-02-21 05:49

reporter   ~0065792

yeah, but if you don't know the units well and what requires them, then you have a problem.

Bart Broersma

2020-12-05 13:16

developer   ~0127357

Say I drop a component on the form an then later on decide to create that control elsewhere in code and then remove the now not needed component from the form: now codetools must scan my entire code to see wether or noy I use that unit before removing it?

Since no developer has shown an interest in this since 2013 and since no one supplied a patch impelemnting this, I would suggest to resolve this as "no change required" or "won't fix".

Issue History

Date Modified Username Field Change
2013-02-20 20:20 John Shand New Issue
2013-02-20 22:28 Martin Friebe Note Added: 0065789
2013-02-21 05:49 John Shand Note Added: 0065792
2013-04-29 07:42 Juha Manninen Relationship added related to 0023045
2020-12-05 13:16 Bart Broersma Note Added: 0127357
2021-05-13 16:28 Bart Broersma Assigned To => Bart Broersma
2021-05-13 16:28 Bart Broersma Status new => resolved
2021-05-13 16:28 Bart Broersma Resolution open => no change required
2021-05-13 16:28 Bart Broersma LazTarget => -
2021-05-13 16:28 Bart Broersma Widgetset GTK 2 => GTK 2