www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - dub: excluding some source files from build

reply 0xFFFFFFFF <0xFFFFFFFF mail.com> writes:
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.
Apr 05
parent reply Dennis <dkorpel gmail.com> writes:
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"]
Apr 05
parent reply 0xFFFFFFFF <0xFFFFFFFF mail.com> writes:
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.
Apr 05
next sibling parent Dennis <dkorpel gmail.com> writes:
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.
Apr 05
prev sibling next sibling parent reply Dennis <dkorpel gmail.com> writes:
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.
Apr 05
parent 0xFFFFFFFF <0xFFFFFFFF mail.com> writes:
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!
Apr 05
prev sibling parent reply Andre Pany <andre s-e-a-p.de> writes:
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
Apr 05
parent reply 0xFFFFFFFF <0xFFFFFFFF mail.com> writes:
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.
Apr 05
parent AltFunction1 <af1af1af1 af1.af1> writes:
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.
Apr 06