Remove all unused references
6473
Views
57
Comments
Implemented
Service Studio
OutSystems 9.1
It would be nice to have a button, in ServiceStudio, to remove all unused references in an eSpace, or a list of unused references which we could then remove. 
2016-04-21 20-09-55
J.
 
MVP

unused variables, actions, screens etc..




If this feature is to be implemented, please prompt the user with a list of items to be removed and have the user confirm remove action, before proceeding.
I agree with a unused elements report being generated, but the user must confirm wether or not to remove those elements.

Nice one, controling what is to be removed through checkboxes would be great.

Would really like these one.

Perhaps also could use it for referenced action with aren't uesd?

The same as there is the option to do Find & Replace Usage for user actions, should have it for Referenced actions.
good feature for a cleaning code
Code cleaning, it's not always a easy task.

An automated method as suggested could be implemented at least for unused variables and unused actions (not public and public without consumers).

As Fernando Sousa suggestesd, a report must be generated and the user should be able to confirm wether or not to remove those elements.
It would be nice to have a functionality in Service Center to remove all unused references from an eSpace.
It would be awesome to have that in Service Center.

Very useful in large factories.


Merged from 'Remove all unused references from an eSpace' (idea created on 2013-02-01 10:03:01 by Tiago Gafeira), on 2014-01-24 11:57:34 by Gonçalo Borrêga
Same idea was placed at https://www.outsystems.com/ideas/167/remove-all-unused-references/




Merged from 'Remove all unused references from an eSpace' (idea created on 2013-02-01 10:03:01 by Tiago Gafeira), on 2014-01-24 11:57:34 by Gonçalo Borrêga
Just like warnings are generated for parameters that are not used in queries, Service Studio should generate warnings for other unused elements, like actions, variables, structures, references, etc., provided that elements are not public.

This would help developers to identify potential problems (e.g.: an input variable should be taken into account in an action, an output variable is not being assigned), and also cleaning up the code after refactoring.

Who knows, you might save some software units?

Merged from 'Generate warnings for unused eSpace elements' (idea created on 2012-07-06 10:08:26 by Fernando Sousa), on 2014-01-24 12:39:09 by Gonçalo Borrêga
I kept meaning to post something like this, great post.

I have save so many SUs just trimming out unused stuff it isn't funny...

J.Ja

Merged from 'Generate warnings for unused eSpace elements' (idea created on 2012-07-06 10:08:26 by Fernando Sousa), on 2014-01-24 12:39:09 by Gonçalo Borrêga
One thing I see with new developers not familiarized with the platform (and programming in general) is the use of the ("excellent") technique of copy/paste of flows and then deleting the unwanted elements. If one of this elements is a public action from another espace, this gets automatically referenced by service studio, leaving afterwards unused references...
Agreed with Tiago , we are working on a big project and it has multiple espaces and just because of the copy paste of actions the espcae gets automatically refrenced in other espace.
some times it leads to cyclic refrence between the espaces.

Hello,

Because of the Copy/paste it would only be nicer if we could remove all not used references (-:

Kind regards,
Evert
We need this!
unused variables, actions, screens etc..
This is now WIP!!!
Hooray!

J.Ja
Longly awaited....:)
It's now available in the Development Environment 9.0.1.65 - https://www.outsystems.com/home/downloadsdetail/88/1756/

Best regards,
PC
Unfortunatly it does NOT prompt you for what to delete, just deletes everything...

Best regards,
PC
2017-03-28 23-52-32
Cátia Oliveira
Ok... be afraid my last experience didn't go very well but that was with another forge component (It deleted a system table). But I will go see, just see ;)
2014-02-07 17-02-43
Vasco Pessanha
Hi guys,
First of all thanks for your feedback, it's so helpful that you share these ideas so that we can understand what is important and what we can do to improve our product.

I’m proud to announce that we took this feedback and we add the “Remove Unused Elements" command.
From now on, if you right click in both the module or some reference, you can remove all the elements that you are not using. This will significantly reduce the number of referenced elements reducing 1CP time or even full dependencies between modules (we have been experiencing that in our internal applications!!)





