Package manager - interacting with the compiler

Jacob Carlborg doob at me.com
Sun Dec 11 13:35:18 PST 2011


On 2011-12-10 23:05, Jonathan M Davis wrote:
> On Saturday, December 10, 2011 22:17:44 jdrewsen wrote:
>> For use case 1 the package manager could just as well call dmd
>> directly with the correct flags ie. no need for using environment
>> variables. Use case 2 does not belong to a package manager in my
>> opinion. It is the job of a build tool to configure packages for
>> a project.
>
> This brings up an interesting situation. In general, I don't think that a
> package manager has any business building the project which is pulling in
> dependencies. However, it _does_ make some sense to build the dependencies on
> the box that these are being pulled in on, since they're going to have to be
> built for that box natively. And each of those projects could be using
> different build tools. One could be using make. Another could be using cmake.
> Another could be using scons. Etc.
>
> So, how is that dealt with? Does each package list its choose build tool as a
> dependency and the programmer must then make sure that that build tool has
> been installed on their system by whatever means non-D packages/programs are
> installed? Or does that mean that packages using the package manager all need
> to use a specific build tool? And if they do, should the package manager then
> be that build tool? Or do we make it so that the package manager doesn't
> actually build _anything_? Rather it pulls in the source along with pre-built
> binaries for your architecture, and if you want to build it for your manchine
> specifically, you have to go and built it yourself after it gets pulled down?
>
> This is all looking very messing to me.
>
> I have no idea how orbit deals with any of this, since I've never really
> looked at orbit. But it makes for an ugly problem.
>
> So, in general, I'd definitely prefer #1, but it may be that issues involved in
> this make #2 make more sense, but I'd have to study orbit in some detail to
> give a better opinion on it.
>
> - Jonathan M Davis

Currently you specify the build tool in the specification file, which 
also contains dependencies, which files to include in the package and so 
on. The package manager then just invokes the build tool. Currently the 
build tool needs to be supported by the package manager, it needs to 
know how to invoke the build tool. Currently there is no verification 
that the build tool exists.

The intention was not to choose among these use case, both of them 
happen and need to be handled with.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list