[racket-dev] `#%declare' and cross-phase persistent modules

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Mon Jul 22 17:17:16 EDT 2013

I get the same thing.  Also, the error message is particularly unhelpful.
It does not give the name of the module, a source location, or any
indication of what part of the module did not match what part of the
grammar in what way.  This is pretty much impossible to debug without
searching for every use of #%declare in the code base, and tracking down
every macro that can possibly expand into it.

Carl Eastlund


On Mon, Jul 22, 2013 at 5:14 PM, Stephen Chang <stchang at ccs.neu.edu> wrote:

> When compiling a fresh git head clone, I still get some cross-phase
> persistence errors (see below). Is this my fault, or are some packages
> still missing the declaration?
>
>
> raco setup: --- checking package dependencies ---
> raco setup:
> raco setup: error: during making for
> <pkgs>/errortrace-doc/errortrace/scribblings
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/errortrace-lib/errortrace
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/errortrace-lib/errortrace
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/errortrace-lib/errortrace
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/errortrace-lib/errortrace
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/errortrace-lib/errortrace
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/errortrace-lib/errortrace/lang
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/algol60
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/drracket/drscheme
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/drracket/drracket
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/drracket/drracket/private
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/drracket/scribble/tools
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/drracket/scribblings/tools
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/drracket/scribblings/tools
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/drracket/scribblings/tools
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/drracket/scribblings/drracket
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/drracket/drracket/private
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/drracket/scribblings/drracket
> raco setup:   module: does not satisfy cross-phase persistent grammar
> raco setup:
> raco setup: error: during making for <pkgs>/drracket/drracket/private
> raco setup:   module: does not satisfy cross-phase persistent grammar
>
> On Mon, Jul 22, 2013 at 12:18 PM, Matthew Flatt <mflatt at cs.utah.edu>
> wrote:
> > As of v5.90.0.2 (pending), to declare a cross-phase persistent module,
> > the module body must include
> >
> >  (#%declare #:cross-phase-persistent)
> >
> > If the module declaration fails to meet the syntactic and import
> > constraints of a cross-phase persistent module, then a syntax error is
> > reported.
> >
> > This change is backward-incompatible in two ways:
> >
> >  * Module declarations that are intended as cross-phase persistent
> >    won't be, anymore, until a `#%declare' form is added.
> >
> >    I think cross-phase persistence is new enough --- and the old, quiet
> >    inference of persistence is sufficiently distressing --- that this
> >    won't be much of an issue.
> >
> >  * The grammar of fully-expanded modules now includes `#%declare'
> >    forms.
> >
> >    Programs that process fully-expanded modules are not common, but I
> >    expect that they exist outside of the main distribution. Those
> >    programs will need to be updated. Meanwhile, they won't break until
> >    they see a module that has a `#%declare' form, which won't happen
> >    often (at least for the near future).
> >
> > Although `#:cross-phase-persistent' is the only keyword recognized by
> > `#%declare' initially, we'll add more. One possibility is a declaration
> > that corresponds to `compile-enforce-module-constants'.
> >
> > I named the form `#%declare' instead of `declare' to avoid conflicts,
> > and also because I expect the form to be used more often in macro
> > expansions than directly, so it seems like a "#%" kind of form.
> >
> > _________________________
> >   Racket Developers list:
> >   http://lists.racket-lang.org/dev
> _________________________
>   Racket Developers list:
>   http://lists.racket-lang.org/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20130722/a5e71df4/attachment.html>

Posted on the dev mailing list.