Thread overview
Re: build system
Oct 26, 2011
Martin Nowak
Oct 26, 2011
Jacob Carlborg
Oct 26, 2011
Jacob Carlborg
Oct 26, 2011
Gor Gyolchanyan
Nov 05, 2011
Marco Leise
Nov 07, 2011
Jacob Carlborg
Oct 26, 2011
Gor Gyolchanyan
October 26, 2011
On Wed, 26 Oct 2011 12:26:56 +0200, Gor Gyolchanyan <gor.f.gyolchanyan@gmail.com> wrote:

> I had a few thoughts about integrating build awareness into DMD.
> It would be really cool to add a flag to DMD to make it compile and
> link in all import-referenced modules.
> Also, it would be awesome to store basic build information in modules
> themselves in the form of special comments (much like documentation
> comments), where one could specify external build dependencies, output
> type, etc.
> There would be no need for makefiles and extra build systems. You'd
> just feed an arbitrary module to the compiler and the compiler would
> build the target, to which that module belongs (bu parsing build
> comments and package hierarchies).
> Wouldn't this be a good thing to have?

Some work in this direction has been done.
This proposal works by communicating url paths sources to an external
tool which is a flexible and good proposal.
It allows things as 'http://path/to/repo' for simple source file from
web fetching as well as 'pkg://experimental' for more sophisticated package
manager interaction.
http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP11

I've written a prototype implementation some weeks ago.

This still needs a way to communicated modules to build or link.
For now I've simply added a pragma(build, <package>) which builds
every import from this package (globally, it's a prototype).

Al together it can be used like this.
https://github.com/dawgfoto/graphics/blob/master/src/graphics/_.d

There are some issues though that would benefit from good ideas.
Especially a better solution for import path and build declarations
would be great.

DIP14 was not so well received.
http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP14.

martin
October 26, 2011
This is so cool!!! Package modules have two important roles now:
* Defining the proper imports for the package.
* Defining building rules for the package.

I don't have any particular thoughts about import path and build info
definitions, but I'm certain, that the build rules of parent package
should be overridden by child package (hierarchical build info).
This would reduce building efforts of any D code to zero, as all
necessary info is in the code and all necessary tools are a single
compiler.
Talk about work productivity! :-)

