Summary
static-modules exports procedure-internal definitions
Metadata
- Id: 3f97a976b7444a9e476a6b645b4aa6ad12586eb7
- Trac id: 512
- Type: defect
- Reporter: sjamaan
- Owner: iraikov
- Cc:
- Status: closed
- Component: extensions
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone:
- Version: 4.6.x
- Changetime: 2011-03-08 11:45:15 UTC
- Created: 2011-02-19 13:57:52 UTC
- Keywords: static-modules
Description
When compiling static-modules, we get messages like this:
Warning: exported identifier of module `static-modules' has not been defined: Signature
It's probably caused by a problem with the expansion of define-datatype
Changes and comments
[2011-02-19 17:44:31 UTC] sjamaan changed description
[2011-02-19 19:03:16 UTC] sjamaan changed status from new to assigned
[2011-02-19 19:03:16 UTC] sjamaan changed component from expander to extensions
[2011-02-19 19:03:16 UTC] sjamaan changed summary
[2011-02-19 19:03:16 UTC] sjamaan changed owner from sjamaan to iraikov
[2011-02-19 19:03:16 UTC] sjamaan removed milestone 4.7.0
[2011-02-19 19:03:16 UTC] sjamaan changed keywords from expander to static-modules
[2011-02-19 19:03:16 UTC] sjamaan wrote:
Hm, come to think of it, it's probably a bug in static-modules. It does something similar to:
(module foo
(my-datatype? Sym Sym+Str)
(import chicken scheme)
(use datatype)
(define (some-procedure)
(define-datatype my-datatype my-datatype?
(Sym (id symbol?))
(Sym+Str (id symbol?) (s string?)))))
I don't think this should work (defining stuff inside a procedure and then exporting it like it was defined in the module's toplevel, ie outside that procedure).
My hunch is that this worked before because of the bug that got fixed in #445.
I'm assigning this to Ivan and changing the ticket title to reflect that it's actually most likely a bug in static-modules and not in datatype or Chicken core.
[2011-02-19 19:07:44 UTC] sjamaan wrote:
Ivan, please verify it's a bug in static-modules. It can be reproduced by installing static-modules with experimental Chicken (I tested with 4.6.6)
I'm not 100% sure it's actually caused by the bugfix in #445, because I *think* that fix is supposed to be included with 4.6.5. I can't find it in the changelog at http://lists.nongnu.org/archive/html/chicken-users/2011-02/msg00033.html though... Felix?
[2011-02-19 19:36:49 UTC] sjamaan wrote:
I just checked (I'm lazy and stupid; should've done that *before* posting the previous message) and Chicken 4.6.5 *does* include the patch for #445 (at least, it fails on the snippet in the ticket's description, whereas 4.6.5 just returns a "foo" record object)
static-modules fails when I try to install it, too! However, the latest Salmonella run didn't report failure. Now I'm totally confused. I'll ping Mario about this.
tl;dr: Ivan, you can just use the latest dev snapshot, you don't have to install "experimental" from git. Salmonella appears to be broken.
[2011-02-20 05:57:31 UTC] iraikov wrote:
I am able to install static-modules and miniML using Chicken 4.6.5. However, as you have guessed static-modules has no business exporting the datatype constructors. I will remove the unnecessary exports, but we should probably look into whether bug #465 is related to this before closing this one.
[2011-02-20 12:51:52 UTC] sjamaan wrote:
Thank you for fixing this so quickly, Ivan.
You mention #465 but that is about Spiffy and OpenSSL. I assume you mean #445 (the one about internal declarations)?
[2011-02-20 13:28:03 UTC] sjamaan wrote:
I just tested but there's one such bug left:
Warning: reference to possibly unbound identifier `modterm?' in: Warning: Mclosure_v Error: module unresolved: static-modules
[2011-02-20 13:49:13 UTC] mario wrote:
Replying to sjamaan:
> tl;dr: Ivan, you can just use the latest dev snapshot, you don't have to install "experimental" from git. Salmonella appears to be broken.
I've just applied some fixes to the salmonella chroot, as suggested by Peter (removed chicken from PATH and put the chicken used by salmonella as the first path in the PATH used by run-salmonella.scm.)
[2011-02-21 02:40:39 UTC] iraikov wrote:
Ok, I have fixed that now. Of course I meant #445. I would like to install the latest development snapshot, but only up to 4.6.5 appear on the page, and I already have that installed.
Replying to sjamaan: > I just tested but there's one such bug left: > > { > Warning: reference to possibly unbound identifier `modterm?' in: > Warning: Mclosure_v > > Error: module unresolved: static-modules > }
[2011-02-21 09:23:25 UTC] sjamaan wrote:
Replying to iraikov: > Ok, I have fixed that now. Of course I meant #445. I would like to install the latest development snapshot, but only up to 4.6.5 appear on the page, and I already have that installed.
4.6.5 is the latest snapshot. To get anything newer you'd have to install straight from the git "experimental" branch.