BlackEdder / painlessjson

D library for converting any custom types to and from JSON the painless way.
Boost Software License 1.0
23 stars 3 forks source link

Newest version does not compile when using through dub #28

Closed BlackEdder closed 9 years ago

BlackEdder commented 9 years ago

Trying to run dub test in a library that include painlessjson now results in:

dub test
Generating test runner configuration '__test__publictransport__' for 'publictransport' (library).
Target dunit 1.0.10 is up to date. Use --force to rebuild.
Target dstats 1.0.1 is up to date. Use --force to rebuild.
Building painlessjson 1.2.0 configuration "library", build type unittest.
Running dmd...
../../../.dub/packages/painlessjson-1.2.0/source/painlessjson/painlessjson.d(16): Error: module toolkit is in file 'dunit/toolkit.d' which cannot be read
import path[0] = ../../../.dub/packages/painlessjson-1.2.0/source/
import path[1] = /opt/dmd-2.066/import
FAIL ../../../.dub/packages/painlessjson-1.2.0/.dub/build/library-unittest-linux.posix-x86_64-dmd_2066-ADD9549AACDE6684EA1B2A25675717A2/ painlessjson staticLibrary
Error executing command test: dmd failed with exit code 1.

@Zalastax any clue why this is? Guess the unittest configuration is not used when painlessjson is a dependency?

Zalastax commented 9 years ago

I think you are right. But why are unit tests run for painlessjson when it's added as a library? I've never seen a package system where you run the unit test of your dependencies. This might be a good question for the learn forum/stack overflow.