diff --git a/collects/stepper/internal-docs.txt b/collects/stepper/internal-docs.txt index d301d07e7f..223b42402b 100644 --- a/collects/stepper/internal-docs.txt +++ b/collects/stepper/internal-docs.txt @@ -233,6 +233,8 @@ stepper-define-struct-hint : this expression came from a define-struct. The value associated with this label is the syntax-object representing the define-struct itself. +NB: this should be renamed now that we're using it for "require" as well. + stepper-test-suite-hint : this expression was the expression being tested in a test-suite-tool test. this hint indicates to the annotator that the expression should diff --git a/collects/stepper/private/annotate.rkt b/collects/stepper/private/annotate.rkt index 667eb3f781..78b6e8e243 100644 --- a/collects/stepper/private/annotate.rkt +++ b/collects/stepper/private/annotate.rkt @@ -1258,7 +1258,13 @@ [(define-syntaxes (new-vars ...) e) exp] [(#%require specs ...) - exp] + #`(begin #,exp + (#%plain-app #,(make-define-struct-break + (stepper-syntax-property + exp + 'stepper-define-struct-hint + ;; I hope this actually looks right, and isn't mangled by the expander: + exp))))] [(#%provide specs ...) exp] [(begin . bodies) diff --git a/collects/stepper/stepper-tool.rkt b/collects/stepper/stepper-tool.rkt index 3b57910951..92df9bec33 100644 --- a/collects/stepper/stepper-tool.rkt +++ b/collects/stepper/stepper-tool.rkt @@ -234,7 +234,7 @@ (define (stepper-tab-mixin super%) (class* super% (stepper-tab<%>) - (inherit get-ints get-defs get-frame) + (inherit get-ints get-defs get-frame get-directory) ;; a reference to a possible stepper frame. (define stepper-frame #f) @@ -287,11 +287,12 @@ [language-level-name (language-level->name language-level)]) (if (or (stepper-works-for? language-level) (is-a? language-level drracket:module-language:module-language<%>)) - (set! stepper-frame - (go this - program-expander - (+ 1 (send (get-defs) get-start-position)) - (+ 1 (send (get-defs) get-end-position)))) + (parameterize ([current-directory (get-directory)]) + (set! stepper-frame + (go this + program-expander + (+ 1 (send (get-defs) get-start-position)) + (+ 1 (send (get-defs) get-end-position))))) (message-box (string-constant stepper-name) (format (string-constant stepper-language-level-message)