From 785ffdacced847b3c4fe4287edafdff45b688b3a Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Fri, 15 Dec 2017 17:58:17 +0100 Subject: [PATCH] syntax/parse: remove some absolute paths related to lazy-require-syntax Since the previous version of this code was first written, Racket's requirements seem to have relaxed---but not completely! If *all* related module paths are made relative, then the deps test case breaks (but only the test is pre-compiled ?!!). If requires from disappearing module(s) to residual module(s) use absolute module paths, it seems to work. --- parse/private/parse.rkt | 2 +- parse/private/residual.rkt | 3 +-- parse/private/runtime-reflect.rkt | 5 ++--- parse/private/sc.rkt | 13 +++---------- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/parse/private/parse.rkt b/parse/private/parse.rkt index e829b66..e1ea667 100644 --- a/parse/private/parse.rkt +++ b/parse/private/parse.rkt @@ -17,7 +17,7 @@ racket/stxparam syntax/stx stxparse-info/parse/private/residual ;; keep abs. path - stxparse-info/parse/private/runtime ;; keep abs.path + "runtime.rkt" stxparse-info/parse/private/runtime-reflect) ;; keep abs. path ;; ============================================================ diff --git a/parse/private/residual.rkt b/parse/private/residual.rkt index 0799a62..1f87360 100644 --- a/parse/private/residual.rkt +++ b/parse/private/residual.rkt @@ -7,8 +7,7 @@ ;; ============================================================ ;; Compile-time -(require (for-syntax racket/private/sc - syntax/parse/private/residual-ct)) +(require (for-syntax racket/private/sc syntax/parse/private/residual-ct)) (provide (for-syntax (all-from-out syntax/parse/private/residual-ct))) (begin-for-syntax diff --git a/parse/private/runtime-reflect.rkt b/parse/private/runtime-reflect.rkt index d5089d8..59125cf 100644 --- a/parse/private/runtime-reflect.rkt +++ b/parse/private/runtime-reflect.rkt @@ -1,7 +1,6 @@ #lang racket/base -(require stxparse-info/parse/private/residual ;; keep abs. path - (only-in syntax/parse/private/residual-ct ;; keep abs. path - attr-name attr-depth) +(require "residual.rkt" + (only-in syntax/parse/private/residual-ct attr-name attr-depth) syntax/parse/private/kws) (provide reflect-parser (struct-out reified) diff --git a/parse/private/sc.rkt b/parse/private/sc.rkt index e3a8b67..d03afd5 100644 --- a/parse/private/sc.rkt +++ b/parse/private/sc.rkt @@ -1,17 +1,10 @@ #lang racket/base (require racket/lazy-require - syntax/parse/private/keywords) - -;; keep and keep as abs. path -- lazy-loaded macros produce references to this -;; must be required via *absolute module path* from any disappearing module -;; (so for consistency etc, require absolutely from all modules) -(require stxparse-info/parse/private/residual) + syntax/parse/private/keywords + "residual.rkt") (lazy-require-syntax - ;; load macro transformers lazily via identifier - ;; This module path must also be absolute (not sure why, - ;; but it definitely breaks on relative module path). - [syntax/parse/private/parse + ["parse.rkt" (define-syntax-class define-splicing-syntax-class define-integrable-syntax-class