Discussion:
[racket] Portability of .zo files
Gustavo Massaccesi
2015-03-14 19:20:09 UTC
Permalink
(I'm playing with some optimizations, so this is a theoretical
question to understand some parts of the Racket implementation, not a
real life problem.)

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

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

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

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

Gustavo
____________________
Racket Users list:
http://lists.racket-lang.org/users
Matthew Flatt
2015-03-14 20:49:54 UTC
Permalink
Post by Gustavo Massaccesi
Can I move a .zo file from a machine that has extflonum enabled to a
machine that has extflonum disabled?
Yes.
Post by Gustavo Massaccesi
Can I move a .zo file from a machine that has extflonum disabled to a
machine that has extflonum enabled?
Yes.
Post by Gustavo Massaccesi
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.
Post by Gustavo Massaccesi
(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?

____________________
Racket Users list:
http://lists.racket-lang.org/users

Loading...