dlang / dub

Package and build management system for D
MIT License
678 stars 227 forks source link

[feature request] exclude directories #2490

Closed rr0gi closed 1 year ago

rr0gi commented 2 years ago

there is excludedSourceFiles, but it doesn't work to exclude the directory tree afaics, so it would be nice to have excludedDirectories. Motivation in particular is for the people who use sourcePaths "." to be able to have directories that d compiler will not look at (one particular issue is vendored in c++ code that happens to have files with .o.d extension that naturally trigger ldc parsing errors even though there is no d code in that directory at all).

WebFreak001 commented 2 years ago

excludedSourceFiles supports glob matching (see https://docs.webfreak.org/dub-reference/build_settings/#excludedsourcefiles) so you can match *.o.d that should already fix your problem.

Would probably be nice to exclude full directories anyway, especially when with ImportC we could also be passing .c and .h files to the compiler.

WebFreak001 commented 1 year ago

deciding not to do this, as excludedSourceFiles with globs can cover this use-case.