To save development time, I have a Common.Bas file that is shared among projects. In this code module are various routines that I use often.
Many of the subroutines in this file either require a particular library or a certain permission. Because of this, I run into a few problems:
1) The project gets marked as needing certain permissions, when it really doesn't need them - the permissions are only invoked just because the project has a sub in it that uses those permissions, even though that sub is never called from the current project.
2) I get compile errors like "unknown type" because one of the subroutines uses a library, even though that subroutine is not called from the current project.
For #1, I could add a "RemovePermission" to the manifest, but I would have to do that manually and it takes time to figure out what permissions I *don't* need.
For #2, I could either move subs requiring the same library to another module file and simply don't include that module if I don need those subs, but that also is cumbersome and messy and results in MANY shared files. Or, I could use conditional symbols to selectively include certain subs or not, but that too becomes very messy and time consuming to figure out what keywords I need for a particular project.
So, it would be VERY helpful if the compiler could first do a first-pass of the project and temporarily remove all subroutines that are not used, then do the real compile of the project.
This way it won't error on unknown types for routines that use a particular type but are not called from the current project, and the project will only require the permissions it actually needs and not for permissions that a sub uses, but that sub is never called in the current project.