bugGuile - Bugs: bug #30169, Auto-compilation failure of a...

 
 

bug #30169: Auto-compilation failure of a module doesn't lead to a failure [1.9.11]

Submitter:  Ludovic Courtès <civodul>
Submitted:  Thu 17 Jun 2010 01:06:37 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 25 Jun 2010 03:29:26 PM UTC, comment #2: 

You know, we might consider this to be the same problem as we see here:

$ guile -L .
scheme@(guile-user)> (use-modules (foo))
;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-autocompile argument to disable.
;;; compiling /tmp/foo.scm
;;; WARNING: compilation of /tmp/foo.scm failed:
;;; key read-error, throw args ("scm_i_lreadparen" "/tmp/foo.scm:3:1: end of file" () #f)
Throw to key `read-error':
ERROR: In procedure scm_i_lreadparen:
ERROR: /tmp/foo.scm:3:1: end of file
Entering the debugger. Type `bt' for a backtrace or `c' to continue.

  1. debug> c

ERROR: In procedure scm_i_lreadparen:
ERROR: /tmp/foo.scm:3:1: end of file
scheme@(guile-user)> (use-modules (foo))
scheme@(guile-user)>

The second (use-modules (foo)) should not succeed.

Andy Wingo <wingo>
Group administrator
Sun 20 Jun 2010 02:23:00 PM UTC, comment #1: 

(Follow-up from bug-guile.)

Andy says:

> Some files may be interpreted, but fail to compile.


OK.

[...]

> So, you want Guile to fail faster for this error; how do you distinguish
> it from eval-when errors as above? Or would you prefer that eval-when
> errors lead to failures as well?


Do you mean that, for programs written to be interpreted, which lack proper ‘eval-when’ clauses, the idea was to fall back to interpretation when auto-compilation fails?  That would indeed be friendlier to programs written for previous versions of Guile.

However, in the example I gave, somehow, an error should occur.  With 1.8 you would get an error when reading ‘foo.scm’, whereas here it’s just silently ignored, which sounds wrong.

Ludo'.

Ludovic Courtès <civodul>
Group administrator
Thu 17 Jun 2010 01:06:37 PM UTC, original submission:  

Consider this example, where auto-compilation of (foo) fails:

#v+
$ cat foo.scm
(define-module (foo))
(open

$ cat bar.scm
(use-modules (foo))
(display "hello!\n")

$ guile -L . bar.scm
;;; note: source file bar.scm
;;;       newer than compiled /home/ludo/.cache/guile/ccache/2.0-0.R-LE-8/home/ludo/src/guile/bar.scm.go
;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-autocompile argument to disable.
;;; compiling bar.scm
;;; compiling ./foo.scm
;;; WARNING: compilation of ./foo.scm failed:
;;; key read-error, throw args ("scm_i_lreadparen" "./foo.scm:3:1: end of file" () #f)
;;; WARNING: compilation of bar.scm failed:
;;; key read-error, throw_args ("scm_i_lreadparen" "./foo.scm:3:1: end of file" () #f)
hello!

$ echo $?
0
#v-

Guile should instead abort as soon as auto-compilation fails.

Thanks,
Ludo'.

Ludovic Courtès <civodul>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by wingo (Posted a comment)
  • -email is unavailable- added by civodul (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code