You could try to comment out the
version(unittest)
block invibe.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?