- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我尝试使用 Ceylon 编译器版本 1.2 编译源代码,而我之前使用 Ceylon 编译器版本 1.1 成功编译过该源代码,但收到以下错误消息:
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" ;
我认为错误消息中的“...二进制版本 8.0 ...”指的是 Java 版本。
在两次编译尝试中(第一次使用 Ceylon 1.1,第二次使用 1.2),我使用了 Java 版本 8,并且我不想将其改回 7。
使用 Java 版本 8 编译 Ceylon SDK 有帮助吗?我怎样才能独立于整个 ceylon 发行版来做到这一点?
如何将Ceylon SDK的源码导入到我的项目中并与我的项目一起编译?
最佳答案
错误消息中的二进制版本指的是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";
。
关于Ceylon 1.2 二进制兼容性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33419750/
我正在玩这种漂亮的语言,并看到了一个名为noop的函数。 正如文档所述,它是一个无效的函数,什么也不做! 那么,为什么我要使用什么都不做的功能呢?是否要在程序集中添加“Nop”(用于管道等),但这不是
在 Ceylon 中是否有一种简单的方法来创建一个无限迭代器,它通过调用相同的给定无参数函数来生成每个元素?换句话说,语言模块是否提供与 Java 8 的 Stream.generate(Suppli
我希望以下内容能够发挥作用: void takeOnlyStrings(String* s) { print(s); } {String|Integer*} ab = {"Hi", 1}; ta
在命令行 Java 应用程序中,您可以通过 args 参数获取参数: public static void main(String[] args) { 如何在 ceylon 做类似的事情?我尝试复制
我有一个通用函数,它需要创建一个元组来调用一个我不知道其参数类型的函数。 像这样(除了这个例子中的 array 是由一些外部代码创建的,所以我不能直接应用该函数): Result apply(
假设我在 ceylon 有几个嵌套的 for 循环。如何摆脱所有循环: variable Integer? something = null; for (i in 0:3) { for (j in
如何仅使用 ceylon 命令行工具而不是 ant 将 ceylon 发行版设置和构建为混合 java 和 ceylon 项目? 我假设已经按照 https://github.com/ceylon/c
我已阅读walkthrough about sequences但我真的不明白为什么有一种方法可以同时定义文字可迭代和文字序列。 {String+} iterable = {"String1", "St
如何在 ceylon 中实现“monadic for/yield”语法,例如对于蹦床,因为 Ceylon 不执行尾部调用优化。 for/yield-syntax 需要引入新的变量名称,而使用类似树的语
我正在尝试将从 ceylon.interop.java { CeylonList } 派生的 ceylon 类设置为 ceylon 模块外部的 java 单元(用 ceylon 术语来说,这将被称为模
我想要这样的东西: [String, Integer] values = SomeClass("Hi", 1).values(); [Boolean, Float] others = SomeClas
我在 ceylon 有一个序列,我想创建一个新序列,其中一个元素根据索引替换为其他元素: [String*] strings = ["zero", "one", "two"]; value index
我想要这样的东西: [String, Integer] values = SomeClass("Hi", 1).values(); [Boolean, Float] others = SomeClas
是否有一种简单的方法可以迭代 Ceylon 中类的所有枚举实例? 就像 Java 枚举的 values() 一样? abstract class Suit() of hearts | diamonds
我在递增可变整数时遇到了一些问题。这段代码: variable Integer myInteger = -1; Integer getInteger () { myInteger = myIn
有没有办法一次性初始化一个顺序值而不是? 比如,我可以声明它,然后使用 for 循环逐步填充它吗? 由于这一切都可能发生在类体内,因此一旦类实例构造阶段完成,Sequential 值的真正不变性就可以
我尝试使用 Ceylon 编译器版本 1.2 编译源代码,而我之前使用 Ceylon 编译器版本 1.1 成功编译过该源代码,但收到以下错误消息: source/com/example/hellowo
我尝试使用 Ceylon 和 Eclipse。我已经安装了JDK。我的计算机中有 Java 版本 7 和 8。 Eclipse的配置看起来不错,我可以看到Ceylon透视图,创建项目,我有一个Ceyl
有没有一种方法可以“洗牌”一个Iterable(或Sequence),以便元素随后随机排序,类似于Java的Collections.shuffle() ?我查看了 Iterable、Collectio
我正在尝试创建一个满足接口(interface) Iterable 的类“Gprogram” (这样我就可以在我的 Gprogram 中迭代 Gcommand)。但是,我只能使用类型 Iterable
我是一名优秀的程序员,十分优秀!