Marc Kaufmann writes:

> So the easiest to do is to create such an info.rkt file and call `raco pkg
> install app-name/` -- and that should work even if I don't do the `raco
> exe` and `raco distribute`?

Yes, that's right.  `raco exe' and `raco distribute' are not required.

I realize now that I should've mentioned a couple caveats to treating
apps as packages like this.  I often need to tell Racket to recompile my
package after I make certain changes because the interpreter doesn't try
to recompile stale dependent modules of changed modules on the fly (if
`a.rkt' depends on `b.rkt' and you change `b.rkt', without recompiling
`a.rkt', the interpreter won't do it for you).  This means you can run
into errors along the lines of "instantiate-linket: mismatch".  When
that happens, you can either remove all the compiled bytecode from your
project

    $ find app-name-here/ -type d -name compiled -exec rm -rf \{\} \;

or tell Racket to recompile all the modules in your package's collection

    $ raco setup --avoid-main --tidy --check-pkg-deps --unused-pkg-deps 
app-name-here

I usually do the latter, because large projects can take a very long
time to compile/load from scratch.  That said, that also comes with its
own downside in the form of worse error reporting.  `errortrace' can no
longer peer into the source code since it's been compiled which leads to
some pretty terse error reports.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/m2lfuo8slm.fsf%40192.168.0.139.

Reply via email to