rill icon indicating copy to clipboard operation
rill copied to clipboard

gitタグを打ちませんか?

Open nekketsuuu opened this issue 7 years ago • 10 comments

Wandboxで試したりビルドしたりして思ったのですが、バージョン番号をつけてgitタグを打ちませんか? 今動かしているRillにどこまで機能が実装されているのか把握するのにレポジトリのコミットを見るくらいしか方法が無いので、タグがあると助かります。

たとえばWandboxで用いられている所を0.0.1、現状の2c2e05を0.0.2にするなど如何でしょうか。

nekketsuuu avatar Apr 14 '17 11:04 nekketsuuu

ありがとうございます。

確かにどの機能がどのバージョンにあるというのは現状分かりにくいと思うので、近々機能をまとめてタグを打ちたいと思います。 wandboxではHEADを自動的にビルドして頂いているので、そのバージョンわけは難しく、こちらで明示的にタグを切る必要がありそうです。なので、機能ごとの整理のために少々お時間を頂けると… :pray:

yutopp avatar Apr 14 '17 14:04 yutopp

なるほど、Wandboxの方はそういう運用だったのですね。

実は、現状のHEADでコンパイルできるテストケースの test/pass/type_func.rill が今のWandbox上ではコンパイルできないため、Wandboxの方はどこかのコミットで固定しているのだと勝手に思っていたのですが、そうでないならこれはWandbox側での設定か何かの問題なようですね。

情報ありがとうございました。

nekketsuuu avatar Apr 15 '17 16:04 nekketsuuu

Wandbox 上では、以下のエラーが出てビルドに失敗していました。

Fatal error: exception Sys_error("/opt/wandbox/rill-head/include/rill/core/basic_types.rill: No such file or directory")

"/opt/wandbox/rill-head" はインストール先のディレクトリで、まだインストールされていないファイルを読もうとしてエラーが起きているように見えます。 何か分かることはありますか?

全体のログは以下の通りです。

