Is there a function to find and update all compiled directories?

47 views
Skip to first unread message

infodeveloperdon

unread,
Nov 1, 2020, 6:43:32 PM11/1/20
to Racket Users
I've never had problems with the .zo files being auto-created during development, only when update the Racket version because of course then a new compiler is involved. If I am remembering correctly, any time I've had issues with the compiled files, I've resolved them by deleting the compiled directory identified by the error message. Which only makes me wonder if there is some function I am unaware of that will update compiled directories without needing to specify the path to each one, or find and delete them all (Racket recreates them).

Shu-Hung You

unread,
Nov 1, 2020, 6:50:52 PM11/1/20
to infodeveloperdon, Racket Users
Using the command-line instruction `raco setup` will update all
obsolete bytecodes. If you are looking for a programmable interface,
`compiler/cm` is a good starting point.

On Sun, Nov 1, 2020 at 5:43 PM infodeveloperdon
<infodeve...@gmail.com> wrote:
>
> I've never had problems with the .zo files being auto-created during development, only when update the Racket version because of course then a new compiler is involved. If I am remembering correctly, any time I've had issues with the compiled files, I've resolved them by deleting the compiled directory identified by the error message. Which only makes me wonder if there is some function I am unaware of that will update compiled directories without needing to specify the path to each one, or find and delete them all (Racket recreates them).
>
> --
> 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/1169e7cf-80b2-4093-b3be-f9253993188cn%40googlegroups.com.

George Neuner

unread,
Nov 1, 2020, 9:11:20 PM11/1/20
to racket...@googlegroups.com

On 11/1/2020 6:50 PM, Shu-Hung You wrote:
> Using the command-line instruction `raco setup` will update all
> obsolete bytecodes. If you are looking for a programmable interface,
> `compiler/cm` is a good starting point.

Note that "raco setup" rebuilds *only* Racket's own modules and
installed extra packages - it does not rebuild any programmer code.

George

Sam Tobin-Hochstadt

unread,
Nov 1, 2020, 9:20:41 PM11/1/20
to George Neuner, Racket Users
`raco setup` rebuilds all collections, including all installed or linked packages. This includes "programmer code" if you make it a package or collection, which is usually a good idea for anything long lived. 

Sam

George Neuner

unread,
Nov 1, 2020, 10:07:57 PM11/1/20
to Sam Tobin-Hochstadt, Racket Users
In general I agree with you (although making packages out of everything complicates migrations to new Racket versions).   However what I said previously is correct:  "raco setup" only rebuilds stuff that is directly under Racket's control  (installed packages or collections). 

It is not guaranteed to rebuild every Racket based program on your system ... and that is what I intended to convey.

George

infodeveloperdon

unread,
Nov 2, 2020, 12:48:32 PM11/2/20
to Racket Users
Thanks for all the wonderful feedback!  The 'raco setup' function worked beautifully for me resolving my issues.
Running raco setup without arguments did bring my system to it's knees, i.e., slowing it down to a snail's pace but after a reboot all seems to be well.
Based on the displayed feedback, I saw that it did a lot of work.
Would there be less work for 'raco setup' if I uninstalled all but the current and previous versions of Racket?
Reply all
Reply to author
Forward
0 new messages