Steven Schveighoffer
| I'm building a library that uses vibe-core as an indirect dependency. Specifically, I'm testing the library with dub test.
A very odd thing happens as I'm picking off compiler errors one at a time. After all the errors that I created are listed, I get this list:
../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(1546,16): Error: template core.atomic.atomicOp cannot deduce function from argument types !("+=")(shared(uint), int), candidates are:
/home/steves/.dvm/compilers/dmd-2.091.0/linux/bin/../../src/druntime/import/core/atomic.d(543,14): atomicOp(string op, T, V1)(ref shared T val, V1 mod)
with op = "+=",
T = uint,
V1 = int
must satisfy the following constraint:
__traits(compiles, mixin("*cast(T*)&val" ~ op ~ "mod"))
../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(1548,28): Error: template core.atomic.atomicOp cannot deduce function from argument types !("-=")(shared(uint), int), candidates are:
/home/steves/.dvm/compilers/dmd-2.091.0/linux/bin/../../src/druntime/import/core/atomic.d(543,14): atomicOp(string op, T, V1)(ref shared T val, V1 mod)
with op = "-=",
T = uint,
V1 = int
must satisfy the following constraint:
__traits(compiles, mixin("*cast(T*)&val" ~ op ~ "mod"))
../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(327,10): Error: template instance vibe.core.sync.TaskMutexImpl!false error instantiating
../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(1546,16): Error: template core.atomic.atomicOp cannot deduce function from argument types !("+=")(shared(uint), int), candidates are:
/home/steves/.dvm/compilers/dmd-2.091.0/linux/bin/../../src/druntime/import/core/atomic.d(543,14): atomicOp(string op, T, V1)(ref shared T val, V1 mod)
with op = "+=",
T = uint,
V1 = int
must satisfy the following constraint:
__traits(compiles, mixin("*cast(T*)&val" ~ op ~ "mod"))
../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(1548,28): Error: template core.atomic.atomicOp cannot deduce function from argument types !("-=")(shared(uint), int), candidates are:
/home/steves/.dvm/compilers/dmd-2.091.0/linux/bin/../../src/druntime/import/core/atomic.d(543,14): atomicOp(string op, T, V1)(ref shared T val, V1 mod)
with op = "-=",
T = uint,
V1 = int
must satisfy the following constraint:
__traits(compiles, mixin("*cast(T*)&val" ~ op ~ "mod"))
../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(426,10): Error: template instance vibe.core.sync.TaskMutexImpl!true error instantiating
../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(1607,16): Error: template core.atomic.atomicOp cannot deduce function from argument types !("+=")(shared(uint), int), candidates are:
/home/steves/.dvm/compilers/dmd-2.091.0/linux/bin/../../src/druntime/import/core/atomic.d(543,14): atomicOp(string op, T, V1)(ref shared T val, V1 mod)
with op = "+=",
T = uint,
V1 = int
must satisfy the following constraint:
__traits(compiles, mixin("*cast(T*)&val" ~ op ~ "mod"))
../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(1609,28): Error: template core.atomic.atomicOp cannot deduce function from argument types !("-=")(shared(uint), int), candidates are:
/home/steves/.dvm/compilers/dmd-2.091.0/linux/bin/../../src/druntime/import/core/atomic.d(543,14): atomicOp(string op, T, V1)(ref shared T val, V1 mod)
with op = "-=",
T = uint,
V1 = int
must satisfy the following constraint:
__traits(compiles, mixin("*cast(T*)&val" ~ op ~ "mod"))
../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(467,10): Error: template instance vibe.core.sync.RecursiveTaskMutexImpl!false error instantiating
../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(1607,16): Error: template core.atomic.atomicOp cannot deduce function from argument types !("+=")(shared(uint), int), candidates are:
/home/steves/.dvm/compilers/dmd-2.091.0/linux/bin/../../src/druntime/import/core/atomic.d(543,14): atomicOp(string op, T, V1)(ref shared T val, V1 mod)
with op = "+=",
T = uint,
V1 = int
must satisfy the following constraint:
__traits(compiles, mixin("*cast(T*)&val" ~ op ~ "mod"))
../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(1609,28): Error: template core.atomic.atomicOp cannot deduce function from argument types !("-=")(shared(uint), int), candidates are:
/home/steves/.dvm/compilers/dmd-2.091.0/linux/bin/../../src/druntime/import/core/atomic.d(543,14): atomicOp(string op, T, V1)(ref shared T val, V1 mod)
with op = "-=",
T = uint,
V1 = int
must satisfy the following constraint:
__traits(compiles, mixin("*cast(T*)&val" ~ op ~ "mod"))
../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(493,10): Error: template instance vibe.core.sync.RecursiveTaskMutexImpl!true error instantiating
../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(2006,22): Error: template core.atomic.atomicOp cannot deduce function from argument types !("+=")(shared(uint), int), candidates are:
/home/steves/.dvm/compilers/dmd-2.091.0/linux/bin/../../src/druntime/import/core/atomic.d(543,14): atomicOp(string op, T, V1)(ref shared T val, V1 mod)
with op = "+=",
T = uint,
V1 = int
must satisfy the following constraint:
__traits(compiles, mixin("*cast(T*)&val" ~ op ~ "mod"))
../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(2008,26): Error: template core.atomic.atomicOp cannot deduce function from argument types !("-=")(shared(uint), int), candidates are:
/home/steves/.dvm/compilers/dmd-2.091.0/linux/bin/../../src/druntime/import/core/atomic.d(543,14): atomicOp(string op, T, V1)(ref shared T val, V1 mod)
with op = "-=",
T = uint,
V1 = int
must satisfy the following constraint:
__traits(compiles, mixin("*cast(T*)&val" ~ op ~ "mod"))
../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(2107,42): Error: template instance vibe.core.sync.ReadWriteMutexState!false.ReadWriteMutexState.lock!cast(LockingIntent)false error instantiating
../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(2111,20): instantiated from here: Mutex!cast(LockingIntent)false
../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(2006,22): Error: template core.atomic.atomicOp cannot deduce function from argument types !("+=")(shared(uint), int), candidates are:
And then it just abruptly ends there.
I'm not sure why all these errors come out. Looking at the code, it seems to have nothing to do with my code. Once I fix my code errors (which are legitimate errors that I made), then these mysteriously go away. I'm not calling any of these functions that it's spitting out.
Why are these being triggered? Why do they all of a sudden go away? Does anyone else see this? Is it specifically something with vibe-core? Is it something to do with dub?
-Steve
|