2

タイプチェッカー/src/main/Main.javaのセイロンバージョンであるrun.ceylonを使用して、セイロンプロジェクトからセイロンタイプチェッカーを実行しています。

このプロジェクトは、それ自体をタイプチェックすることになっています。

エラーなしでコンパイルされますが、実行時に型チェックのために依存関係を読み込むことができません。

ファイル: source/com/example/withmodule/module.ceylon

native("jvm")
module com.example.withmodule "1.0" {
    import com.redhat.ceylon.typechecker "1.3.0" ;
    //import     com.redhat.ceylon.module-resolver "1.3.0";
}

ファイル: source/com/example/withmodule/run.ceylon

import java.io{File}
import com.redhat.ceylon.cmr.api{RepositoryManager}
import com.redhat.ceylon.cmr.ceylon{CeylonUtils}
import com.redhat.ceylon.compiler.typechecker{TypeCheckerBuilder}
import com.redhat.ceylon.compiler.typechecker.io.cmr.impl{LeakingLogger}

shared void run(){

   value args = ["/absolutepath/ceylon-1.3.0/source/"];


    RepositoryManager repositoryManager = 
            CeylonUtils.repoManager()
                .systemRepo("/absolutepath/ceylon-1.3.0/repo")
                .logger( LeakingLogger())
                .buildManager();

    TypeCheckerBuilder tcb = 
              TypeCheckerBuilder()
                .setRepositoryManager(repositoryManager)
                .verbose(true)
                .statistics(true);

    for (String path in args) {
        tcb.addSrcDirectory( File(path));
    }

    tcb.typeChecker.process();
}

エラーなしでコンパイルされます。

ただし、実行するとエラーが発生します。

error [package not found in imported modules: 'com.redhat.ceylon.cmr.api' (add module import to module descriptor of 'com.example.withmodule')] at 2:7-2:31 of com/example/withmodule/withmodule.ceylon
error [package not found in imported modules: 'com.redhat.ceylon.cmr.ceylon' (add module import to module descriptor of 'com.example.withmodule')] at 3:7-3:34 of com/example/withmodule/withmodule.ceylon
error [package not found in imported modules: 'com.redhat.ceylon.compiler.typechecker' (add module import to module descriptor of 'com.example.withmodule')] at 4:7-4:44 of com/example/withmodule/withmodule.ceylon
error [package not found in imported modules: 'com.redhat.ceylon.compiler.typechecker.io.cmr.impl' (add module import to module descriptor of 'com.example.withmodule')] at 5:7-5:56 of com/example/withmodule/withmodule.ceylon

コンパイルと型チェックは直前に成功していたので、これは私には意味がありません。

これは、インストールされていない新鮮な ceylon 1.3.0 のダウンロードであり、単に解凍された .tar.gz から実行されます。

タイプチェッカーが必要としている追加情報のうち、取得していないものは何ですか?

4

1 に答える 1