default   Racket Bugs
Main PageQuick QueryStandard QueryAdvanced QueryHelp
Log in

View Problem Report: 13096

send email to interested parties or send email followup to audit-trail
Reporter's email: asumu at ccs dot neu dot edu
Number: 13096
Category: all
Synopsis: submodule & enter! problem
Class: sw-bug
Responsible: mflatt
Notify-List:
Severity: serious
Priority: medium
State: closed
Confidential: no
Arrival-Date: Tue Sep 04 18:52:01 -0400 2012
Closed-Date: Sun Feb 10 07:57:48 -0500 2013
Last-Modified: Sun Feb 10 07:57:48 -0500 2013
Originator: Asumu Takikawa
Organization: plt
Submitter-Id: unknown
Release: 5.3.0.22--2012-09-04(ba56fd72/d)
Environment: unix "Linux willamette 3.2.0-2-amd64 #1 SMP Mon May 21 17:45:41 UTC 2012 x86_64 GNU/Linux" (x86_64-linux/3m) (get-display-depth) = 32
Human Language: english
(current-memory-use) 398321520
Links: (links) = ("gcr-bug" "clojure"); (links #:user? #f) = (); (links #:root? #t) = (); (links #:user? #f #:root? #t) = ()


Collections:
("/home/asumu/plt/racket-git/add-on/5.3.0.22/collects"
(non-existent-path))
("/home/asumu/plt/racket-git/collects"
("graphics" "future-visualizer" "frtime" "framework" "make" "sgl" "launcher" "compiler" "mred" "srfi" "setup" "wxme" "honu" "mrlib" "scriblib" "r5rs" "trace" "info-domain" "typed-racket" "racket" "net" "file" "slideshow" "string-constants" "racklog" "openssl" "macro-debugger" "xml" "mysterx" "html" "drscheme" "at-exp" "tmp2" "hierlist" "profile" "icons" "sirmail" "readline" "config" "syntax" "scribble" "texpict" "mzlib" "typed" "web-server" "plai" "handin-client" "rnrs" "eopl" "drracket" "handin-server" "planet" "syntax-color" "repo-time-stamp" "test-engine" "games" "picturing-programs" "ffi" "xrepl" "images" "errortrace" "json" "tmp3" "data" "unstable" "tmp1" "NormalizationTest.txt" "r6rs" "browser" "2htdp" "parser-tools" "slatex" "scheme" "compatibility" "algol60" "scribblings" "stepper" "lazy" "rackunit" "gui-debugger" "plot" "help" "meta" "redex" "version" "defaults" "s-exp" "tests" "swindle" "mzscheme" "deinprogramm" "raco" "tmp0-filelib" "preprocessor" "typed-scheme" !
"db" "embedded-gui" "lang" "dynext" "reader" ".gitignore" "htdp" "schemeunit" "teachpack" "mzcom" "datalog"))

Computer Language: (("Determine language from source") (#(#t print mixed-fraction-e #f #t debug) (default) #() "#lang racket\n" #f #t ((main) (test))))
Description: If you run "2.rkt" attached below from the `racket` executable, it will
produce the following error:

$ racket 2.rkt
module->namespace: module not instantiated in the current namespace
  name: #<resolved-module-path:"/home/asumu/code/gcr-bug/1.rkt">
  context...:
   /home/asumu/plt/racket-git/collects/racket/enter.rkt:33:0: do-enter!
   /home/asumu/code/gcr-bug/2.rkt: [running body]

If you remove the (#%require racket/unit) from "2.rkt", it will work
fine. If you remove the submodule require in "1.rkt", it will also start
working. If "2.rkt" is written in #lang racket (includes racket/unit), it
fails.

I also tried copying the contents of racket/unit to a separate file
(say "3.rkt") and requiring that instead. It seems to work fine in that case
(relative require or using `raco link`). Requiring an arbitrary file with
a submodule declaration (like what's contained in racket/unit) instead of
racket/unit also makes the problem go away.

In DrRacket, it also does not error.
File Attachments:
How-To-Repeat: ;; 1.rkt

#lang racket/base

(#%require (submod racket/unit compat))

;; 2.rkt
#lang racket/base

(#%require racket/unit)
(#%require racket/enter)

(enter! "1.rkt")
Fix:
Release-Note:
Unformatted:

send email to interested parties or send email followup to audit-trail

Audit Trail:

Responsible changed from "nobody" to "mflatt" by mflatt at racket-lang.org at Sun, 10 Feb 2013 07:57:48 -0500
Reason>>> A commit by mflatt at racket-lang.org has resolved this report
  http://git.racket-lang.org/plt/commit/2fc7cad446
State changed from "open" to "closed" by mflatt at racket-lang.org at Sun, 10 Feb 2013 07:57:48 -0500
Reason>>> A commit by mflatt at racket-lang.org has resolved this report
  http://git.racket-lang.org/plt/commit/2fc7cad446
  | racket/enter: fix for `enter!' related to submodules
  | 
  | The load handler didn't obey the protocol with respect to a second
  | argument that is a list starting with #f.
  | 
  | Closes PR 13096