Wow, cool! What exciting times we live in! :)<div><br></div><div>Robby<span></span><br><br>On Tuesday, June 4, 2013, Matthew Flatt wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<a class="LargeFriendlyLetters" href="#end"><br>
DON'T PANIC<br>
</a><br>
<br>
I've pushed a new version of the package experiment:<br>
<br>
<a href="https://github.com/mflatt/racket/tree/pkg" target="_blank">https://github.com/mflatt/racket/tree/pkg</a><br>
<br>
You won't see much difference in terms of package splitting. I haven't<br>
even renamed "-docs" packages to "-doc" packages, yet.<br>
<br>
This new version is about creating installers. Normally, the creation<br>
of installers is not of much interest to this list, but one of the<br>
ideas behind the package system is that it should be easy to build a<br>
Racket distribution by combining the core with a selected set of<br>
packages. I think the details of that process both inform and<br>
illustrate details about the package system.<br>
<br>
<br>
Here are some installers that I built based on the "drracket" package<br>
(includes DrRacket, doesn't include teaching languages, etc.):<br>
<br>
<a href="http://www.cs.utah.edu/~mflatt/tmp/installers/" target="_blank">http://www.cs.utah.edu/~mflatt/tmp/installers/</a><br>
<br>
There are still some issues to sort out --- including a missing<br>
"README.txt" and a missing rule to auto-launch "DrRacket.exe" from the<br>
Windows installer --- but I think the installers are close to right.<br>
<br>
<br>
You can build installers yourself, as long as you have a machine for<br>
each platform where you want an installer. One machine builds the<br>
packages from source (much like the current build process) and then<br>
acts as a server. All machines act as clients to build<br>
platform-specific installers. Each client build is relatively fast<br>
(about 5 minutes): build the core, then download and install pre-built<br>
packages.<br>
<br>
See "INSTALL.txt" and "Makefile" for more information, but the process<br>
boils down to this:<br>
<br>
1. On the server machine:<br>
make server PKGS="..."<br>
<br>
2. On each client machine:<br>
make client SERVER=... PKGS="..."<br>
or (on Windows)<br>
nmake win32-client SERVER=... PKGS="..."<br>
<br>
<br>
One thing the Makefile illustrates is how to get going from scratch at<br>
the level of Racket sources. Native libraries, such as Cairo, have to<br>
be built and available already, but the process to turn those into<br>
packages is part of the Makefile. The process of consing up a package<br>
catalog from local package directories is also part of the Makefile.<br>
<br>
More precisely, all of that happens with the default "local" mode of<br>
the Makefile. You can set `SRC_CATALOG' to a URL for a catalog server,<br>
and then packages are drawn from that catalog instead of local sources.<br>
A non-"local" `SRC_CATALOG' will be a better default after we set up a<br>
catalog server for all of the base packages, where each entry in the<br>
catalog will point to a GitHub repository.<br>
<br>
Either way, after a catalog of source packages is available, then the<br>
package system is used to create "built" packages (source plus bytecode<br>
and docs). Finally, a new catalog is created for the built packages so<br>
that they can be served to installer builds.<br>
<br>
<br>
The Makefile includes `binary-catalog' and `binary-catalog-server'<br>
targets that create and serve a catalog of binary packages. It doesn't<br>
yet work to create installers from binary packages; the first issue is<br>
that `raco setup' wants "installer.rkt" files to exist in source form,<br>
and there are likely a dozen other little problems. I've left<br>
`binary-catalog-server' in place, though, to illustrate how things are<br>
supposed to work for binary packages: binary packages are extracted<br>
automatically from built packages, and creating a binary build is just<br>
a matter of using binary packages.<br>
<br>
<br>
If you're inclined to look closely at the generated installers or at<br>
the "pkg" branch, you'll see that I made some directory-structure<br>
changes inside the "racket". Most notably, "collects" moved inside<br>
"lib", while configuration items moved from "collects" and "lib" into<br>
"etc". The idea behind moving "collects" to "lib" is to put it next to<br>
"pkgs" and in a more consistent place with respect to Unix conventions.<br>
The move of configuration information to "etc" is also to be more<br>
consistent with Unix conventions, but also to get platform- or<br>
installation-specific information out of "collects", which simplifies<br>
installer creation. All of that is up for discussion, of course.<br>
<br>
<a name="end"/><br>
<br>
I know this all looks complex, the tools are still rough, and we still<br>
have many things about the package system to explain and discuss. I<br>
think we're on the path to a place that will work well, though.<br>
<br>
I also think the way to get there is to iterate on the whole path ---<br>
from the simplest `raco pkg' command to the full snapshot and release<br>
process. So, if some earlier step seems terribly wrong to you, rest<br>
assured that an experiment in installer builds doesn't mean that we've<br>
committed to all previous steps and there's no going back. It only<br>
means that we're taking a bunch of steps ahead to make sure that we<br>
know where we're going.<br>
<br>
_________________________<br>
Racket Developers list:<br>
<a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
</blockquote></div>