RejectedSoftware Forums

Sign up

unable to build app with new vibed

Hi,

After upgrading to DMD 2.064.2 and vibed 0.7.16 (also tried master), I am unable to build my app. I build vibe in a seperate step, generating a .o file, which I link to the rest of the application. Only unittest build fails!

If I pass -unittest to both generation of vibe and my app before linking, I get the following compile errors:

/usr/include/dmd/phobos/std/traits.d(241): Error: template std.algorithm.startsWith does not match any function template declaration. Candidates are:
/usr/include/dmd/phobos/std/algorithm.d(5004):        std.algorithm.startsWith(alias pred = "a == b", Range, Needles...)(Range doesThisStart, Needles withOneOfThese) if (isInputRange!Range && Needles.length > 1 && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[0])) : bool) && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[1..__dollar])) : uint))
/usr/include/dmd/phobos/std/algorithm.d(5077):        std.algorithm.startsWith(alias pred = "a == b", R1, R2)(R1 doesThisStart, R2 withThis) if (isInputRange!R1 && isInputRange!R2 && is(typeof(binaryFun!pred(doesThisStart.front, withThis.front)) : bool))
/usr/include/dmd/phobos/std/algorithm.d(5146):        std.algorithm.startsWith(alias pred = "a == b", R, E)(R doesThisStart, E withThis) if (isInputRange!R && is(typeof(binaryFun!pred(doesThisStart.front, withThis)) : bool))
/usr/include/dmd/phobos/std/traits.d(241): Error: template std.algorithm.startsWith(alias pred = "a == b", Range, Needles...)(Range doesThisStart, Needles withOneOfThese) if (isInputRange!Range && Needles.length > 1 && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[0])) : bool) && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[1..__dollar])) : uint)) cannot deduce template function from argument types !()(string, string)
/usr/include/dmd/phobos/std/traits.d(241): Error: template std.algorithm.startsWith does not match any function template declaration. Candidates are:
/usr/include/dmd/phobos/std/algorithm.d(5004):        std.algorithm.startsWith(alias pred = "a == b", Range, Needles...)(Range doesThisStart, Needles withOneOfThese) if (isInputRange!Range && Needles.length > 1 && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[0])) : bool) && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[1..__dollar])) : uint))
/usr/include/dmd/phobos/std/algorithm.d(5077):        std.algorithm.startsWith(alias pred = "a == b", R1, R2)(R1 doesThisStart, R2 withThis) if (isInputRange!R1 && isInputRange!R2 && is(typeof(binaryFun!pred(doesThisStart.front, withThis.front)) : bool))
/usr/include/dmd/phobos/std/algorithm.d(5146):        std.algorithm.startsWith(alias pred = "a == b", R, E)(R doesThisStart, E withThis) if (isInputRange!R && is(typeof(binaryFun!pred(doesThisStart.front, withThis)) : bool))
/usr/include/dmd/phobos/std/traits.d(241): Error: template std.algorithm.startsWith(alias pred = "a == b", Range, Needles...)(Range doesThisStart, Needles withOneOfThese) if (isInputRange!Range && Needles.length > 1 && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[0])) : bool) && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[1..__dollar])) : uint)) cannot deduce template function from argument types !()(string, string)
/usr/include/dmd/phobos/std/traits.d(241): Error: template std.algorithm.startsWith does not match any function template declaration. Candidates are:
/usr/include/dmd/phobos/std/algorithm.d(5004):        std.algorithm.startsWith(alias pred = "a == b", Range, Needles...)(Range doesThisStart, Needles withOneOfThese) if (isInputRange!Range && Needles.length > 1 && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[0])) : bool) && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[1..__dollar])) : uint))
/usr/include/dmd/phobos/std/algorithm.d(5077):        std.algorithm.startsWith(alias pred = "a == b", R1, R2)(R1 doesThisStart, R2 withThis) if (isInputRange!R1 && isInputRange!R2 && is(typeof(binaryFun!pred(doesThisStart.front, withThis.front)) : bool))
/usr/include/dmd/phobos/std/algorithm.d(5146):        std.algorithm.startsWith(alias pred = "a == b", R, E)(R doesThisStart, E withThis) if (isInputRange!R && is(typeof(binaryFun!pred(doesThisStart.front, withThis)) : bool))
/usr/include/dmd/phobos/std/traits.d(241): Error: template std.algorithm.startsWith(alias pred = "a == b", Range, Needles...)(Range doesThisStart, Needles withOneOfThese) if (isInputRange!Range && Needles.length > 1 && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[0])) : bool) && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[1..__dollar])) : uint)) cannot deduce template function from argument types !()(string, string)
/usr/include/dmd/phobos/std/traits.d(241): Error: template std.algorithm.startsWith does not match any function template declaration. Candidates are:
/usr/include/dmd/phobos/std/algorithm.d(5004):        std.algorithm.startsWith(alias pred = "a == b", Range, Needles...)(Range doesThisStart, Needles withOneOfThese) if (isInputRange!Range && Needles.length > 1 && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[0])) : bool) && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[1..__dollar])) : uint))
/usr/include/dmd/phobos/std/algorithm.d(5077):        std.algorithm.startsWith(alias pred = "a == b", R1, R2)(R1 doesThisStart, R2 withThis) if (isInputRange!R1 && isInputRange!R2 && is(typeof(binaryFun!pred(doesThisStart.front, withThis.front)) : bool))
/usr/include/dmd/phobos/std/algorithm.d(5146):        std.algorithm.startsWith(alias pred = "a == b", R, E)(R doesThisStart, E withThis) if (isInputRange!R && is(typeof(binaryFun!pred(doesThisStart.front, withThis)) : bool))
/usr/include/dmd/phobos/std/traits.d(241): Error: template std.algorithm.startsWith(alias pred = "a == b", Range, Needles...)(Range doesThisStart, Needles withOneOfThese) if (isInputRange!Range && Needles.length > 1 && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[0])) : bool) && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[1..__dollar])) : uint)) cannot deduce template function from argument types !()(string, string)
/usr/include/dmd/phobos/std/traits.d(251): Error: argument vibe has no parent
/usr/include/dmd/phobos/std/traits.d(241): Error: template std.algorithm.startsWith does not match any function template declaration. Candidates are:
/usr/include/dmd/phobos/std/algorithm.d(5004):        std.algorithm.startsWith(alias pred = "a == b", Range, Needles...)(Range doesThisStart, Needles withOneOfThese) if (isInputRange!Range && Needles.length > 1 && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[0])) : bool) && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[1..__dollar])) : uint))
/usr/include/dmd/phobos/std/algorithm.d(5077):        std.algorithm.startsWith(alias pred = "a == b", R1, R2)(R1 doesThisStart, R2 withThis) if (isInputRange!R1 && isInputRange!R2 && is(typeof(binaryFun!pred(doesThisStart.front, withThis.front)) : bool))
/usr/include/dmd/phobos/std/algorithm.d(5146):        std.algorithm.startsWith(alias pred = "a == b", R, E)(R doesThisStart, E withThis) if (isInputRange!R && is(typeof(binaryFun!pred(doesThisStart.front, withThis)) : bool))
/usr/include/dmd/phobos/std/traits.d(241): Error: template std.algorithm.startsWith(alias pred = "a == b", Range, Needles...)(Range doesThisStart, Needles withOneOfThese) if (isInputRange!Range && Needles.length > 1 && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[0])) : bool) && is(typeof(.startsWith!pred(doesThisStart, withOneOfThese[1..__dollar])) : uint)) cannot deduce template function from argument types !()(string, string)
/usr/include/dmd/phobos/std/traits.d(251): Error: argument false has no parent
/usr/include/dmd/phobos/std/traits.d(251): Error: alias std.traits.moduleName!false.moduleName recursive alias declaration
/usr/include/dmd/phobos/std/traits.d(251): Error: template instance std.traits.moduleName!false error instantiating
/usr/include/dmd/phobos/std/traits.d(251):        instantiated from here: moduleName!(vibe)
/usr/include/dmd/phobos/std/traits.d(251):        instantiated from here: moduleName!(core)
/usr/include/dmd/phobos/std/traits.d(251):        instantiated from here: moduleName!(concurrency)
source/vibe/concurrency.d(890):        ... (4 instantiations, -v to show) ...
source/vibe/core/concurrency.d(286):        instantiated from here: IsolatedRef!(A)
source/vibe/concurrency.d(1002):        instantiated from here: Isolated!(A)
/usr/include/dmd/phobos/std/traits.d(251): Error: template instance std.traits.moduleName!(vibe) error instantiating
/usr/include/dmd/phobos/std/traits.d(251):        instantiated from here: moduleName!(core)
/usr/include/dmd/phobos/std/traits.d(251):        instantiated from here: moduleName!(concurrency)
source/vibe/concurrency.d(890):        instantiated from here: moduleName!(A)
source/vibe/concurrency.d(871):        ... (3 instantiations, -v to show) ...
source/vibe/core/concurrency.d(286):        instantiated from here: IsolatedRef!(A)
source/vibe/concurrency.d(1002):        instantiated from here: Isolated!(A)
/usr/include/dmd/phobos/std/traits.d(251): Error: template instance std.traits.moduleName!(core) error instantiating
/usr/include/dmd/phobos/std/traits.d(251):        instantiated from here: moduleName!(concurrency)
source/vibe/concurrency.d(890):        instantiated from here: moduleName!(A)
source/vibe/concurrency.d(871):        instantiated from here: generateModuleImportsImpl!(A, )
source/vibe/concurrency.d(670):        ... (2 instantiations, -v to show) ...
source/vibe/core/concurrency.d(286):        instantiated from here: IsolatedRef!(A)
source/vibe/concurrency.d(1002):        instantiated from here: Isolated!(A)
/usr/include/dmd/phobos/std/traits.d(251): Error: template instance std.traits.moduleName!(concurrency) error instantiating
source/vibe/concurrency.d(890):        instantiated from here: moduleName!(A)
source/vibe/concurrency.d(871):        instantiated from here: generateModuleImportsImpl!(A, )
source/vibe/concurrency.d(670):        instantiated from here: generateModuleImports!(A)
isolatedAggregateMethodsString(1):        ... (1 instantiations, -v to show) ...
source/vibe/core/concurrency.d(286):        instantiated from here: IsolatedRef!(A)
source/vibe/concurrency.d(1002):        instantiated from here: Isolated!(A)
source/vibe/concurrency.d(890): Error: template instance std.traits.moduleName!(A) error instantiating
source/vibe/concurrency.d(871):        instantiated from here: generateModuleImportsImpl!(A, )
source/vibe/concurrency.d(670):        instantiated from here: generateModuleImports!(A)
isolatedAggregateMethodsString(1):        instantiated from here: isolatedAggregateMethodsString!(A)
source/vibe/core/concurrency.d(286):        instantiated from here: IsolatedRef!(A)
source/vibe/concurrency.d(1002):        instantiated from here: Isolated!(A)
/usr/include/dmd/phobos/std/traits.d(3575): Error: template instance std.traits.MemberFunctionsTuple!(A, "toString").shrinkOne!(__T16CollectOverloadsTC4vibe4core11concurrency1AZ) is used as a type
/usr/include/dmd/phobos/std/traits.d(3575): Error: template instance std.traits.MemberFunctionsTuple!(A, "toString").shrinkOne!(__T16CollectOverloadsTC4vibe4core11concurrency1AZ) is used as a type
/usr/include/dmd/phobos/std/traits.d(3575): Error: can only slice tuple types, not _error_
make[1]: *** [build/test/vibe.o] Error 1

