Automatically remove unused references/dependencies on deploy to next environment
1329
Views
7
Comments
New
Lifetime

Although there exist about 15 ideas on improving handling of unused references, non of them state the obvious: it could be done easily by OutSystems fully automatically!

My proposal is that developers keep whatever references in DEV (or remove them if they want), but that on deploy to the next environment, OutSystems first automatically removes any unused references, before it starts the deployment. 

There is in my opinion NEVER a need for unused dependencies in the next environment where someone deploys an application to. As is is never needed, it can always automatically be removed.

In certain circumstances, there exists a necessity for the inclusion of unused dependencies. Consider, for instance, a scenario where a table retains values and paths for images, such as an entry for "apple" alongside its corresponding image path stored within a module. Under such circumstances, the image may be designated as unused within Service Studio, despite its potential utility elsewhere.

Not getting that, if it is used, it is not unused...

During 1-Click publish also we have a warning showing the unused references/dependencies and asking developer to remove those.

This could be on Service Center in Solutions tab right near Publish with full compilations.

and just let you choose.

If this is when we open the module then it will be a good idea, if everytime you publish then not so good incase you are just publishing without using the dependency not because you do not need it but maybe you are still figuring out your logic then again you need to add the dependency again and again after every publish

This should only be necessary when changing environments.

If you are in Development you do not need to use it.

I like @Casimiro idea

Have Service Center toggle. 

But also like sys admin having the ability to gate keep post-Dev environments, e.g. moving solutions from Dev environment to the next environment (QA or staging) could be set to automatically strip unused references.