4

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?

4

2 回答 2

6

错误消息中的二进制版本是指Ceylon二进制版本,我猜不幸的巧合,恰好与当前的 JVM 版本匹配。

Ceylon 兼容 JVM 7 和 JVM 8,但 Ceylon 1.2.0 程序必须使用 Ceylon 1.2.0 模块;未维护与 Ceylon 1.1.0 的二进制兼容性。

这里的解决方案是简单地将导入更改为import ceylon.net "1.2.0";.

于 2015-10-29T19:21:31.963 回答
4

不,这实际上是 Ceylon 的二进制版本,与 Java 无关。Ceylon 1.1 是二进制版本 7,Ceylon 1.2 是二进制版本 8。不幸的是,我们无法提供这些版本之间的二进制兼容性。

您必须在1.2.0Ceylon 1.2 中使用 SDK 模块。

于 2015-10-29T19:21:16.987 回答