[racket-dev] bug in compiler ext dependencies?

From: Tobias Hammer (tobias.hammer at dlr.de)
Date: Mon Jun 10 03:48:42 EDT 2013

Hi,

i think i found a bug in the handling of external dependencies (via  
register-external-file) in compiler/cm.
Currently if an external dependency gets deleted after the registering  
file was compiled, it is not recompiled because a missing file does not  
trigger a file changed or timestamp newer condition.

With the attached patch a missing file is simply treated as newer than  
everything. Would that be the correct behavior?


Reproduce with:

;; ----- test.rkt
#lang racket

(require (for-syntax compiler/cm-accomplice))

(begin-for-syntax
  (printf "compiled\n")

  (register-external-file (path->complete-path "ext-dep"))
  (with-output-to-file
      "ext-dep" #:exists 'replace values))


;; --- current
# raco  make sample.rkt
> compiled
# raco  make sample.rkt

# rm ext-dep
# raco  make sample.rkt
<< Missing "compiled"


;; --- patched
# raco  make sample.rkt
> compiled
# raco  make sample.rkt

# rm ext-dep
# raco  make sample.rkt
> compiled



-- 
---------------------------------------------------------
Tobias Hammer
DLR / Robotics and Mechatronics Center (RMC)
Muenchner Str. 20, D-82234 Wessling
Tel.: 08153/28-1487
Mail: tobias.hammer at dlr.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ext-dep.patch
Type: application/octet-stream
Size: 575 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20130610/977f00c4/attachment.obj>

Posted on the dev mailing list.