db-sockets.asd patch and asdf question
Miles Egan <[email protected]>
| Newsgroups | gmane.lisp.cclan.general |
|---|---|
| Message-ID | <[email protected]> |
I've been playing around with the vn-cclan db-sockets package. Pretty nice. I always thought it was pretty cool how easy the perl IO::* modules made it to write network clients/servers. This seems to offer a lot of the same functionality. It seems that asdf runs the gcc compilation step every time the db-sockets system is loaded, whether it's necessary or not. I've come up with the attached patch, which may or not make sense as a solution to this problem. It just does a make-style timestamp comparison. Am I correct in observing that asdf verifies that every component of a system is built and up to date before loading the system? If so, is this ultimately going to scale badly to large systems with lots of files? Would it make any sense to explicitly distinguish build and load operations and make the default load op a quicker op that assumes the system is built? Finally, a late night and too much whiskey had me wondering if we should refer to cclan as the "eval empire". (sorry) -- miles egan [email protected] OpenPGP/GPG Key 0x01F53D51 @ wwwkeys.us.pgp.net
db-sockets.asd.patch
(text/plain, 926 B)
diff -ru db-sockets/db-sockets.asd db-sockets.patched/db-sockets.asd
--- db-sockets/db-sockets.asd Wed Mar 6 15:05:02 2002
+++ db-sockets.patched/db-sockets.asd Sat Jun 8 18:03:27 2002
@@ -53,6 +53,16 @@
:directory (butlast (pathname-directory dir))
:defaults dir))))
+(defmethod operation-done-p ((operation compile-op) (component unix-dso))
+ ;; all output files must exist and oldest output file must be
+ ;; newer than newest input file
+ (let ((output-files (output-files operation component))
+ (input-files (mapcar #'component-pathname (module-components component))))
+ (and
+ (every #'probe-file output-files)
+ (> (apply #'min (mapcar #'file-write-date output-files))
+ (apply #'max (mapcar #'file-write-date input-files))))))
+
(defmethod perform :after ((operation compile-op) (dso unix-dso))
(let ((dso-name (unix-name (car (output-files operation dso)))))
(unless (zerop
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9Aq8kU4Jq/wH1PVERAi4IAJ9pESX0SniwSDBwp4oSm3ea8LcuswCgnuRy 78PySL7flPPXJsj2TWPlWSw= =BZ8X -----END PGP SIGNATURE-----