[racket-dev] Compile cache being incorrect

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sat Apr 5 11:38:08 EDT 2014

That sounds difficult.

On Saturday, April 5, 2014, Eric Dobson <eric.n.dobson at gmail.com> wrote:

> Also this is a poor solution for me because `raco make` compiles all
> the dependencies serially. I have also tried doing 'raco setup -D' for
> the packages I am dependent on but that has the issue of compiling
> everything in those packages which is over kill (and thus slower than
> needed).
>
> My end goal is a very fast edit/test loop (~100ms), which may be
> impossible but I want to be aggressive.
>
>
> On Sat, Apr 5, 2014 at 8:14 AM, Robby Findler
> <robby at eecs.northwestern.edu> wrote:
> > Yes, Sam. I don't think anyone is happy with the status quo.
> >
> > Perhaps the tradeoffs have changed since last time a careful
> investigation
> > happened.
> >
> > Robby
> >
> >
> > On Saturday, April 5, 2014, Sam Tobin-Hochstadt <samth at cs.indiana.edu>
> > wrote:
> >>
> >> I don't think this is a good answer for Racket.  Certainly the docs
> >> don't say that you need to always do this if you want your program to
> >> work right. If Racket doesn't work right in the presence of stale
> >> compiled filed, then it should just error in those cases, rather than
> >> doing the wrong thing. Of course it would be better to work correctly
> >> in that case, but this is a hard problem, and it's reasonable to not
> >> have a solution. But having the system act like it works when it
> >> doesn't is worse.
> >>
> >> Sam
> >>
> >> On Sat, Apr 5, 2014 at 8:13 AM, Robby Findler
> >> <robby at eecs.northwestern.edu> wrote:
> >> > raco make x.rkt && racket x.rkt
> >> >
> >> > Robby
> >> >
> >> >
> >> > On Fri, Apr 4, 2014 at 11:16 PM, Eric Dobson <eric.n.dobson at gmail.com
> >
> >> > wrote:
> >> >>
> >> >> Great that explains it and with that information I was able to
> >> >> simplify my test case to
> >> >>
> >> >> tmp.rkt
> >> >> #lang racket
> >> >>
> >> >> (require "tmp2.rkt")
> >> >>
> >> >> (define-syntax (go stx)
> >> >>   (foo))
> >> >>
> >> >> (go)
> >> >>
> >> >> tmp2.rkt
> >> >> #lang racket
> >> >>
> >> >> (provide (for-syntax foo))
> >> >>
> >> >> (begin-for-syntax
> >> >>   (define (foo) #'3))
> >> >>
> >> >> So now the question is how do I run my code so as to not be bit by
> >> >> this? I want a command to run my program that is both fast to run and
> >> >> correct with regards to my source. My previous assumption was that
> the
> >> >> zo file's logic was safe if I wasn't trying to break it but I now
> know
> >> >> better. Is my only option to either always compile or never compile?
> >> >>
> >> >>
> >> >> On Fri, Apr 4, 2014 at 7:15 AM, Matthew Flatt <mflatt at cs.utah.edu>
> >> >> wrote:
> >> >> > If I understand the question:
> >> >> >
> >> >> >  * With 34c3eed615, "pr12644.rkt" can compile and run.
> >> >> >
> >> >> >  * With d29df205f7, "pr12644.rkt" fails to compile.
> >> >> >
> >> >> >  * A bytecode form of "pr12644.rkt" compiled with 34c3eed615 can
> >> >> > still
> >> >> >    run in d29df205f7, because run-time support for "pr12644.rkt"
> >> >> > didn't
> >> >> >    change.
> >> >> >
> >> >> >  * When you tell `racket` to run "pr12644.rkt", it will use a ".zo"
> >> >> > for
> >> >> >    each of "pr12644.rkt" and its dependencies as long each
> individual
> >> >> >    ".zo" file has a newer timestamp than its ".rkt" file. That is,
> >> >> > the
> >> >> >    only timestamp comparisons are on individual ".rkt" and ".zo"
> >> >> > pairs.
> >> >> >
> >> >> >  * When you tell `raco make` to build "pr12644.rkt", it checks
> >> >> >    dependencies (via ".dep" file) and compares a ".rkt" file's
> >> >> >    timestamp against the times of all of its dependencies, instead
> of
> >> >> >    just checking individual ".rkt" and ".zo" pairs. That's why a<
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20140405/3a58a565/attachment.html>

Posted on the dev mailing list.