Jump to content
Vincent Parrett

Blogged : Delphi Package Manager RFC

Recommended Posts

Delphi/Rad Studio desperately needs a proper package/library/component manager. A package manager provides a standardized way of consuming third party libraries. At the moment, use of third party libraries is very much adhoc, and in many cases this makes it difficult to move projects between machines, or to get a new hire up and running quickly. Other development eco systems, like Ruby, .net and Javascript, recognised and solved this problem many years ago. Getting a Ruby, .net or Javascript project up an running, in a new working folder or new machine is trivial.

 

Delphi Package Manager RFC

  • Like 3
  • Thanks 4

Share this post


Link to post

Thanks for this blog post. Instead of just ranting about GetIt you start taking real actions. I appreciate that very much.

 

Some ideas came already to my mind while reading, but I need to think a bit about them first.

 

Regarding the design time components, I had tried to get this covered with my Package Magician mentioned in this blog post: There Can Only Be One – At a Time! While it works in the majority of cases, it heavily relies on the packages to be unloaded cleanly - sometimes not even standard Delphi packages can guarantee that. Unfortunately some of the big players in the package market seem to ignore that their packages my be unloaded and reloaded in the IDE.

 

If you are interested I am open to contribute the code to your project.

 

BTW, the link to the GitHub repository is broken.

  • Like 2

Share this post


Link to post
1 hour ago, Uwe Raabe said:

Thanks for this blog post. Instead of just ranting about GetIt you start taking real actions. I appreciate that very much.

 

Some ideas came already to my mind while reading, but I need to think a bit about them first.

 

Regarding the design time components, I had tried to get this covered with my Package Magician mentioned in this blog post: There Can Only Be One – At a Time! While it works in the majority of cases, it heavily relies on the packages to be unloaded cleanly - sometimes not even standard Delphi packages can guarantee that. Unfortunately some of the big players in the package market seem to ignore that their packages my be unloaded and reloaded in the IDE.

 

If you are interested I am open to contribute the code to your project.

 

BTW, the link to the GitHub repository is broken.

Uwe, I'm definitely open to contributions, there's no way I can achieve the desired result by myself (I still have to earn a living!).  It's a complex task, and there are a lot of moving parts and design decisions to be made.

 

I expected package unloading to be an issue. Package Magician looks interesting.. hopefully we can get you on board, I haven't really played with the open tools api much for many years.

 

Github link fixed. 

Share this post


Link to post

A related project, MultiInstaller, is not a package manager, but a good way to install multiple packages, directly from git repositories (e.g. Github), from zip files or from existing folders in one-step.  I can start using a new version of Delphi in minutes rather than days.  The project is fork of the Silverpoint MultiInstaller.

  • Like 1
  • Thanks 1

Share this post


Link to post
Quote

Packages will not contain any scripts (ie to build during install) for security reasons (I don't want to be running random scripts). 

Please reconsider this point ! Nowadays it's really important to use scripts (we're no longer on 19xx).

Also for the package name, it's important to have a formal rule for name. e.g a package's name may look like this : TMS::VCL::SomeProduct. Also we can group names by category (like cpan packages which I really like its concept) e.g: XML::MyXmlLib. So all XML stuffs are under XML::.

 

 

Share this post


Link to post

Very good initiative!

The absence of dependency manager is a big problem of Pascal ecosystem. Not only CI scenarios suffers from it but library developers - there is no option to make a library dependent on another library as it become too complicated for most people to install and use it. So most libraries have *commons.pas units which contains pretty same purpose routines and classes.

I thought about it a lot and the only reason why I not started such a project is that I believe it should be a community effort. Or we'll end up with another package manager without packages and users.

 

I'm familiar with Maven from Java ecosystem and it does it's job well.

 

Some quick thoughts:

I see no much sense binding it to a particular IDE or even compiler. Let it work for FPC too!

Components and packages are good but libraries are also good and much easier to manage.

I think such a tools should have a command line based core with plugins for IDEs when needed. In that case CI server will be able to build project from scratch as it should be.

Simple workflow - a project config file at input and a directory structure with library/package files at output.

A package can be identified with an ID - something domain name-like works good here and partially solves problems with copyright etc. Please no GUIDs here!

To identify a dependency seems to enough: (ID, version, compiler/platform, type)

type is source or binary (dcu/ppu).

Therefore, to use a library it's needed to create a config file and run the tool. After it ends its work there is a ready to use directory structure with all needed files and maybe even compiler config file with paths.

  • Like 2

Share this post


Link to post

I'm open to suggestions when it comes to package naming conventions, but it's going to take a lot to convince me to allow running of scripts. Running random scripts that haven't been vetted for security is major issue. Perhaps a better option would be to include some sort of dsl that has some pre-defined functionality (like copy files etc). 

 

Share this post


Link to post

What about Chocolatey? Already for Windows.

 

https://chocolatey.org/

 

It already exists.

It's already for Windows.

Adding Delphi components to their ecosystem would help spread Delphi to other developers.

Edited by Eli M.

Share this post


Link to post
2 minutes ago, Eli M. said:

What about Chocolatey? Already for Windows.

 

https://chocolatey.org/

 

It already exists.

It's already for Windows.

Adding Delphi components to their ecosystem would help spread Delphi to other developers.

 

Chocolatey is Nuget repurposed for installing applications, not for installing code libraries. It's also a .net application. As much as I love .net/c#, I think a delphi package manager should be written in delphi. 

  • Like 3

Share this post


Link to post

I can contribute an FMX client that ties into whatever command line package manager you come up with. I already have one that uses a local CodeCentral database.

cc.png

cc2.jpg

Edited by Eli M.

Share this post


Link to post

@Eli M. Thanks. We're some way from that yet, but when we get to the IDE integration we'll be looking for people with UI skills to contribute. Right now I want to focus on the structure of packages/libraries etc, how they are defined, naming conventions, etc. 

Share this post


Link to post
44 minutes ago, Vincent Parrett said:

 

Chocolatey is Nuget repurposed for installing applications, not for installing code libraries. It's also a .net application. As much as I love .net/c#, I think a delphi package manager should be written in delphi. 

I'd say in Free Pascal as such tool should be crossplatform and work for FPC too.

Share this post


Link to post
2 hours ago, Georgge Bakh said:

I'd say in Free Pascal as such tool should be crossplatform and work for FPC too.

FreePascal already has its own Online Package Manager built right into the Lazarus IDE.

Edited by Remy Lebeau

Share this post


Link to post
55 minutes ago, Remy Lebeau said:

FreePascal already has its own Online Package Manager built right into the Lazarus IDE.

As far as I can tell, it's pretty much like GetIt, ie a global package installer? 

 

What I'm proposing is handling per project dependencies, ie nothing is global. 

Share this post


Link to post

I'm not sure that such a tool should support freepascal and Lazarus too. This would:

  • Add a lot more complexity
  • Get the maintainer / developer into unnecessary open vs. closed source discussions
  • Would be a direct "competitor" to an already existing tool which would again cause endless discussions.

I'm not a fan of tying it into Github, btw.

Share this post


Link to post
16 hours ago, pyscripter said:

A related project, MultiInstaller, is not a package manager, but a good way to install multiple packages, directly from git repositories (e.g. Github), from zip files or from existing folders in one-step.  I can start using a new version of Delphi in minutes rather than days.  The project is fork of the Silverpoint MultiInstaller.

I just tried to download and compile the sources: MultiInstaller_Icon.ico is missng.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×