首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不同版本的锡兰模块?

不同版本的锡兰模块?
EN

Stack Overflow用户
提问于 2017-06-14 22:21:00
回答 0查看 43关注 0票数 2

我正在尝试做一个简单的应用程序,利用ceylon.http.serverceylon.jsonceylon.io模块。

当我编译时,我得到了这些错误:

代码语言:javascript
复制
Error:(4, 8) ceylon: source code imports two different versions of module 'com.redhat.ceylon.langtools.classfile': version '1.3.1' and version '1.3.2'
Error:(4, 8) ceylon: source code imports two different versions of module 'com.redhat.ceylon.model': version '1.3.1' and version '1.3.2'
Error:(4, 8) ceylon: source code imports two different versions of module 'com.redhat.ceylon.common': version '1.3.1' and version '1.3.2'

为什么我会得到它们?我认为Ceylon可以在不同的版本中使用相同的模块。在Ceylon tour, Packages and modules中,它明确表示“具有模块隔离功能并能够管理同一模块的多个版本的运行时”。

我的module.ceylon看起来像这样:

代码语言:javascript
复制
native ("jvm")
module server "1.0.0" {
    import ceylon.http.server "1.3.2";
    import ceylon.json "1.3.2";
    import ceylon.io "1.3.2";
}

我的(唯一)源文件runServer.ceylon如下所示:

代码语言:javascript
复制
import ceylon.http.server { ... }
import ceylon.io { ... }

"Run the module `server`."
shared void runServer() {

    //create a HTTP server
    value server = newServer {
        //an endpoint, on the path /hello
            Endpoint {
                path = startsWith("/hello");
                //handle requests to this path
                service(Request request, Response response) =>
                        response.writeString("hello world");
            }
    };

    //start the server on port 8080
    server.start(SocketAddress("127.0.0.1",8080));

}
EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44547445

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档