On Wed, Oct 26, 2011 at 5:39 PM, Martin Nowak <dawg@dawgfoto.de> wrote:
> On Wed, 26 Oct 2011 12:26:56 +0200, Gor Gyolchanyan <gor.f.gyolchanyan@gmail.com> wrote:
>
>> I had a few thoughts about integrating build awareness into DMD.
>> It would be really cool to add a flag to DMD to make it compile and
>> link in all import-referenced modules.
>> Also, it would be awesome to store basic build information in modules
>> themselves in the form of special comments (much like documentation
>> comments), where one could specify external build dependencies, output
>> type, etc.
>> There would be no need for makefiles and extra build systems. You'd
>> just feed an arbitrary module to the compiler and the compiler would
>> build the target, to which that module belongs (bu parsing build
>> comments and package hierarchies).
>> Wouldn't this be a good thing to have?
>
> Some work in this direction has been done.
> This proposal works by communicating url paths sources to an external
> tool which is a flexible and good proposal.
> It allows things as 'http://path/to/repo' for simple source file from
> web fetching as well as 'pkg://experimental' for more sophisticated package
> manager interaction.
> http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP11
>
> I've written a prototype implementation some weeks ago.
>
> This still needs a way to communicated modules to build or link.
> For now I've simply added a pragma(build, <package>) which builds
> every import from this package (globally, it's a prototype).
>
> Al together it can be used like this. https://github.com/dawgfoto/graphics/blob/master/src/graphics/_.d
>
> There are some issues though that would benefit from good ideas. Especially a better solution for import path and build declarations would be great.
>
> DIP14 was not so well received. http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP14.
>
> martin
>
October 26, 2011
On 2011-10-26 15:39, Martin Nowak wrote:
> On Wed, 26 Oct 2011 12:26:56 +0200, Gor Gyolchanyan
> <gor.f.gyolchanyan@gmail.com> wrote:
>
>> I had a few thoughts about integrating build awareness into DMD.
>> It would be really cool to add a flag to DMD to make it compile and
>> link in all import-referenced modules.
>> Also, it would be awesome to store basic build information in modules
>> themselves in the form of special comments (much like documentation
>> comments), where one could specify external build dependencies, output
>> type, etc.
>> There would be no need for makefiles and extra build systems. You'd
>> just feed an arbitrary module to the compiler and the compiler would
>> build the target, to which that module belongs (bu parsing build
>> comments and package hierarchies).
>> Wouldn't this be a good thing to have?
>
> Some work in this direction has been done.
> This proposal works by communicating url paths sources to an external
> tool which is a flexible and good proposal.
> It allows things as 'http://path/to/repo' for simple source file from
> web fetching as well as 'pkg://experimental' for more sophisticated package
> manager interaction.
> http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP11
>
> I've written a prototype implementation some weeks ago.
>
> This still needs a way to communicated modules to build or link.
> For now I've simply added a pragma(build, <package>) which builds
> every import from this package (globally, it's a prototype).
>
> Al together it can be used like this.
> https://github.com/dawgfoto/graphics/blob/master/src/graphics/_.d
>
> There are some issues though that would benefit from good ideas.
> Especially a better solution for import path and build declarations
> would be great.
>
> DIP14 was not so well received.
> http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP14.
>
> martin

Wasn't these DIP's about a package manager?

-- 
/Jacob Carlborg
October 26, 2011
On 2011-10-26 15:39, Martin Nowak wrote:
> On Wed, 26 Oct 2011 12:26:56 +0200, Gor Gyolchanyan
> <gor.f.gyolchanyan@gmail.com> wrote:
>
>> I had a few thoughts about integrating build awareness into DMD.
>> It would be really cool to add a flag to DMD to make it compile and
>> link in all import-referenced modules.
>> Also, it would be awesome to store basic build information in modules
>> themselves in the form of special comments (much like documentation
>> comments), where one could specify external build dependencies, output
>> type, etc.
>> There would be no need for makefiles and extra build systems. You'd
>> just feed an arbitrary module to the compiler and the compiler would
>> build the target, to which that module belongs (bu parsing build
>> comments and package hierarchies).
>> Wouldn't this be a good thing to have?
>
> Some work in this direction has been done.
> This proposal works by communicating url paths sources to an external
> tool which is a flexible and good proposal.
> It allows things as 'http://path/to/repo' for simple source file from
> web fetching as well as 'pkg://experimental' for more sophisticated package
> manager interaction.
> http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP11
>
> I've written a prototype implementation some weeks ago.
>
> This still needs a way to communicated modules to build or link.
> For now I've simply added a pragma(build, <package>) which builds
> every import from this package (globally, it's a prototype).
>
> Al together it can be used like this.
> https://github.com/dawgfoto/graphics/blob/master/src/graphics/_.d
>
> There are some issues though that would benefit from good ideas.
> Especially a better solution for import path and build declarations
> would be great.
>
> DIP14 was not so well received.
> http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP14.
>
> martin

BTW, I don't think a build tool and a package manager should be mixed together in one tool. Instead they should be very well integrated with each other.

-- 
/Jacob Carlborg
October 26, 2011
I agree.

On Wed, Oct 26, 2011 at 10:35 PM, Jacob Carlborg <doob@me.com> wrote:
> On 2011-10-26 15:39, Martin Nowak wrote:
>>
>> On Wed, 26 Oct 2011 12:26:56 +0200, Gor Gyolchanyan <gor.f.gyolchanyan@gmail.com> wrote:
>>
>>> I had a few thoughts about integrating build awareness into DMD.
>>> It would be really cool to add a flag to DMD to make it compile and
>>> link in all import-referenced modules.
>>> Also, it would be awesome to store basic build information in modules
>>> themselves in the form of special comments (much like documentation
>>> comments), where one could specify external build dependencies, output
>>> type, etc.
>>> There would be no need for makefiles and extra build systems. You'd
>>> just feed an arbitrary module to the compiler and the compiler would
>>> build the target, to which that module belongs (bu parsing build
>>> comments and package hierarchies).
>>> Wouldn't this be a good thing to have?
>>
>> Some work in this direction has been done.
>> This proposal works by communicating url paths sources to an external
>> tool which is a flexible and good proposal.
>> It allows things as 'http://path/to/repo' for simple source file from
>> web fetching as well as 'pkg://experimental' for more sophisticated
>> package
>> manager interaction.
>> http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP11
>>
>> I've written a prototype implementation some weeks ago.
>>
>> This still needs a way to communicated modules to build or link.
>> For now I've simply added a pragma(build, <package>) which builds
>> every import from this package (globally, it's a prototype).
>>
>> Al together it can be used like this. https://github.com/dawgfoto/graphics/blob/master/src/graphics/_.d
>>
>> There are some issues though that would benefit from good ideas. Especially a better solution for import path and build declarations would be great.
>>
>> DIP14 was not so well received. http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP14.
>>
>> martin
>
> BTW, I don't think a build tool and a package manager should be mixed together in one tool. Instead they should be very well integrated with each other.
>
> --
> /Jacob Carlborg
>
November 05, 2011
Am 26.10.2011, 20:43 Uhr, schrieb Gor Gyolchanyan <gor.f.gyolchanyan@gmail.com>:

> I agree.
>
> On Wed, Oct 26, 2011 at 10:35 PM, Jacob Carlborg <doob@me.com> wrote:
>> On 2011-10-26 15:39, Martin Nowak wrote:
>>>
>>> On Wed, 26 Oct 2011 12:26:56 +0200, Gor Gyolchanyan
>>> <gor.f.gyolchanyan@gmail.com> wrote:
>>>
>>>> I had a few thoughts about integrating build awareness into DMD.
>>>> It would be really cool to add a flag to DMD to make it compile and
>>>> link in all import-referenced modules.
>>>> Also, it would be awesome to store basic build information in modules
>>>> themselves in the form of special comments (much like documentation
>>>> comments), where one could specify external build dependencies, output
>>>> type, etc.
>>>> There would be no need for makefiles and extra build systems. You'd
>>>> just feed an arbitrary module to the compiler and the compiler would
>>>> build the target, to which that module belongs (bu parsing build
>>>> comments and package hierarchies).
>>>> Wouldn't this be a good thing to have?
>>>
>>> Some work in this direction has been done.
>>> This proposal works by communicating url paths sources to an external
>>> tool which is a flexible and good proposal.
>>> It allows things as 'http://path/to/repo' for simple source file from
>>> web fetching as well as 'pkg://experimental' for more sophisticated
>>> package
>>> manager interaction.
>>> http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP11
>>>
>>> I've written a prototype implementation some weeks ago.
>>>
>>> This still needs a way to communicated modules to build or link.
>>> For now I've simply added a pragma(build, <package>) which builds
>>> every import from this package (globally, it's a prototype).
>>>
>>> Al together it can be used like this.
>>> https://github.com/dawgfoto/graphics/blob/master/src/graphics/_.d
>>>
>>> There are some issues though that would benefit from good ideas.
>>> Especially a better solution for import path and build declarations
>>> would be great.
>>>
>>> DIP14 was not so well received.
>>> http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP14.
>>>
>>> martin
>>
>> BTW, I don't think a build tool and a package manager should be mixed
>> together in one tool. Instead they should be very well integrated with each
>> other.
>>
>> --
>> /Jacob Carlborg
>>

I disagree. Maven is an example of a tool that does all-in-one (even a lot more than package management and compiling) and it doesn't hurt. I don't want to find, download and install a compiler, a package manager and a build tool for the majority of build tasks. From what I've read this is also the tendency with other languages. If build tool and package manager end up in one download (or project) and you only need to invoke the build tool, that's a different story.
November 07, 2011
On 2011-11-05 14:55, Marco Leise wrote:
> I disagree. Maven is an example of a tool that does all-in-one (even a
> lot more than package management and compiling) and it doesn't hurt. I
> don't want to find, download and install a compiler, a package manager
> and a build tool for the majority of build tasks. From what I've read
> this is also the tendency with other languages. If build tool and
> package manager end up in one download (or project) and you only need to
> invoke the build tool, that's a different story.

I'm thinking that you would mostly only interact with the build tool. In fact, the build tool knows all about you project which means the build tool can automatically create recipe files for the package manager.

-- 
/Jacob Carlborg