root@ik1-312-16151:/var/work/rill-head# ./install.sh
++++ dirname ./install.sh
+++ cd .
+++ pwd
++ BASE_DIR=/var/work/rill-head
+ PREFIX=/opt/wandbox/rill-head
+ set -ex
++ opam config env
[WARNING] Running as root is not recommended
+ eval 'CAML_LD_LIBRARY_PATH="/root/.opam/4.04.0/lib/stublibs";' export 'CAML_LD_LIBRARY_PATH;' 'MANPATH="/root/.opam/4.04.0/man:";' export 'MANPATH;' 'PERL5LIB="/root/.opam/4.04.0/lib/perl5";' export 'PERL5LIB;' 'OCAML_TOPLEVEL_PATH="/root/.opam/4.04.0/lib/toplevel";' export 'OCAML_TOPLEVEL_PATH;' 'PATH="/root/.opam/4.04.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";' export 'PATH;'
++ CAML_LD_LIBRARY_PATH=/root/.opam/4.04.0/lib/stublibs
++ export CAML_LD_LIBRARY_PATH
++ MANPATH=/root/.opam/4.04.0/man:
++ export MANPATH
++ PERL5LIB=/root/.opam/4.04.0/lib/perl5
++ export PERL5LIB
++ OCAML_TOPLEVEL_PATH=/root/.opam/4.04.0/lib/toplevel
++ export OCAML_TOPLEVEL_PATH
++ PATH=/root/.opam/4.04.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ export PATH
+ PATH=/opt/llvm/bin:/root/.opam/4.04.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ cp /opt/llvm/bin/llc /opt/wandbox/rill-head/bin/.
+ cp /opt/llvm/bin/llvm-config /opt/wandbox/rill-head/bin/.
+ cd /root/
+ mkdir rill-head
+ cd rill-head
+ git clone --depth 1 https://github.com/yutopp/rill.git
Cloning into 'rill'...
remote: Counting objects: 233, done.
remote: Compressing objects: 100% (208/208), done.
remote: Total 233 (delta 13), reused 137 (delta 6), pack-reused 0
Receiving objects: 100% (233/233), 161.39 KiB | 0 bytes/s, done.
Resolving deltas: 100% (13/13), done.
Checking connectivity... done.
+ cd rill
+ RILL_LLC_PATH=/opt/wandbox/rill-head/bin/llc
+ LIBRARY_PATH=/opt/wandbox/rill-head/lib
+ omake RELEASE=true PREFIX=/opt/wandbox/rill-head
*** omake: reading OMakefiles
--- Checking for ocamlfind... (found /root/.opam/4.04.0/bin/ocamlfind)
--- Checking for ocamlc.opt... (found /root/.opam/4.04.0/bin/ocamlc.opt)
--- Checking for ocamlopt.opt... (found /root/.opam/4.04.0/bin/ocamlopt.opt)
--- Checking for ocamldep.opt... (found /root/.opam/4.04.0/bin/ocamldep.opt)
--- Checking for ocamllex.opt... (found /root/.opam/4.04.0/bin/ocamllex.opt)
--- Checking whether ocamlc understands the "z" warnings... (yes)
--- Checking whether ocamlopt can create cmxs plugins... (yes)
--- Checking release mode... (true)
--- Checking use local dev lib... (false)
--- Checking take coverage... (false)
--- Checking prefix... (/opt/wandbox/rill-head)
--- Checking bin dir... (/opt/wandbox/rill-head/bin)
--- Checking lib dir... (/opt/wandbox/rill-head/lib)
--- Checking include dir... (/opt/wandbox/rill-head/include)
--- Checking for menhir... (found /root/.opam/4.04.0/bin/menhir)
--- Checking if menhir supports the --raw-depend option... (yes)
--- Checking if ocamldep understands -modules... (yes)
*** omake: finished reading OMakefiles (0.18 sec)
--- Checking for gcc... (found /usr/bin/gcc)======                                                                                                         ] 00117 / 00368
--- Checking for g++... (found /usr/bin/g++)
--- Checking for gcc... (found /usr/bin/gcc)
--- Checking for g++... (found /usr/bin/g++)
--- Checking for gcc... (found /usr/bin/gcc)
--- Checking for ld... (found /usr/bin/ld)
--- Checking for as... (found /usr/bin/as)
- build stdlib/src_ext runtime.o
+ gcc -fPIC -nostdlib -std=c11 -c runtime.c -o runtime.o
runtime.c: In function 'rill_print_bool':
runtime.c:21:12: warning: unknown conversion type character 'b' in format [-Wformat=]===========                                                           ] 00229 / 00368
     printf("%b", v);
            ^
