www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - djvm fails to build

reply Chris <wendlec tcd.ie> writes:
 Rikki

I can't get djvm to build (dmd 2.069.1 and higher)

https://github.com/rikkimax/djvm

[Error Message]

Performing "debug" build using dmd for x86_64.
djvm ~master: building configuration "library"...
String
(Constructor!string, Constructor!(), Method!(char, "charAt", 
int), Method!(string, "concat", string), StaticMethod!(string, 
"valueOf", bool))
source/wrappers/djvm/bind/helpers.d(17,38): Error: type string 
has no value
source/wrappers/djvm/bind/generator.d-mixin-246(246,1): Error: 
template instance djvm.bind.helpers.getJavaMethodSignature!(void, 
string) error instantiating
source/wrappers/djvm/bind/generator.d(41,3):        instantiated 
from here: parseDefinition!(Constructor!string, false)
source/wrappers/djvm/bind/defs.d(42,46):        instantiated from 
here: generateJavaClass!("String", Constructor!string, 
Constructor!(), Method!(char, "charAt", int), Method!(string, 
"concat", string), StaticMethod!(string, "valueOf", bool))
source/wrappers/djvm/bind/generator.d-mixin-246(246,1): Error: 
CTFE failed because of previous errors in getJavaMethodSignature
source/wrappers/djvm/bind/helpers.d(17,38): Error: type int has 
no value
source/wrappers/djvm/bind/generator.d-mixin-161(161,84): Error: 
template instance djvm.bind.helpers.getJavaMethodSignature!(char, 
int) error instantiating
source/wrappers/djvm/bind/generator.d(41,3):        instantiated 
from here: parseDefinition!(Method!(char, "charAt", int), false)
source/wrappers/djvm/bind/defs.d(42,46):        instantiated from 
here: generateJavaClass!("String", Constructor!string, 
Constructor!(), Method!(char, "charAt", int), Method!(string, 
"concat", string), StaticMethod!(string, "valueOf", bool))
source/wrappers/djvm/bind/generator.d-mixin-161(161,84): Error: 
CTFE failed because of previous errors in getJavaMethodSignature
source/wrappers/djvm/bind/helpers.d(17,38): Error: type string 
has no value
source/wrappers/djvm/bind/generator.d-mixin-161(161,84): Error: 
template instance 
djvm.bind.helpers.getJavaMethodSignature!(string, string) error 
instantiating
source/wrappers/djvm/bind/generator.d(41,3):        instantiated 
from here: parseDefinition!(Method!(string, "concat", string), 
false)
source/wrappers/djvm/bind/defs.d(42,46):        instantiated from 
here: generateJavaClass!("String", Constructor!string, 
Constructor!(), Method!(char, "charAt", int), Method!(string, 
"concat", string), StaticMethod!(string, "valueOf", bool))
source/wrappers/djvm/bind/generator.d-mixin-161(161,84): Error: 
CTFE failed because of previous errors in getJavaMethodSignature
source/wrappers/djvm/bind/helpers.d(17,38): Error: type bool has 
no value
source/wrappers/djvm/bind/generator.d-mixin-161(161,84): Error: 
template instance 
djvm.bind.helpers.getJavaMethodSignature!(string, bool) error 
instantiating
source/wrappers/djvm/bind/generator.d(41,3):        instantiated 
from here: parseDefinition!(StaticMethod!(string, "valueOf", 
bool), false)
source/wrappers/djvm/bind/defs.d(42,46):        instantiated from 
here: generateJavaClass!("String", Constructor!string, 
Constructor!(), Method!(char, "charAt", int), Method!(string, 
"concat", string), StaticMethod!(string, "valueOf", bool))
source/wrappers/djvm/bind/generator.d-mixin-161(161,84): Error: 
CTFE failed because of previous errors in getJavaMethodSignature
source/wrappers/djvm/bind/defs.d(42,46): Error: CTFE failed 
because of previous errors in generateJavaClass
source/wrappers/djvm/bind/defs.d(42,2):        while evaluating 
pragma(msg, generateJavaClass("java.lang"))
source/wrappers/djvm/bind/defs.d(43,40): Error: CTFE failed 
because of previous errors in generateJavaClass
source/wrappers/djvm/bind/defs.d(43,40): Error: argument to mixin 
must be a string, not (generateJavaClass("java.lang")) of type 
string
source/wrappers/java/lang/String.d(4,1): Error: mixin 
java.lang.String.JavaClass!("String", "java.lang", 
Constructor!string, Constructor!(), Method!(char, "charAt", int), 
Method!(string, "concat", string), StaticMethod!(string, 
"valueOf", bool)) error instantiating
dmd failed with exit code 1.
Apr 12 2016
parent reply rikki cattermole <rikki cattermole.co.nz> writes:
I'll look into it tomorrow, but I suspect I'm gonna need to do some 
serious work to get it work with the new import rules.

Also maybe best to take this to gitter[0] or github issue so that I get 
an alert.

[0] https://gitter.im/rikkimax/chatWithMe
Apr 12 2016
parent Chris <wendlec tcd.ie> writes:
On Tuesday, 12 April 2016 at 15:54:10 UTC, rikki cattermole wrote:
 I'll look into it tomorrow, but I suspect I'm gonna need to do 
 some serious work to get it work with the new import rules.

 Also maybe best to take this to gitter[0] or github issue so 
 that I get an alert.

 [0] https://gitter.im/rikkimax/chatWithMe
Ok. I think some Java interop would be great (both ways). It's a widely used language after all and with the advent of Java 8 it looks like it's becoming usable again. Java has lambdas and Streams now: "The Stream interface supports the map/filter/reduce pattern and executes lazily, forming the basis (along with lambdas) for functional-style programming in Java 8." [1] Sounds familiar to a D programmer. Funny how OOP ideology has finally made concessions to more pragmatic / flexible approaches. [1] https://leanpub.com/whatsnewinjava8/read#leanpub-auto-streams
Apr 12 2016