Thread overview
dub: excluding some source files from build
Apr 05, 2019
0xFFFFFFFF
Apr 05, 2019
Dennis
Apr 05, 2019
0xFFFFFFFF
Apr 05, 2019
Dennis
Apr 05, 2019
Dennis
Apr 05, 2019
0xFFFFFFFF
Apr 05, 2019
Andre Pany
Apr 05, 2019
0xFFFFFFFF
Apr 06, 2019
AltFunction1
April 05, 2019
source/
   app.d
   tmp.d

How do I specify to dub.json I don't want it including tmp.d in build?
I tried "excludeSourceFiles" : ["tmp.d"], but it seems not to work.

Thanks.

April 05, 2019
On Friday, 5 April 2019 at 15:37:17 UTC, 0xFFFFFFFF wrote:
> I tried "excludeSourceFiles" : ["tmp.d"], but it seems not to work.


You need to include the folder as well:
"excludeSourceFiles" : ["source/tmp.d"]
April 05, 2019
On Friday, 5 April 2019 at 15:43:58 UTC, Dennis wrote:
> On Friday, 5 April 2019 at 15:37:17 UTC, 0xFFFFFFFF wrote:
>> I tried "excludeSourceFiles" : ["tmp.d"], but it seems not to work.
>
>
> You need to include the folder as well:
> "excludeSourceFiles" : ["source/tmp.d"]

Thanks, but I've done that also it seem not to work.

DUB version 1.14.0, built on Mar  2 2019.
April 05, 2019
On Friday, 5 April 2019 at 15:47:06 UTC, 0xFFFFFFFF wrote:
> Thanks, but I've done that also it seem not to work.

How do you know that? When running dub in verbose mode, does it still pass tmp.d to the compiler? Note that if app.d depends on templates in tmp.d, then instantiations of those templates belong to app.d and will still be included.


April 05, 2019
On Friday, 5 April 2019 at 15:47:06 UTC, 0xFFFFFFFF wrote:
> Thanks, but I've done that also it seem not to work.
>

Also, it's excludedSourceFiles with a d, not excludeSourceFiles.
April 05, 2019
On Friday, 5 April 2019 at 15:47:06 UTC, 0xFFFFFFFF wrote:
> On Friday, 5 April 2019 at 15:43:58 UTC, Dennis wrote:
>> On Friday, 5 April 2019 at 15:37:17 UTC, 0xFFFFFFFF wrote:
>>> I tried "excludeSourceFiles" : ["tmp.d"], but it seems not to work.
>>
>>
>> You need to include the folder as well:
>> "excludeSourceFiles" : ["source/tmp.d"]
>
> Thanks, but I've done that also it seem not to work.
>
> DUB version 1.14.0, built on Mar  2 2019.

I use this feature for multiple projects on all major platforms. In general it should work. Could you post a more complete example then it would be easy to help you. (Dub.json, folder structure)

Kind regards
Andre
April 05, 2019
On Friday, 5 April 2019 at 15:54:01 UTC, Dennis wrote:
> On Friday, 5 April 2019 at 15:47:06 UTC, 0xFFFFFFFF wrote:
>> Thanks, but I've done that also it seem not to work.
>>
>
> Also, it's excludedSourceFiles with a d, not excludeSourceFiles.

Ah, that's it. 0x5468616e6b73!
April 05, 2019
On Friday, 5 April 2019 at 16:08:20 UTC, Andre Pany wrote:
> On Friday, 5 April 2019 at 15:47:06 UTC, 0xFFFFFFFF wrote:
>> On Friday, 5 April 2019 at 15:43:58 UTC, Dennis wrote:
>>> On Friday, 5 April 2019 at 15:37:17 UTC, 0xFFFFFFFF wrote:
>>>> I tried "excludeSourceFiles" : ["tmp.d"], but it seems not to work.
>>>
>>>
>>> You need to include the folder as well:
>>> "excludeSourceFiles" : ["source/tmp.d"]
>>
>> Thanks, but I've done that also it seem not to work.
>>
>> DUB version 1.14.0, built on Mar  2 2019.
>
> I use this feature for multiple projects on all major platforms. In general it should work. Could you post a more complete example then it would be easy to help you. (Dub.json, folder structure)
>
> Kind regards
> Andre

Thanks Andre, it's a spelling issue: excludeSourceFiles vs excludedSourceFiles as Dennis pointed out.
April 06, 2019
On Friday, 5 April 2019 at 17:01:35 UTC, 0xFFFFFFFF wrote:
> On Friday, 5 April 2019 at 16:08:20 UTC, Andre Pany wrote:
>> On Friday, 5 April 2019 at 15:47:06 UTC, 0xFFFFFFFF wrote:
>>> On Friday, 5 April 2019 at 15:43:58 UTC, Dennis wrote:
>>>> On Friday, 5 April 2019 at 15:37:17 UTC, 0xFFFFFFFF wrote:
>>>>> [...]
>>>>
>>>>
>>>> You need to include the folder as well:
>>>> "excludeSourceFiles" : ["source/tmp.d"]
>>>
>>> Thanks, but I've done that also it seem not to work.
>>>
>>> DUB version 1.14.0, built on Mar  2 2019.
>>
>> I use this feature for multiple projects on all major platforms. In general it should work. Could you post a more complete example then it would be easy to help you. (Dub.json, folder structure)
>>
>> Kind regards
>> Andre
>
> Thanks Andre, it's a spelling issue: excludeSourceFiles vs excludedSourceFiles as Dennis pointed out.

Something dub could do is to check for these kind of spelling errors.