Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ceylon 1.2 Binary Compatibility

Tags:

ceylon

I tried to compile a source with Ceylon compiler version 1.2 that I previously compiled successfully with Ceylon compiler version 1.1 and I get the following error messages:

source/com/example/helloworld/module.ceylon:2: error: version '1.1.0' of module 'ceylon.net' was compiled by an incompatible version of the compiler (binary version 7.0 of module is not compatible with binary version 8.0 of this compiler)
    import ceylon.net "1.1.0" ;
    ^
source/com/example/helloworld/module.ceylon:2: error: version '1.1.0' of module 'ceylon.collection' was compiled by an incompatible version of the compiler (binary version 7.0 of module is not compatible with binary version 8.0 of this compiler)
    import ceylon.net "1.1.0" ;
    ^
source/com/example/helloworld/module.ceylon:2: error: version '1.1.0' of module 'ceylon.io' was compiled by an incompatible version of the compiler (binary version 7.0 of module is not compatible with binary version 8.0 of this compiler)
    import ceylon.net "1.1.0" ;
    ^
source/com/example/helloworld/module.ceylon:2: error: version '1.1.0' of module 'ceylon.file' was compiled by an incompatible version of the compiler (binary version 7.0 of module is not compatible with binary version 8.0 of this compiler)
    import ceylon.net "1.1.0" ;

I suppose that " ... binary version 8.0 ... " in the error message refers to the Java version.

In both attempts to compile (first with Ceylon 1.1, second with 1.2) I used Java version 8 and I dont want to change that back to 7.

Does it help to compile the Ceylon SDK with Java version 8? How can I do that separately from the entire Ceylon distribution?

How can I import the sources of Ceylon SDK into my project and compile it together with my project?

like image 552
Michael Avatar asked Dec 24 '22 12:12

Michael


1 Answers

The binary versions in the error message refer to the Ceylon binary versions, which I guess by unfortunate coincidence, happen to match current JVM versions.

Ceylon is compatible with both JVM 7 and JVM 8, but Ceylon 1.2.0 programs must use Ceylon 1.2.0 modules; binary compatibility with Ceylon 1.1.0 was not maintained.

The solution here is to simply change the import to import ceylon.net "1.2.0";.

like image 59
John Vasileff Avatar answered Mar 23 '23 02:03

John Vasileff