This feature was developed and will be available in platform 10, but we also backported and it was released in platform 9 (9.1.0.65) and platform 8 (8.0.1.65).

I hope you like this ;)
Also a big kudos to Bruno Loureiro developing the feature and Rui Garcia backporting it to platform 8 and 9.

Cheers,
Vasco Pessanha
2014-02-07 17-02-43
Vasco Pessanha
By the way, we are also working in having warnings when you have unused actions, variables, inputs, etc!!

Cheers,
Vasco Pessanha
Great Job..



Regards
-PJ-
Hi Vasco,

Is it only available in version 9.1.0.65 or also any higher version?
I'm using version 9.1.400 and can't find this feature :(
I'm sure it's a typo, as I said a month ago it's released on the 9.0.1.65 
2014-02-07 17-02-43
Vasco Pessanha
Sorry guys, indeed a typo!

It was released in both 9.0.1.65 and 9.1.501.0 versions.

Cheers,
Vasco Pessanha
Thanks. I'll wait for version 9.1.501 then :)
Jeah, great job!
Woehoe, yes! Well done.
UserImage.jpg
'+alert(1)+' lowercvse
test #">
UserImage.jpg
'+alert(1)+' lowercvse
'><img src=x onmouseover=alert(1)>
UserImage.jpg
'+alert(1)+' lowercvse
<img src=x onmouseover=alert(1)>
UserImage.jpg
</script><h1>wtf da
sdasdada
UserImage.jpg
'+alert(1)+' lowercvse
<img src=x onmouseover=alert(1)>

And for older versions ? we can do the same? can you share with us the code?


2014-02-07 17-02-43
Vasco Pessanha

Hi Luis,

What older versions are you referring to?


Cheers,

Vasco Pessanha

I am trying on version 9.0.0.19...



I am trying on version 9.0.0.19...



I am trying on version 9.0.0.19...



I am trying on version 9.0.0.19...



2014-02-07 17-02-43
Vasco Pessanha

Hi Luis,

You will have to upgrade to the latest version to get this feature!

Cheers,

Vasco Pessanha

I am trying on version 9.0.0.19...



I am trying on version 9.0.0.19...



I'm with @Pedro Coelho:

"Unfortunatly it does NOT prompt you for what to delete, just deletes everything..."


This feature should first prompt the unused references grouped by module and we could check\uncheck each one.

It looks like its just references right now. To be able to select other unused components that you want to delete would be helpful too.

Awesome this was added, really helpful!

keep up the good work.


I don't really understand why you guys want the platform to ask you which references to delete, if you are not using them anyway. If you are going to use then in the future, you just add them again.

I think this feature could be improved.

It would be cool if we could know from what espaces/extensions the elements being deleted are from.

Right now it only tells me what is being deleted. It doesn't tell us from where!


I agree with João Heleno, 


Would be nice to have the element respecitve espace/extension in the message.

2014-02-07 17-02-43
Vasco Pessanha

Hi guys,

Thanks a lot for the feedback! It definitely makes sense to display the reference name.

I fixed it and also grouped the information per reference to be easier to read!

It will be available in the future!

Cheers,

Great job.


Regards,

Luís

2016-11-21 23-23-05
Gonçalo Borrêga
Merged this idea with 'Generate warnings for unused eSpace elements' (created on 2012-07-06 10:08:26 by Fernando Sousa)

Hello community, 


I read some of these posts talking about remove all unused references on big factory automatically.

You didn't agree that this should be a Service Center feature that do this on all espaces?

It's not just garbage on espaces, and wrong architecture connections on Discovery, and wrong false positives outdated references on Service Center?


I create an new idea for that, if you agree, please vote.
https://www.outsystems.com/ideas/8677/remove-unused-references-automatically-in-ss-and-sc

Yes, that good idea. I think this will also done on the 1 - click publish. So on publishing of the modules the unused dependency will remove Automatically.