seanjensengrey / mosh-scheme

Automatically exported from code.google.com/p/mosh-scheme
Other
0 stars 0 forks source link

nmosh failure to compile weird but correct library #222

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to compile Nausicaa/Scheme version 0.2d11 with nmosh.

What is the expected output? What do you see instead?
It should compile fine as it does with mosh.  The following error:

--- Compiling basic libraries for Mosh
test -f ../src/libraries/compile-basic.mosh.sps && 
MOSH_LOADPATH=./fasl.d:/usr/local/lib/scheme nmosh --verbose 
../src/libraries/compile-basic.mosh.sps
...
-> Reading 
/home/marco/src/devel/scheme/nausicaa/scheme/=build.devel/fasl.d/nausicaa/byteve
ctors/u8low.sls 
-> Expanding.. 
-> LOOKING-UP... (nausicaa bytevectors generic-low) 
-> CACHE: loading 
/home/marco/src/devel/scheme/nausicaa/scheme/=build.devel/fasl.d/nausicaa/byteve
ctors/generic-low.sls 
-> Reading 
/home/marco/src/devel/scheme/nausicaa/scheme/=build.devel/fasl.d/nausicaa/byteve
ctors/generic-low.sls 
-> Expanding.. 
-> CACHE: COMPILE... 
-> evaluating... 
-> Expanding.. 
launching debugger...
 Syntax error
      who : expand-file
  message : File should be of the form:
      <library>*
    | <library>* <toplevel program>
     form : (le)
make: *** [mfasl-basic] Error 255

What version of the product are you using? On what operating system?
Mosh R6RS scheme interpreter, version 0.2.7 (mosh-0.2.7-369-g506cd1f 2011/07/11 
04:30:47).  i686-pc-linux-gnu.

Please provide any additional information below.
All the other R6 implementations compile fine, mosh included.  To get the code:

https://github.com/marcomaggi/nausicaa/downloads

or checkout the head of the "nmosh" branch in the repository.

Original issue reported on code.google.com by mrc....@gmail.com on 7 Aug 2011 at 11:40

GoogleCodeExporter commented 9 years ago
Confirmed. This is mosh's reader problem. Your library will be read as

(library (nausicaa bytevectors generic-low)
  (export instantiate-body)
...
)
le ;; <= bogus datum

Psyntax-mosh will silently ignore 2nd datum, so this problem only affects nmosh 
expander.

To workaround this problem, change last few lines like:

;;;; done

)

;; hack for mosh-0.2.7

)

Original comment by oku...@gmail.com on 8 Aug 2011 at 3:14

GoogleCodeExporter commented 9 years ago
The problem is the missing line ending at the end of the file?!?

Original comment by mrc....@gmail.com on 9 Aug 2011 at 6:59

GoogleCodeExporter commented 9 years ago
Note;

Reproducing case was: 4432e933a6a01e6cb125c99690a72cd611f91c75
of 
http://github.com/marcomaggi/nausicaa.git

Upstream implemented workaround as
62ab2c81f2d527b57e3e61de02386d8efad74622

Original comment by oku...@gmail.com on 9 Aug 2011 at 5:44