dmd v2.065 compatibility

Chris wendlec at tcd.ie
Fri Mar 14 09:48:13 PDT 2014


On Friday, 14 March 2014 at 14:11:45 UTC, Mike Parker wrote:
> On 3/14/2014 7:43 PM, Chris wrote:
>> [1]
>> Yesterday I tried to build a project with dub. dub had 
>> downloaded and
>> installed dmd v2.065. The project and accompanying library had 
>> been
>
> I'm curious what you mean by this. I don't see any way to get 
> DMD through dub.
>

I wasn't exact, when I downloaded dub, I was asked to download 
dmd, I downloaded the latest version.

>> built with dmd v2.064. dub said that the project was up to 
>> date and
>> didn't need compiling. However, I got a long long error message
>> informing me that there were undefined references (see below). 
>> I
>> recompiled the library with dmd v2.065 and everything worked 
>> fine. Yet I
>> wonder, is this behavior normal, i.e. dub says its alright but 
>> not really?
>
> This is normal. dub doesn't have any idea which version of 
> which compiler a set of binary files was built with. What it 
> does is to compare the times of the binaries with those of the 
> source modules to determine if anything has changed. If not, it 
> doesn't build. This is essentially how most build tools behave, 
> no matter which language you're working with.

> Of course, it would be possible to implement the tracking of 
> compiler versions. The only way I can see to do that off the 
> top of my head is that dub would have to maintain a registry 
> that logs the compiler version used on the last compile for 
> each binary, then parse the output of 'dmd' or 'dmd --help' to 
> find the version number (and do that for each supported 
> compiler) of the compiler currently in use. But it would have 
> to do that at the beginning of every compile. In my mind, the 
> cost greatly outweighs the benefit.
>
> Just 'dub build --force' when you upgrade your compiler.



More information about the Digitalmars-d-learn mailing list