google / schism

A self-hosting Scheme to WebAssembly compiler
Apache License 2.0
1.27k stars 65 forks source link

Guile bootstrap seems to be broken again? #117

Open cwebber opened 3 years ago

cwebber commented 3 years ago

I spent some time trying to figure out why and couldn't determine why, but I get the following error:

cwebber@twig:~/devel/schism$ ./bootstrap-from-guile.sh 
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/cwebber/devel/schism/./bootstrap-from-guile.scm
;;; compiling ./schism/compiler.ss
;;; compiling ./lib/schism.ss
;;; compiled /home/cwebber/.cache/guile/ccache/3.0-LE-8-4.4/home/cwebber/devel/schism/lib/schism.ss.go
;;; compiled /home/cwebber/.cache/guile/ccache/3.0-LE-8-4.4/home/cwebber/devel/schism/schism/compiler.ss.go
;;; compiled /home/cwebber/.cache/guile/ccache/3.0-LE-8-4.4/home/cwebber/devel/schism/bootstrap-from-guile.scm.go
Backtrace:
In ice-9/boot-9.scm:
  1736:10 18 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In unknown file:
          17 (apply-smob/0 #<thunk 7f8ab51d2d60>)
In ice-9/boot-9.scm:
    718:2 16 (call-with-prompt _ _ #<procedure default-prompt-handler (k proc)>)
In ice-9/eval.scm:
    619:8 15 (_ #(#(#<directory (guile-user) 7f8ab51ccc80>)))
In ice-9/boot-9.scm:
   2806:4 14 (save-module-excursion _)
  4351:12 13 (_)
In ice-9/ports.scm:
   463:17 12 (call-with-output-file _ _ #:binary _ #:encoding _)
    474:4 11 (_ _)
   445:17 10 (call-with-input-file _ _ #:binary _ #:encoding _ #:guess-encoding _)
    470:4  9 (_ _)
In schism/compiler.ss:
   1682:2  8 (compile-stdin->stdout)
  1639:31  7 (compile-library _)
In rnrs/base.scm:
    275:1  6 (map #<procedure 7f8ab0e117a8 at schism/compiler.ss:1337:62 (code)> ((0 …) …))
In schism/compiler.ss:
   1576:2  5 (encode-code _ _)
   1493:2  4 (encode-expr (seq (seq (drop (call 460 (get-local 0))) (drop (call #))) (…)))
   1493:2  3 (encode-expr (seq (drop (call 460 (get-local 0))) (drop (call 461))))
   1490:2  2 (encode-simple-op 26 _)
In rnrs/base.scm:
    275:1  1 (map #<procedure encode-simple-op (op expr)> ((call 460 (get-local 0))))
In schism/compiler.ss:
   1490:2  0 (encode-simple-op _ _)

schism/compiler.ss:1490:2: In procedure encode-simple-op:
Wrong number of arguments to #<procedure encode-simple-op (op expr)>

However, this is confusing... encode-simple-op seems to take two arguments, and every call site I see calls it with two arguments...?

Really unsure why and how this would be breaking then... (@wingo, is it working for you)?

cwebber commented 3 years ago

Note that I get the same problem when running from geiser starting from bootstrap-from-guile.scm.

cwebber commented 3 years ago

Apparently it was a caching issue. Go figure...

I wiped ~/.cache/guile and came back and it's fine. Sorry for the noise.

cwebber commented 3 years ago

Wow, extra sorry for the noise. It wasn't a cache issue... I had commented out the part of the file where things run. I uncommented it, it still doesn't work.