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]

Submitted by:  Ludovic Courtès <civodul>
Submitted on:  Thu 17 Jun 2010 01:06:37 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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>
Project 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>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup