[racket] Portability of .zo files

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat Mar 14 16:49:54 EDT 2015

At Sat, 14 Mar 2015 16:20:09 -0300, Gustavo Massaccesi wrote:
> Can I move a .zo file from a machine that has extflonum enabled to a
> machine that has extflonum disabled?

Yes.

> Can I move a .zo file from a machine that has extflonum disabled to a
> machine that has extflonum enabled?

Yes.

> More generally, when is it possible to copy .zo files form a computer
> to another computer, and expect that it will work fine?

Configuration details (extflonmun support, word size, whether places or
futures are enabled, etc.) should never interfere with ".zo" file
portability.


> (I had problems with some absolute paths before, so I try to not copy
> .zo files.)

Paths can indeed create problems, but the bytecode format and compiler
normally avoid them. 

A macro could expand to introduce an absolute path, but syntactic forms
from `racket` shouldn't do that (unless there's a bug). For example, as
long as a source file doesn't include `file` paths, `require` will not
create absolute paths in bytecode output.

Serialization can create absolute-path references, even from
relative-path references, but only when the serializing program is
started from a filesystem path (as opposed to a collection-based path).

It's possible that I've forgotten some catch other than serialization,
though. Can you say more about the situation where absolute paths
showed up?


Posted on the users mailing list.