[plt-scheme] easy way of doing check-syntax across a projectwide directory?

From: Daniel Yoo (dyoo at cs.wpi.edu)
Date: Mon Feb 12 21:33:47 EST 2007

Hi everyone,

I'm working on fixing some interface issues between modules for a project 
that uses quite a lot of modules.  Basically, some of the modules have a 
(provide (all-defined)) thing, even on variables that should be 
module-private.  I'm trying to close up those modules, slowly transforming 
things using (provide (all-defined-except ...)) to gradually introduce 
more privacy.


If this were C, I'd take an iterative approach: I'd make a single change 
to a module's interface, do a 'make clean', and then 'make' to watch what 
things break, and fix things until the compile goes through cleanly, and 
be reasonably sure I caught all the implications of the interface change.

I'm not so sure how to do the same thing in PLT Scheme.  Is there a 
similar way to make that workflow work here, or is there an alternative 
that's better?  The files in my project all live in subdirectories of a 
main project directory.


The trick I've been doing (and I'm not sure if this is correct!) has been:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; go into the directory where my project lives
> (require (lib "compiler.ss" "compiler"))
> (compile-directory-zos (current-directory) (lambda (x t) (t)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

As I edit files, I reevaluate the COMPILE-DIRECTORY-ZOS thing.


Any suggestions would be greatly appreciated.  Thanks!


Posted on the users mailing list.