If I however don't pass -unittest to build of vibe, which is how I did it previously, I get the following linker errors

dmd build/test/src.o build/test/src.ai.work.o build/test/src.boss.o build/test/src.boss.core.o build/test/src.boss.proc.o build/test/src.boss.proc.io.o build/test/src.boss.proc.worker.o build/test/src.boss.util.o build/test/lib.xunit.dunit.o build/test/lib.std.o build/test/vibe.o -Isrc -Ilib/xunit -Ilib -I~/.dub/packages/vibe-d-master/source -I~/.dub/packages/openssl-master -I~/.dub/packages/libev-master -I~/.dub/packages/libevent-master -I/usr/include/dmd/phobos -I/usr/include/dmd/druntime/import -L-ldl -Jbuild/autogen -wi -allinst -version=VibeLibeventDriver -version=LIBEV4 -version=Have_vibe_d -version=Have_libevent -version=Have_libev -version=Have_openssl -version=VibeCustomMain -L-levent -L-levent_pthreads -L-lev -L-lssl -L-lcrypto -g -debug -unittest -ofdboss-test
build/test/src.o:(.data._D36TypeInfo_OC4vibe4core11concurrency1A6__initZ+0x10): undefined reference to `_D4vibe4core11concurrency1A7__ClassZ'
build/test/src.o: In function `pure nothrow @safe vibe.core.concurrency.IsolatedRef!(vibe.core.concurrency.CLS).IsolatedRef vibe.core.concurrency.makeIsolated!(vibe.core.concurrency.CLS).makeIsolated()':
/home/oivind/work/quad/dboss/source/vibe/core/concurrency.d:205: undefined reference to `_D4vibe4core11concurrency3CLS7__ClassZ'
build/test/src.ai.work.o:(.data._D36TypeInfo_OC4vibe4core11concurrency1A6__initZ+0x10): undefined reference to `_D4vibe4core11concurrency1A7__ClassZ'
build/test/src.ai.work.o: In function `pure nothrow @safe vibe.core.concurrency.IsolatedRef!(vibe.core.concurrency.CLS).IsolatedRef vibe.core.concurrency.makeIsolated!(vibe.core.concurrency.CLS).makeIsolated()':
/home/oivind/work/quad/dboss/source/vibe/core/concurrency.d:205: undefined reference to `_D4vibe4core11concurrency3CLS7__ClassZ'
build/test/src.boss.o:(.data._D36TypeInfo_OC4vibe4core11concurrency1A6__initZ+0x10): undefined reference to `_D4vibe4core11concurrency1A7__ClassZ'
build/test/src.boss.o: In function `pure nothrow @safe vibe.core.concurrency.IsolatedRef!(vibe.core.concurrency.CLS).IsolatedRef vibe.core.concurrency.makeIsolated!(vibe.core.concurrency.CLS).makeIsolated()':
/home/oivind/work/quad/dboss/source/vibe/core/concurrency.d:205: undefined reference to `_D4vibe4core11concurrency3CLS7__ClassZ'
build/test/src.boss.core.o:(.data._D36TypeInfo_OC4vibe4core11concurrency1A6__initZ+0x10): undefined reference to `_D4vibe4core11concurrency1A7__ClassZ'
build/test/src.boss.core.o: In function `pure nothrow @safe vibe.core.concurrency.IsolatedRef!(vibe.core.concurrency.CLS).IsolatedRef vibe.core.concurrency.makeIsolated!(vibe.core.concurrency.CLS).makeIsolated()':
/home/oivind/work/quad/dboss/source/vibe/core/concurrency.d:205: undefined reference to `_D4vibe4core11concurrency3CLS7__ClassZ'
build/test/src.boss.proc.o:(.data._D36TypeInfo_OC4vibe4core11concurrency1A6__initZ+0x10): undefined reference to `_D4vibe4core11concurrency1A7__ClassZ'
build/test/src.boss.proc.o: In function `pure nothrow @safe vibe.core.concurrency.IsolatedRef!(vibe.core.concurrency.CLS).IsolatedRef vibe.core.concurrency.makeIsolated!(vibe.core.concurrency.CLS).makeIsolated()':
/home/oivind/work/quad/dboss/source/vibe/core/concurrency.d:205: undefined reference to `_D4vibe4core11concurrency3CLS7__ClassZ'
build/test/src.boss.proc.io.o:(.data._D36TypeInfo_OC4vibe4core11concurrency1A6__initZ+0x10): undefined reference to `_D4vibe4core11concurrency1A7__ClassZ'
build/test/src.boss.proc.io.o: In function `pure nothrow @safe vibe.core.concurrency.IsolatedRef!(vibe.core.concurrency.CLS).IsolatedRef vibe.core.concurrency.makeIsolated!(vibe.core.concurrency.CLS).makeIsolated()':
/home/oivind/work/quad/dboss/source/vibe/core/concurrency.d:205: undefined reference to `_D4vibe4core11concurrency3CLS7__ClassZ'
build/test/src.boss.proc.worker.o:(.data._D36TypeInfo_OC4vibe4core11concurrency1A6__initZ+0x10): undefined reference to `_D4vibe4core11concurrency1A7__ClassZ'
build/test/src.boss.proc.worker.o: In function `pure nothrow @safe vibe.core.concurrency.IsolatedRef!(vibe.core.concurrency.CLS).IsolatedRef vibe.core.concurrency.makeIsolated!(vibe.core.concurrency.CLS).makeIsolated()':
/home/oivind/work/quad/dboss/source/vibe/core/concurrency.d:205: undefined reference to `_D4vibe4core11concurrency3CLS7__ClassZ'
build/test/src.boss.util.o:(.data._D36TypeInfo_OC4vibe4core11concurrency1A6__initZ+0x10): undefined reference to `_D4vibe4core11concurrency1A7__ClassZ'
build/test/src.boss.util.o: In function `pure nothrow @safe vibe.core.concurrency.IsolatedRef!(vibe.core.concurrency.CLS).IsolatedRef vibe.core.concurrency.makeIsolated!(vibe.core.concurrency.CLS).makeIsolated()':
/home/oivind/work/quad/dboss/source/vibe/core/concurrency.d:205: undefined reference to `_D4vibe4core11concurrency3CLS7__ClassZ'
collect2: error: ld returned 1 exit status

