[M3devel] propose "output root" to replace shipping

Jay K jay.krell at cornell.edu
Tue Mar 24 09:19:06 CET 2015


The point is, kind of to make it better, by making it worse.
Or worse by making it better.
 
 
In particular, "ship" would go away.
Files would always be overwritten right away.
 
 
If you don't want this -- and indeed sometimes you don't, you
would change the output root to a new empty/nonexistent directory,
possibly copying all of the previous into the new.
 
 
 
cm3 and its dependencies would require special attention.
In particular, for sharing violations on .dlls, we'd rename away and copy back.
Does that then work on all systems? It works on NT.
I'm betting most Posix systems "just work" and AIX requires either the same as NT
or can't be made to work so easily.
 
 
If the outputs are bad, you would have to restore from backup, for things like cm3/m3core/libm3 (and
basically just them). For anything not used by cm3, just edit the source and recompile again.
 
 
You could view this as taking away an escape hatch.
But a simpler easier to understand escape hatch remains.
 
 
And the escape hatch is really only critical for cm3 and its dependents.
Or "build tools" maybe more generally, like klex, kyacc, m3bundle.
 
 
Is this still the mailing list to use, or something new with git?
 
 
Now -- another use of "ship" is "install" not on the same machine as compile.
For this, I propose, just un-tar-gz or unzip instead, or recursive copy if not archived.
 
 
A background point here is -- have fewer different directory layouts.
Instead of ship rearranging stuff, just arrange stuff when you link in the first place.
 
 
This would also argue that the source tree and install tree should be more-similar/identical
except for the root, but I'm reluctant to rearrange the source..even to lift up the "src"
leaves by one, in order to keep the tree diffable against old trees.
 
 
 - Jay


 
> Date: Sun, 22 Mar 2015 11:57:35 -0500
> From: rodney_bates at lcwb.coop
> To: m3devel at elegosoft.com
> Subject: Re: [M3devel] propose "output root" to replace shipping
> 
> I haven't had time to digest your proposal yet, but I have often been uncomfortable
> about the current build system when building/bootstrapping itself.  It is probably
> just lack of understanding of the right procedure, but I usually cringe before attempting
> to bootstrap.  I have always been unclear about the sequence of when the newly built
> components overlay the preexisting ones, so I would welcome some attention to this.
> 
> I would like to put in a vote for a way to build everything without overlaying
> any existing components, so a bootstrapping operation can be easily restarted back
> where it started.  Right now, for the compiler itself, I am meticulously saving side
> copies of the compiler executables in /usr/local/cm3/bin every time.
> 
> On 03/20/2015 07:10 PM, Jay K wrote:
> >   Building the current system fails in caltech-parser\parserlib\parserlib\test.
> >
> >
> >
> >   It tries to run an shipped klex but only the non-shipped one exist -- depending on the state of things.
> >   But even if shipped exists, it likely shouldn't be using it.
> >
> >
> >
> >   This is a general problem we have been through somewhat before.
> >
> >
> >
> >   There are multiple parts to our current partial solution:
> >
> >
> >   They can be seen here:
> >    C:\dev2\cm3\m3-comm\netobj\src\netobj-ov.tmpl
> >    C:\dev2\cm3\m3-comm\sharedobj\src\sharedobj-ov.tmpl
> >    C:\dev2\cm3\m3-libs\libm3\src\bundleintf\bundle-ov.tmpl
> >    C:\dev2\cm3\m3-ui\zeus\src\m3zume-ov.tmpl
> >
> >
> >   And those various "build tools" use build_standalone()
> >
> >
> >   This could imho be abstracted.
> >
> >
> >   However, I propose where today we have:
> >      source_root/m3-foo/bar/target/abc.obj
> >      source_root/m3-foo/bar/target/bar.exe
> >      source_root/m3-foo/bar/src/abc.m3
> >
> >
> >    we instead have:
> >       output_root/obj/bar/target/abc.obj
> >       output_root/bin/target/bar.exe
> >       output_root/bin/bar.exe link or stub to target/abc.exe
> >       output_root/pkg/bar/...
> >
> >
> >   or:
> >       output_root_obj/bar/target/abc.obj
> >       output_root_install/bin/target/bar.exe
> >       output_root_install/bin/bar.exe link or stub to target/abc.exe
> >       output_root_install/pkg/bar/...
> >
> >
> >   and that "install" become just directory operations, like deleting old and move or copy output_root{_install} to it
> >   just "script", not anything in cm3,
> >
> >
> >   and then, on systems that support "origin" -- NT, Linux, Solaris, FreeBSD, NetBSD >= 5.0, we don't
> >   use standalone for this, and on systems that don't support "origin", still use standalone
> >
> >
> >   and then shipping goes away, as a package operation.
> >   you can instead ship an output root.
> >
> >
> >   and then this override stuff goes away also;
> >   You bootstrap by copying in a few working files. Like make-dist.py does.
> >   The system is reduced in size, as build_standalone falls away -- you can still use it,
> >   but it won't be used usually.
> >
> >
> >   The larger source tree would become readonly, as it should be.
> >
> >
> >   Thoughts?
> >
> >
> >   I believe Modula-3 was originally ahead of its time in having the readonly src directories,
> >   but I believe time as passed it by, and what one really wants is a larger readonly tree of src directories/packages -- which
> >   might as well not say "src", but preserve that instead of rearranging everything.
> >
> >
> >   I know, I've heard, having the separate buildlocal / buildglobal is useful.
> >   This doesn't elimine it that.
> >   It replaces it with "multiple buildglobal".
> >   Instead of having just the two options -- local and global -- you can create an arbitrary number of
> >   "global" scopes by creating a new output_root, copying it from a preexisting one.
> >
> >
> >   As well, it is obscure, but you can also have "multiple local" by changing BUILD_DIR.
> >   But I don't think anyone does that. I think everyone leaves BUILD_DIR == TARGET.
> >
> >
> >   This has several nice properties.
> >   readonly source tree
> >   less file copying possibly (depending on if final scripted ship is directory copy or move)
> >   cm3 can stop implementing ship
> >   no need to use build_standalone on most systems, including for cm3 itself (but it still works)
> >
> >
> >
> >   - Jay
> 
> -- 
> Rodney Bates
> rodney.m.bates at acm.org
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20150324/a2249c5d/attachment-0002.html>


More information about the M3devel mailing list