After installing new racket version it seems that I need to find and delete all 'compiled' dirs...

49 views
Skip to first unread message

infodeveloperdon

unread,
Nov 1, 2020, 11:34:23 AM11/1/20
to Racket Users
so that when I run Racket it recreates the 'compiled' directories using the latest compiler.
Or is there a better way?

George Neuner

unread,
Nov 1, 2020, 4:27:57 PM11/1/20
to racket...@googlegroups.com
Yeah ... don't use 'compiled' directories for development - they can get
out of sync and screw up your debugging.

They really are only useful for performance testing or for deployment in
situations where you don't want to (or can't) build a single executable.

George

infodeveloperdon

unread,
Nov 1, 2020, 4:37:40 PM11/1/20
to Racket Users
How do I avoid the auto-creation of the 'compiled' directory which currently occurs every time I create a module?  Don

Robby Findler

unread,
Nov 1, 2020, 4:46:03 PM11/1/20
to George Neuner, Racket Users
It is true that running just "racket x.rkt" will not notice some situations where your .zo files are wrong and thus lead to the bad behavior George describes below but I find it quite handy to use .zo files during development, as they can speed things up considerably depending on what's happening in your application. If you are working at the command line and using something like "racket x.rkt" to run your program, then changing to "raco make x.rkt && racket x.rkt" will keep your .zo files all sync'd up.

Robby


--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/b83b03b4-f2a8-2b6c-7ac8-00caa1e6d104%40comcast.net.

George Neuner

unread,
Nov 1, 2020, 5:12:27 PM11/1/20
to Robby Findler, Racket Users

On 11/1/2020 4:45 PM, Robby Findler wrote:
> It is true that running just "racket x.rkt" will not notice some
> situations where your .zo files are wrong and thus lead to the bad
> behavior George describes below but I find it quite handy to use .zo
> files during development, as they can speed things up considerably
> depending on what's happening in your application. If you are working
> at the command line and using something like "racket x.rkt" to run
> your program, then changing to "raco make x.rkt && racket x.rkt" will
> keep your .zo files all sync'd up.

Dunno ... too many times debugging in DrRacket I've run into situations
where having .zo files screwed up tracing calls across modules in
different source files.

In Racket's defense, I will say I haven't tried to do it with any recent
versions ... my machines have always been fast, and (other than for
performance testing or deployments) I gave up on caching .zo files a
long time ago.

George

Robby Findler

unread,
Nov 1, 2020, 5:44:30 PM11/1/20
to George Neuner, Racket Users
On Sun, Nov 1, 2020 at 4:12 PM George Neuner <gneu...@comcast.net> wrote:

On 11/1/2020 4:45 PM, Robby Findler wrote:
> It is true that running just "racket x.rkt" will not notice some
> situations where your .zo files are wrong and thus lead to the bad
> behavior George describes below but I find it quite handy to use .zo
> files during development, as they can speed things up considerably
> depending on what's happening in your application. If you are working
> at the command line and using something like "racket x.rkt" to run
> your program, then changing to "raco make x.rkt && racket x.rkt" will
> keep your .zo files all sync'd up.

Dunno ... too many times debugging in DrRacket I've run into situations
where having .zo files screwed up tracing calls across modules in
different source files.

I'm not sure it would affect tracing but there definitely is a bug in DrRacket where it manages the .zo files for you, but in certain situations it will screw them up :( That's a problem I've long had on my list.

Robby
 
 

George Neuner

unread,
Nov 1, 2020, 5:45:13 PM11/1/20
to racket...@googlegroups.com
On 11/1/2020 4:37 PM, infodeveloperdon wrote:
> How do I avoid the auto-creation of the 'compiled' directory which
> currently occurs every time I create a module?

If you're using DrRacket, it's an option:  under "Language -> Choose
Language ..."

Select the Racket language and press "Show Details" at the bottom of the
dialog.  The dialog will expand to show more options at the right, one
of which is "populate 'compiled' directories".  If you turn that off,
DrRacket won't create and cache .zo files for your source files.  [You
still need to delete any that already exist.]


If you are using a different editor, then don't try to build your
program using "raco"[1].  You can execute your program from the command
line with "racket <your_main_code_file>"  but you have to rely on
logging or "print" style debugging.  As your programs get more complex,
you may also find some racket's command line options[2] to be useful.

George

[1] https://docs.racket-lang.org/raco/make.html
[2] https://docs.racket-lang.org/reference/running-sa.html

Reply all
Reply to author
Forward
0 new messages