Open vincentparrett opened 5 years ago
In Python there is so called virtual environments. Within such environment set of packages and even Python interpreter itself can be specified and easily switched. It would be cool to make something like that for Delphi. After all design time packages are just entries in registry AFAIK. That can be managed with a tool. Switching component versions without IDE restart is not necessary IMHO.
IDE Restarts are a pain, but we may have to live with that, certainly if you close a project and then load one that uses a different version of the same library as was used in the closed project. There are some smarts that could be applied to minimise restarts, Uwe Raabe's Package Magician does that. Uwe has already said he is willing to contribute.
At Delphi 6 I had such a package manager. Depending on which project, the registry was adapted before IDE start.
@glenkeidon created a project call bundles that handles installing design time packages into the IDE. Perhaps the concepts from bundles could be used in DPM.
https://github.com/glenkleidon/bundles
Glen's ADUG Symposium talk on project bundles https://www.youtube.com/watch?v=MoNYsR8qY7A
The Rad Studio IDE only supports 1 version of a component package being installed at the same time. So if we want to use different versions for different projects, it involves manually swapping them out.
I typically stick with a major version of a library for a major version of my projects, and when I start on a new major version I upgrade all the third party components. This is a major pain if I try to do this with the same IDE version. There is a work around with using a different registry tree (using the -r command line option for the IDE), but I found that cumbersome to use at best, often forgetting to use the correct shortcut to launch the IDE.
So what I would like, is that when I load a project (or project group), the IDE installs the set of design time components (packages) that are explicitly used by those projects. Any non default (ie part of the base install) packages should be unloaded, and only the ones my project is using should be loaded.
Obviously this would involve some serious Open Tools Api work, and I have no idea if api exposes the hooks needed to achieve this.
Packages would need to define what Design time bpl's need to be loaded, and what their dependencies are, and the Package Manager IDE plugin would need to read this information when the project is loaded, and when a new package is installed.