Re: unable to build app with new vibed

Am 20.12.2013 16:56, schrieb Øivind Loe:> Hi,

After upgrading to DMD 2.064.2 and vibed 0.7.16 (also tried master), I am unable to build my app. I build vibe in a seperate step, generating a .o file, which I link to the rest of the application. Only unittest build fails!

If I pass -unittest to both generation of vibe and my app before linking, I get the following compile errors:

(...)

See #332. It should already be fixed on DMD master and will supposedly be included in the next beta.

If I however don't pass -unittest to build of vibe, which is how I did it previously, I get the following linker errors

(...)

You could try to comment out the version(unittest) block in vibe.core.concurrency, line 1129-1140 in GIT master, but there may be more places where this issue occurs. Unfortunately this is a general issue for building different D libraries with different build flags. With careful code authoring it's possible to avoid the issue in case of "-unittest", but the risk is always there.

If removing the block works, could you also try to replace it with:

unittest {
	static class CLS {}
	static assert(is(typeof(send(Tid.init, makeIsolated!CLS()))));
	static assert(is(typeof(send(Tid.init, 1))));
	static assert(is(typeof(send(Tid.init, 1, "str", makeIsolated!CLS()))));
	static assert(!is(typeof(send(Tid.init, new CLS))));
	static assert(is(typeof(receive((Isolated!CLS){}))));
	static assert(is(typeof(receive((int){}))));
	static assert(is(typeof(receive!(void delegate(int, string, Isolated!CLS))((int, string, Isolated!CLS){}))));
	static assert(!is(typeof(receive((CLS){}))));
}