runtime.c:21:12: warning: too many arguments for format [-Wformat-extra-args]
- build rillc/src parser.mli
+ menhir --infer -v --external-tokens Tokens --ocamlc 'ocamlfind ocamlc -package batteries,llvm,llvm.analysis,llvm.executionengine,llvm_X86,ctypes,stdint,ocamlgraph -warn-error A -g -I .' --base parser tokens.mly parser.mly
Warning: one state has shift/reduce conflicts.
Warning: one shift/reduce conflict was arbitrarily resolved.===================================================                                            ] 00264 / 00368
- build corelib/src/core basic_types.o
+ rillc/src/rillc -c basic_types.rill --no-corelib --no-stdlib --system-lib .. -o basic_types.o
= LOAD_MODULE(/root/rill-head/rill/corelib/src/core/basic_types.rill)
= LOAD_MODULE(/root/rill-head/rill/corelib/src/core/basic_types.rill) 0.060000s
= GENERATE_CODE(basic_types.o)
= GENERATE_CODE(basic_types.o) 0.000000s
= GENERATE_OBJECT(basic_types.o)
= GENERATE_OBJECT(basic_types.o) 0.008000s
- build corelib/src/core builtin.o
+ rillc/src/rillc -c builtin.rill --no-corelib --no-stdlib --system-lib .. -o builtin.o
= LOAD_MODULE(/root/rill-head/rill/corelib/src/core/builtin.rill)
- build corelib/src/core memory.o
+ rillc/src/rillc -c memory.rill --no-corelib --no-stdlib --system-lib .. -o memory.o
= LOAD_MODULE(/root/rill-head/rill/corelib/src/core/memory.rill)
Fatal error: exception Sys_error("/opt/wandbox/rill-head/include/rill/core/basic_types.rill: No such file or directory")
Raised by primitive operation at file "pervasives.ml", line 366, characters 28-54
Called from file "src/batFile.ml", line 144, characters 49-82
Called from file "src/batFile.ml", line 148, characters 13-21
Called from file "sema_forward_ref.ml", line 251, characters 4-157
Called from file "sema_forward_ref.ml", line 47, characters 21-67
Called from file "src/batList.mlv", line 169, characters 28-33
Called from file "src/batList.mlv", line 172, characters 4-12
Called from file "sema_forward_ref.ml", line 23, characters 11-86
Called from file "sema_forward_ref.ml", line 294, characters 19-50
Called from file "sema.ml", line 122, characters 14-55
Called from file "compiler.ml", line 74, characters 10-43
Called from file "main.ml", line 108, characters 22-55
Fatal error: exception Sys_error("/opt/wandbox/rill-head/include/rill/core/basic_types.rill: No such file or directory")
Raised by primitive operation at file "pervasives.ml", line 366, characters 28-54
Called from file "src/batFile.ml", line 144, characters 49-82
Called from file "src/batFile.ml", line 148, characters 13-21
Called from file "sema_forward_ref.ml", line 251, characters 4-157
Called from file "sema_forward_ref.ml", line 47, characters 21-67
Called from file "src/batList.mlv", line 169, characters 28-33
Called from file "src/batList.mlv", line 172, characters 4-12
Called from file "sema_forward_ref.ml", line 23, characters 11-86
Called from file "sema_forward_ref.ml", line 294, characters 19-50
Called from file "sema.ml", line 122, characters 14-55
Called from file "compiler.ml", line 74, characters 10-43
Called from file "main.ml", line 108, characters 22-55
*** omake: 351/368 targets are up to date
*** omake: failed (13.06 sec, 58/58 scans, 71/179 rules, 252/288 digests)
*** omake: targets were not rebuilt because of errors:
   corelib/src/core/builtin.o
      depends on: corelib/src/core/builtin.rill
   corelib/src/core/memory.o
      depends on: corelib/src/core/memory.rill

melpon avatar Apr 22 '17 13:04 melpon

調査します!少々お時間ください。

yutopp avatar Apr 22 '17 14:04 yutopp

あ、↑のエラーが出るまでにいくつか修正したので、こういうコードになっています https://github.com/melpon/wandbox-builder/tree/tmp/rill

melpon avatar Apr 22 '17 14:04 melpon

了解です。

yutopp avatar Apr 22 '17 14:04 yutopp

/root/rill-head/rill/corelib/src/core/というディレクトリは既に存在している状態でしょうか。 そうであれば、そのディレクトリを削除することで解決するかもしれません。 (importパスの解決ロジックで、ディレクトリが見つかったらそれを採用というようになっており、コンパイラのPREFIXが探索パスにビルド時に埋め込まれているので…)

yutopp avatar Apr 22 '17 20:04 yutopp

ありがとうございます。PREFIX のディレクトリを丸ごと削除してビルドし直したら無事動きました。 (インストール先ディレクトリを検索パスに含めるのは良くないのではという気が…)

melpon avatar Apr 22 '17 23:04 melpon

ということでビルドが完了してWandboxで無事デイリービルド動くようになりました。

melpon avatar Apr 22 '17 23:04 melpon

ありがとうございます! (/opt/wandbox/rill-head/include/rill/core/の間違いでしたね…)

(インストール先ディレクトリを検索パスに含めるのは良くないのではという気が…)

ですよね。今回のトラブルは直感的でないので改良したい気持ちがあります。 コンパイラオプションでブートストラップのライブラリビルド時にはシステムのパスを無視するのが良いかな、と思っています。

yutopp avatar Apr 23 '17 04:04 yutopp