Summary

module importing itself does not result in an error

Metadata

Description

Doing this hangs csc forever:

 [klm@kth test]$ chicken-install check-errors
 building check-errors
   installing check-errors
 [klm@kth test]$ echo '(import type-errors-numbers) (print "ok")' > test.scm
 [klm@kth test]$ csc test.scm && ./test
 ok
 [klm@kth test]$ csc -static test.scm && ./test
 ^C

I think the cause has something to do with the static dependency list of check-error's type-errors-numbers module:

 [klm@kth test]$ cat ~/.chickens/5.0.0rc1/lib/chicken/9/type-errors-numbers.link 
 (type-errors-numbers type-errors-basic)
 [klm@kth test]$ # this shouldn't contain itself, should it?
 [klm@kth test]$ # this seems to be a reasonable workaround:
 [klm@kth test]$ echo '(type-errors-basic)' > ~/.chickens/5.0.0rc1/lib/chicken/9/type-errors-numbers.link
 [klm@kth test]$ csc -static test.scm && ./test
 ok

Changes and comments

[2018-08-24 18:39:54 UTC] sjamaan changed version from 5.0 to 5.0.0rc1

[2018-09-02 11:58:57 UTC] sjamaan changed milestone from 5.0 to 5.1

[2018-09-02 11:58:57 UTC] sjamaan changed summary

[2018-09-02 11:58:57 UTC] sjamaan wrote:

It looks like a bug in the egg: The implementation of type-errors-numbers imports its own module!

The weird thing is that we don't get a warning or error while compiling this module. The compiler should give an error about that I think. It's not really a new bug, though. It's not necessary to fix this for 5.0.

A simplified reproduction case:

 (module foo () (import foo))

And then

 csc -J -c -static -emit-link-file foo.link foo.scm

[2018-11-09 15:18:26 UTC] sjamaan changed version from 5.0.0rc1 to 5.0.0

[2018-11-09 15:20:41 UTC] sjamaan changed version from 5.0.0 to 5.0

[2019-04-07 05:55:38 UTC] evhan set resolution to fixed

[2019-04-07 05:55:38 UTC] evhan wrote:

Fixed by 2b4ded59.

[2019-04-07 05:55:38 UTC] evhan changed status from new to closed