? If that works, I'd commit it to master.

Re: unable to build app with new vibed

You could try to comment out the version(unittest) block in vibe.core.concurrency, line 1129-1140 in GIT master, but there may be more places where this issue occurs. Unfortunately this is a general issue for building different D libraries with different build flags. With careful code authoring it's possible to avoid the issue in case of "-unittest", but the risk is always there.

Well.. when I want to run the unittests in my app, I don't necessarily want to run the unittests of the various libs, so in my mind, this is something that should always work.

Commenting out both

version(unittest)
{
	class CLS {}
	static assert(is(typeof(send(Tid.init, makeIsolated!CLS()))));
	static assert(is(typeof(send(Tid.init, 1))));
	static assert(is(typeof(send(Tid.init, 1, "str", makeIsolated!CLS()))));
	static assert(!is(typeof(send(Tid.init, new CLS))));
	static assert(is(typeof(receive((Isolated!CLS){}))));
	static assert(is(typeof(receive((int){}))));
	static assert(is(typeof(receive!(void delegate(int, string, Isolated!CLS))((int, string, Isolated!CLS){}))));
	static assert(!is(typeof(receive((CLS){}))));
	}

and


version(unittest)
{
	private class A { int x; string y; }

	private struct B {
		string a; // strongly isolated
		Isolated!A b; // strongly isolated
		version(EnablePhobosFails)
		Isolated!(Isolated!A[]) c; // strongly isolated
		version(EnablePhobosFails)
		Isolated!(Isolated!A[string]) c; // AA implementation does not like this
		version(EnablePhobosFails)
		Isolated!(int[string]) d; // strongly isolated
	}

	private struct C {
		string a; // strongly isolated
		shared(A) b; // weakly isolated
		Isolated!A c; // strongly isolated
		shared(A*) d; // weakly isolated
		shared(A[]) e; // weakly isolated
		shared(A[string]) f; // weakly isolated
	}

	private struct D { A a; } // not isolated
	private struct E { void delegate() a; } // not isolated
	private struct F { void function() a; } // strongly isolated (functions are immutable)
	private struct G { void test(); } // strongly isolated
	private struct H { A[] a; } // not isolated

	static assert(!isStronglyIsolated!A);
	static assert(isStronglyIsolated!(FieldTypeTuple!A));
	static assert(isStronglyIsolated!B);
	static assert(!isStronglyIsolated!C);
	static assert(!isStronglyIsolated!D);
	static assert(!isStronglyIsolated!E);
	static assert(isStronglyIsolated!F);
	static assert(isStronglyIsolated!G);
	static assert(!isStronglyIsolated!H);

	static assert(!isWeaklyIsolated!A);
	static assert(isWeaklyIsolated!(FieldTypeTuple!A));
	static assert(isWeaklyIsolated!B);
	static assert(isWeaklyIsolated!C);
	static assert(!isWeaklyIsolated!D);
	static assert(!isWeaklyIsolated!E);
	static assert(isWeaklyIsolated!F);
	static assert(isWeaklyIsolated!G);
	static assert(!isWeaklyIsolated!H);
}

