Gauche > Archives > 2015/02/16

2015/02/16 01:37:43 UTCえんどう
#
Testing kahua.test.xml ...                                       passed.
Testing persistence/efs (efs:_tmpefs) ...                        failed.
discrepancies found.  Errors are:
test bindings in module kahua.persistence: expects () => got "procedures received wrong number of argument: read-kahua-instance((#f G251)) got 4, read-kahua-instance((#f G294)) got 3, read-kahua-instance((#f G255)) got 3, read-kahua-instance((#f G255)) got 3, read-kahua-instance(kahua-instance) got 3 AND symbols referenced but not defined: slot-bound-using-class((#f G247)), class-subclasses*((#f G270)), class-subclasses*((#f G271)), class-subclasses((#f G269))"
Testing index slots (efs) ...                                    failed.
discrepancies found.  Errors are:
test bindings in module kahua.persistence: expects () => got "procedures received wrong number of argument: read-kahua-instance(kahua-instance) got 3, read-kahua-instance((#f G295)) got 3, read-kahua-instance((#f G252)) got 4, read-kahua-instance((#f G256)) got 3, read-kahua-instance((#f G256)) got 3 AND symbols referenced but not defined: class-subclasses*((#f G271)), class-subclasses*((#f G272)), class-subclasses((#f G270)), slot-bound-using-class((#f G248))"
Testing rollback ...                                             passed.
Testing entry-method ...                                         *** ERROR: Compile Error: improper list not allowed: ((#<identifier kahua.server#_> #<identifier kahua.server#<entry-method>>) arg1 . rargs)
"./entry-method.kahua":43:(define-entry-method show (arg1 :res ...

Stack Trace:
_______________________________________
  0  (report-error e)
        At line 128 of "../src/kahua-server.scm"
  1  (map identity args)
        At line 804 of "../src/kahua/server.scm"
  2  (load-kahua-module (car mods))
        At line 212 of "../src/kahua-server.scm"
*** ERROR: XML [22], char '#\#' unexpected

Stack Trace:
_______________________________________
  0  (call-with-input-string (tree->string input) (cut ssax:xml->sxml <
        At line 377 of "../src
#
これ去年既出のやつだ。OS XではGauche 0.9.4とKahua 1.0.7.3の組み合わせで出ないのにな。
2015/02/16 01:42:02 UTC(び)
#
GaucheはHEADですか?
2015/02/16 01:48:25 UTCえんどう
#
root@0c045a8be706:/tmp/Kahua-1.0.7.3# gosh -V
Gauche scheme shell, version 0.9.4 [utf-8,pthreads], x86_64-unknown-linux-gnu
2015/02/16 01:52:49 UTC(び)
#
リリース版か。むむむ。手元に環境がないや。
2015/02/16 01:53:16 UTCえんどう
#
https://github.com/eyasuyuki/kahua/blob/master/Dockerfile これをdocker buildすると再現できまっせ。
2015/02/16 01:54:41 UTC(び)
#
手が空いたらやってみます。
2015/02/16 01:55:02 UTCえんどう
#
HEADだと起きないの?
#
OS Xでも同じだった。
#
Testing persistence/efs (efs:_tmpefs) ...                        failed.
discrepancies found.  Errors are:
test bindings in module kahua.persistence: expects () => got "procedures received wrong number of argument: read-kahua-instance(kahua-instance) got 3, read-kahua-instance((#f G294)) got 3, read-kahua-instance((#f G255)) got 3, read-kahua-instance((#f G255)) got 3, read-kahua-instance((#f G251)) got 4 AND symbols referenced but not defined: class-subclasses*((#f G271)), class-subclasses((#f G269)), slot-bound-using-class((#f G247)), class-subclasses*((#f G270))"
Testing index slots (efs) ...                                    failed.
discrepancies found.  Errors are:
test bindings in module kahua.persistence: expects () => got "procedures received wrong number of argument: read-kahua-instance((#f G256)) got 3, read-kahua-instance((#f G256)) got 3, read-kahua-instance((#f G252)) got 4, read-kahua-instance((#f G295)) got 3, read-kahua-instance(kahua-instance) got 3 AND symbols referenced but not defined: class-subclasses*((#f G272)), class-subclasses((#f G270)), slot-bound-using-class((#f G248)), class-subclasses*((#f G271))"
Testing rollback ...                                             passed.
Testing entry-method ...                                         *** ERROR: Compile Error: improper list not allowed: ((#<identifier kahua.server#_> #<identifier kahua.server#<entry-method>>) arg1 . rargs)
"./entry-method.kahua":43:(define-entry-method show (arg1 :res ...

Stack Trace:
_______________________________________
  0  (report-error e)
        At line 128 of "../src/kahua-server.scm"
  1  (map identity args)
        At line 804 of "../src/kahua/server.scm"
  2  (load-kahua-module (car mods))
        At line 212 of "../src/kahua-server.scm"
*** ERROR: XML [22], char '#\#' unexpected

Stack Trace:
_______________________________________
  0  (call-with-input-string (tree->string input) (cut ssax:xml->sxml <
        At line 377 of "../src/kahua/test/xml.scm"
  1  (cmp expect r)
        At line 194 of "/usr/loc
2015/02/16 02:00:58 UTC(び)
#
そのエラーは起きない。
#
別のエラーは起きた。こないだソケット周りが変わったみたいなのでその影響だと思われる。
#
Testing kahua-httpd script ...                                   *** ERROR: <socket> required, but got (#<socket (listen "0.0.0.0:27490")>)
Stack Trace:
_______________________________________
  0  (for-each socket-close socks)
        At line 481 of "./../src/kahua-httpd.scm"
failed.
discrepancies found.  Errors are:
test httpd get: expects ("200" #t) => got #<<error> "httpd-get: retry error">
test httpd get (nonexistent): expects "404" => got #<<system-error> "connect failed to #<sockaddr inet6 \"[fe80::1]:27490\">: Connection refused">
test httpd get (static path): expects ("200" 3431) => got #<<system-error> "connect failed to #<sockaddr inet6 \"[fe80::1]:27490\">: Connection refused">
#
KahuaもGaucheも今cloneしてきたやつね
2015/02/16 02:02:44 UTCshiro
#
んー、make-server-sockets使ってるなら前からソケットのリストを返してたと思うんだけどな。
2015/02/16 02:02:45 UTC(び)
#
ソケットの方は直さなきゃ
2015/02/16 02:12:50 UTC(び)
#
make-server-socketsをホストのリストにmapしたものにappend!を適用してflattenしようとしてるみたいです
#
正しく見えるけど、うまくいってないのか
2015/02/16 02:13:05 UTCえんどう
#
OS XでGauche-0.9.4とKahua HEADだとmake check通りますね。
2015/02/16 02:17:09 UTC(び)
#
デバッグ出力の桁数増やすのどうするんでしたっけ?
#
hua-httpd.scm":437:(make-server-sockets (car h) (cdr h) :reuse-addr? #t :backlog ...
#?-    (#<socket (listen "[::]:27490")> (#<socket (listen "0.0.0.0:2 ...
#
make-server-socketsの戻り値、ソケットのリストがネストしているように見えますね。
2015/02/16 02:36:48 UTC(び)
#
:sock-init使うとおかしくなる疑惑
#
:sock-initしなければ通る。
#
なんでや...
2015/02/16 02:43:15 UTCshiro
#
sock-init試してなかった。
2015/02/16 02:43:19 UTCえんどう
#
Step 24 : RUN kahua-package create site
 ---> Running in ebbf205d2857
INFO[0001] The command [/bin/sh -c kahua-package create site] returned a non-zero code: 70
#
なんで70返すんでしたっけ?
2015/02/16 02:44:39 UTC(び)
#
プロセスの戻り値を明示しない場合は70ってsrfiかなんかで決まってるんじゃなかったっけ。
2015/02/16 02:45:00 UTCshiro
#
http://srfi.schemers.org/srfi-22/srfi-22.html
#
あっこれかな
#
diff --git a/ext/net/netaux.scm b/ext/net/netaux.scm
index 1a7300d..2b770b8 100644
--- a/ext/net/netaux.scm
+++ b/ext/net/netaux.scm
@@ -203,7 +203,7 @@
                 (v4addrs addrs))
       (guard (e [(bind-failed? e) (list s6)]
                 [else (raise e)])
-        (list s6 (filter-map (cut apply make-server-socket <> args) a4s)))))
+        (cons s6 (filter-map (cut apply make-server-socket <> args) a4s)))))
 
   ;; try binding v6 socket on addr.  If actual-port is not #f, reallocate
   ;; addr with the given port.  It is for the case that the given port is 0.
2015/02/16 02:57:08 UTC(び)
#
ですね。通りました。ありがとうございます。
#
IPv6とIPv4が同時にバインドされる場合だけ発現するわけですね。
2015/02/16 03:03:13 UTC(び)
#
sock-init、実際に使う人あんまりいないんだろうなぁ
2015/02/16 03:04:54 UTCえんどう
#
(define (main args)
  (let-args (cdr args)
      ((conf-file "c|conf-file=s")
       (site "S|site=s")
       (gosh "gosh=s")
       . restargs)
    (if (< (length restargs) 2)
	(usage)
	(apply dispatch-command restargs)))
  0)
#
これで桶。
#
ほかのkahua scriptのexit statusってどうします?
2015/02/16 03:06:10 UTC(び)
#
ほとんど意識してないと思うんだよね
#
kahua-httpdは正常終了時は0を返すようにしてるね
#
kahua-spvrも0を返してるな
#
kahua-serverも0返してる
#
kahua-installも
#
kahua-shellは70
#
kahua-userは0
#
kahua-keyservは0
#
kahua-adminは0
#
ほとんど0を返すようにしてるっぽい
#
すごいな、何をするコマンドか覚えてないものがけっこうある
#
この辺も整理したいなぁと思いながらすっかり放置だな。kahuaコマンドに統合してサブコマンド化とか考えてた記憶がうっすら
2015/02/16 03:28:36 UTCえんどう
#
これgit pushしちゃっていい?
2015/02/16 03:29:51 UTC(び)
#
Sure.
2015/02/16 03:31:50 UTCえんどう
#
pushした。
2015/02/16 03:33:10 UTC(び)
#
Tnx
2015/02/16 04:42:30 UTCえんどう
#
Dockerfileの中でADD kahua.conf /usr/local/etc/kahua/kahua.conf で追加したけど、kahua.configの中で (define kahua-config (make-parameter #f))ってやってるからダメだ>Kahua HEAD
#
今日はこれまで。
2015/02/16 06:50:03 UTCえんどう
#
root@e28b468922ab:/work# kahua-package generate hello
*** ERROR: object of class #<class <boolean>> doesn't have such slot: etc-directory
Stack Trace:
_______________________________________
  0  (kahua-etc-directory)
        At line 132 of "/usr/local/lib/kahua/kahua-package.scm"
  1  (build-path (kahua-etc-directory) "skel")
        At line 132 of "/usr/local/lib/kahua/kahua-package.scm"
  2  (apply dispatch-command restargs)
        At line 167 of "/usr/local/lib/kahua/kahua-package.scm"
root@e28b468922ab:/work#
2015/02/16 06:56:25 UTCえんどう
#
(define (generate-skel args)
  (let-args args ((creator "creator=s")
		  (mail "mail=s")
		  . projects)
    (let1 skel (build-path (kahua-etc-directory) "skel") ; FIXME!!
      (for-each (cut generate skel <> creator mail) projects))))
#
(define kahua-config (make-parameter #f))だから(kahua-etc-directory)でこけるんだな。kahuaのインストールディレクトリを特定するにはprefixを埋め込まないとだめか。
2015/02/16 06:59:29 UTC(び)
#
たぶん、デフォルトのconfigを埋め込んどいて、設定ファイルで上書きできるようにするのが正しいんだろうね
#
で、デフォルトのconfigは、make install時に生成して、libに置いておく、と。
2015/02/16 07:27:52 UTCえんどう
#
kahua-package.scm.inとかで (let1 skel (build-path ##SYSCONFDIR## "skel") とか書いといてビルドする案