makes it work again.. What should I try to change with the second block?

Re: unable to build app with new vibed

Am 20.12.2013 19:16, schrieb Øivind Loe:

You could try to comment out the version(unittest) block in vibe.core.concurrency, line 1129-1140 in GIT master, but there may be more places where this issue occurs. Unfortunately this is a general issue for building different D libraries with different build flags. With careful code authoring it's possible to avoid the issue in case of "-unittest", but the risk is always there.

Well.. when I want to run the unittests in my app, I don't necessarily want to run the unittests of the various libs, so in my mind, this is something that should always work.

AFAIK, unit tests in separate libraries are not run at all, or did that
change? At least there was a DMD bug report for a long time.

(...)

Just try to replace version(unittest) with simply unittest.

Re: unable to build app with new vibed

AFAIK, unit tests in separate libraries are not run at all, or did that
change? At least there was a DMD bug report for a long time.

I don't compile vibe as a library, but directly include the source code as a part of my project. That's why :) There has been a discussion about shared libs not working properly, but I guess I should maybe try to build vibe as a static lib? I guess the only thing that would solve is to give me the unittest symbols without actually running the unittests?

Just try to replace version(unittest) with simply unittest.

Just changing that, I get a lot of these:

source/vibe/concurrency.d(998): Error: found 'private' instead of statement
source/vibe/concurrency.d(1045): Error: unrecognized declaration
source/vibe/concurrency.d(998): Error: found 'private' instead of statement
source/vibe/concurrency.d(1045): Error: unrecognized declaration
source/vibe/concurrency.d(998): Error: found 'private' instead of statement
source/vibe/concurrency.d(1045): Error: unrecognized declaration

Re: unable to build app with new vibed

Am 22.12.2013 15:33, schrieb Øivind Loe:

AFAIK, unit tests in separate libraries are not run at all, or did that
change? At least there was a DMD bug report for a long time.

I don't compile vibe as a library, but directly include the source code as a part of my project. That's why :) There has been a discussion about shared libs not working properly, but I guess I should maybe try to build vibe as a static lib? I guess the only thing that would solve is to give me the unittest symbols without actually running the unittests?

It would also reduce the time needed to recompile the project when you
only make changes to the application... and a better chance for template
related compiler errors ;)

Just try to replace version(unittest) with simply unittest.

Just changing that, I get a lot of these:

source/vibe/concurrency.d(998): Error: found 'private' instead of statement
source/vibe/concurrency.d(1045): Error: unrecognized declaration
source/vibe/concurrency.d(998): Error: found 'private' instead of statement
source/vibe/concurrency.d(1045): Error: unrecognized declaration
source/vibe/concurrency.d(998): Error: found 'private' instead of statement
source/vibe/concurrency.d(1045): Error: unrecognized declaration

I've committed a compiling version that does these changes blindly. Not
sure it that's enough, but at least it still passes the tests.