<div dir="ltr">Hi Tobias,<br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 23, 2016 at 10:55 AM, Tobias Pape <span dir="ltr">&lt;<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5"><br>
<br>
On 23.04.2016, at 19:44, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
<br>
&gt;<br>
&gt; Hi Tobias,<br>
&gt;<br>
&gt;&gt; On Apr 23, 2016, at 10:30 AM, Tobias Pape &lt;<a href="mailto:Das.Linux@gmx.de">Das.Linux@gmx.de</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt; On 23.04.2016, at 19:21, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi Fabio,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;  and the &quot;if not, why not?&quot; question is a request for information, not an expression of annoyance. Subversion tags update the source in checkin.  I remember Igor saying that he couldn&#39;t find out how to make gig do the same with version numbers (forgive me if my recollection is incorrect).  But if git doesn&#39;t support this then we need to invent some scheme that does work, for example doing two commits, one to generate a hash and another to commit a tag.  But we need sensible increment isn&#39;t version numbers, not stupid hashes.  It has to be a requirement that one can tell from the output of<br>
&gt;&gt;&gt;   myvm -version<br>
&gt;&gt;&gt;   yourvm -version<br>
&gt;&gt;&gt; whether the VMs are built from the same or different versions of the source and which one is more up-to-date, and that this depends on version number, not irrelevancies such as build date.<br>
&gt;&gt;<br>
&gt;&gt; I did such stuff like 4 years ago for self (don&#39;t ask why)<br>
&gt;&gt; I changed their whole VM build process to CMake.<br>
&gt;&gt;<br>
&gt;&gt; Here&#39;s some parts that vaguely do what you want want:<br>
&gt;&gt;<br>
&gt;&gt; This uses &quot;date&quot; to generate a vm build date (lines 12 and following)<br>
&gt;&gt; and &quot;git&quot; to extract VCS infos (lines 39 and following)<br>
&gt;&gt;   <a href="https://github.com/russellallen/self/blob/master/vm/cmake/configureVmDate.cmake.in" rel="noreferrer" target="_blank">https://github.com/russellallen/self/blob/master/vm/cmake/configureVmDate.cmake.in</a><br>
&gt;&gt; (it is namend .in because it gets configured itself from elsewhere)<br>
&gt;&gt;<br>
&gt;&gt; It is clearly possible to switch all the stuff to git and cmake and I&#39;d like to see that happen.<br>
&gt;&gt; I would love to have time for that (although it regularly makes me angry :D).<br>
&gt;&gt;<br>
&gt;&gt; Best regards<br>
&gt;&gt;   -Tobias<br>
&gt;&gt;<br>
&gt;&gt; PS: Personally (i.e. IMHO), I think that IF we go with cmake, we should follo Ians way with<br>
&gt;&gt;   probably some mix of the self vm stuff. It can really work. And it can also help us<br>
&gt;&gt;   getting things compiled on MS compilers, btw.<br>
&gt;<br>
&gt; What do you mean by &quot;Ian&#39;s way&quot; exactly?  Please describe it.<br>
&gt;<br>
&gt; Things I know:<br>
&gt; - Ian&#39;s autoconf code (platforms/unix/conf, the various additional snippets that get included when one builds the autoconf support, rather than things that get computed at build time) is extremely difficult to work with<br>
<br>
</div></div>Ian&#39;s unix conf uses CMake for a while now.<br>
There&#39;s no autoconf.<br>
Thers no platforms/unix/conf, neither in<br>
        <a href="http://www.squeakvm.org/svn/squeak/trunk/platforms/unix/" rel="noreferrer" target="_blank">http://www.squeakvm.org/svn/squeak/trunk/platforms/unix/</a><br>
nor in<br>
        <a href="https://github.com/fniephaus/squeak/tree/master/platforms/unix" rel="noreferrer" target="_blank">https://github.com/fniephaus/squeak/tree/master/platforms/unix</a></blockquote><div><br></div><div>Yes, I know.  I also know that, for example,  <a href="http://www.squeakvm.org/svn/squeak/trunk/platforms/unix/cmake/Plugins.cmake">http://www.squeakvm.org/svn/squeak/trunk/platforms/unix/cmake/Plugins.cmake</a> is /not/ easy to work with.  It is essentially impenetrable without significant thought.  I will critique fully below.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">So I&#39;m a bit confused about what you refer to.<br>
<span class=""><br>
&gt; - gmake files work with MS compilers too<br>
&gt;<br>
&gt; I am strongly in favor of gmake files.  It&#39;s /much/ easier to work with.<br>
<br>
</span>Sorry, i beg to differ.<br>
<span class=""><br>
&gt;  Please, please, please let&#39;s limit the use of cmake to generating a config file as I&#39;ve already discussed.<br>
<br>
</span>you mean gnu make?<br></blockquote><div><br></div><div>Yes.  And as examples I invite you to read, for example,</div><div><br></div><div><a href="http://www.squeakvm.org/svn/squeak/branches/Cog/">http://www.squeakvm.org/svn/squeak/branches/Cog/</a></div><div>        build.macos64x64/common/Makefile.app</div><div>        build.macos64x64/common/Makefile.app.newspeak</div><div>        build.macos64x64/common/Makefile.app.squeak.cog</div><div>        build.macos64x64/common/Makefile.flags</div><div>        build.macos64x64/common/Makefile.plugin</div><div>        build.macos64x64/common/Makefile.rules</div><div>        build.macos64x64/common/Makefile.vm</div><div><br></div>        build.macos64x64/pharo.cog.spur/Makefile<br>        build.macos64x64/squeak.cog.spur/Makefile</div>        build.macos64x64/squeak.stack.spur/Makefile</div><div class="gmail_extra"><br><div>        build.win32x86/common/Makefile</div><div>        build.win32x86/common/Makefile.plugin</div><div>        build.win32x86/common/Makefile.rules</div><div><br></div><div><br></div><div class="gmail_quote"><div>So what are the trade offs?  I&#39;ll mark cmake plusses with &#39;+&#39;, gmake advantages over cmake &#39;-&#39;.</div><div><br></div><div>+ cmake and autoconf include systems for computing a platform-specific config.h file from aplatform-independent template that identifies a platform&#39;s basic facilities, word size, available APIs, etc.  This is of value.  I&#39;ve described earlier in this thread how I want to use this, by generating a single copy of the platform-speciifc file per platform-specific build directory, where each build directory includes several distinct VMs (squeak vs pharo vs newspeak * context vs stack vs cog vs sista * v3 vs spur) and a single copy of support libraries such as Bochs, Cairo et al.</div><div><br></div><div>- cmake is second-order.  Editing the code does /not/ produce the end product.  One must run the build system, inspect the reduced makefiles and map back to the cmake input to correct errors.  This is hard.  cmake is not significantly better than autoconf in this regard.  It took me longer to modify the autoconf system to optionally compile the cogit.c file (now cogitIA32.c, cogitARM32.c et al) when adding Cog to the StackInterpreter build than it did to write the entire set of Mac OS X gnu make makefiles.</div><div><br></div><div>- cmake requires that for complex plains one both edit the cmake config files /and/ cmake Makefile includes (e.g. there are</div><div><div>        <a href="http://www.squeakvm.org/svn/squeak/trunk/platforms/unix/plugins/XDisplayControlPlugin/">http://www.squeakvm.org/svn/squeak/trunk/platforms/unix/plugins/XDisplayControlPlugin/</a></div><div>            {build.cmake,config.cmake}</div></div><div>but in the Gnu makefiles there is only ever a single Makefile that includes a more generic one.</div><div><br></div><div>- cmake duplicates effort for every build.  The Cog sources build VMs for two versions (v3 &amp; Spur) of two Smalltalk dialects (each with their own icon sets), and for Newspeak.  To be able to debug the VM effectively each VM is bolt in three forms, production, assert (asserts at -O1) and debug (asserts at -O0).  That&#39;s a /lot/ of builds, and waiting for cmake (or autoconf) to configure, and redoing it for each separate build is a waste.  The gnu makefiles are first order; they are simply used directly; no slow configure step is required</div><div><br></div><div>- AFAICT, there is no support for /any/ build dependency information in the cmake sources (this is information on which C files include which headers, or other C files, which is essential in enabling fast builds when developing the VM).  The Gnu Makefiles I&#39;ve written, following well-documented established patterns, maintains dependency information and shares it between production,assert and debug builds.</div><div><br></div><div>- cmake offers no solution to the problem of building support libraries; neither does gnu make.  But in my build layout there is a simple convention for multi-platform builds, and for sharing a single copy of each support library between all builds for that platform, i.e.</div><div>    <a href="http://www.squeakvm.org/svn/squeak/branches/Cog/">http://www.squeakvm.org/svn/squeak/branches/Cog/</a></div><div>        build.linux32ARM</div><div>        build.linux64x64</div><div>        build.macos64x64</div><div>        build.linux32x86</div><div>        build.macos32x86</div><div>        build.win32x86</div><div>and e.g. bochsx64 and bochsx86 within those directories.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
        :/<br>
<br>
However, its saturday evening, I don&#39;t like to argue at that time.<br>
Maybe I&#39;ll find some time next week to make a write up :)</blockquote><div><br></div><div>OK, but please address my points above, and please realise that my preferred approach is based on hard experience; I&#39;m not choosing gnu makefiles because of nostalgia or familiarity. I chose them because they&#39;re much more productive, apart from cake and autoconf&#39;s one advantage, generating a platform-specific config.h.  And that I&#39;d like to steal.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Best<br>
<span class=""><font color="#888888">        -Tobias<br>
</font></span><div class=""><div class="h5"><br>
<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _,,,^..^,,,_ (phone)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On Apr 23, 2016, at 9:54 AM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Hi Fabio,<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; On Apr 23, 2016, at 9:40 AM, Fabio Niephaus &lt;<a href="mailto:lists@fniephaus.com">lists@fniephaus.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Hi all,<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Bert already mentioned that I&#39;ve been working on migrating the repository from SVN to Git.<br>
&gt;&gt;&gt;&gt;&gt; I believe there are three problems that need to be solved here:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; 1. Migrating SVN externals for sharing code between branches<br>
&gt;&gt;&gt;&gt;&gt; This is currently used to share a few directories (e.g. platforms/Cross/plugins) across different<br>
&gt;&gt;&gt;&gt;&gt; branches. But Git does no support this kind of code sharing. Instead, it supports submodules [1]<br>
&gt;&gt;&gt;&gt;&gt; and subtrees [2]. I would suggest to move code that we want to share into separate Git<br>
&gt;&gt;&gt;&gt;&gt; repositories and include them as submodules. I think submodules are easier to understand<br>
&gt;&gt;&gt;&gt;&gt; (GitHub integrates them nicely in their UI). The only drawback: if someone updates code in a<br>
&gt;&gt;&gt;&gt;&gt; shared repository, one needs to update all references to this repository as well. But I&#39;d say this<br>
&gt;&gt;&gt;&gt;&gt; is also a good thing: if someone changes e.g. a plugin and the change is compatible to Cog,<br>
&gt;&gt;&gt;&gt;&gt; but incompatible to the interpreter vm, then the interpreter branch is not automatically broken<br>
&gt;&gt;&gt;&gt;&gt; as soon as one pushes the plugin change. If the above is unclear, I&#39;m happy to explain<br>
&gt;&gt;&gt;&gt;&gt; submodules in more detail.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; 2. Versioning and new releases<br>
&gt;&gt;&gt;&gt;&gt; If we migrate to Git, I&#39;d recommend to deprecate the way we do versioning in SVN. Instead, we<br>
&gt;&gt;&gt;&gt;&gt; should use Git commit hashes and Git tags.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; But have you modified platforms/Cross/vm/sqSCCSVersion.h to capture this information?  If so, can you please send me the code so I can integrate it?  If not, why not?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Let&#39;s say we want to release a new version, we tag<br>
&gt;&gt;&gt;&gt;&gt; the commit of interest with e.g. v1.0.0. When building the Cog VM on this tag, the version will be<br>
&gt;&gt;&gt;&gt;&gt; v1.0.0. If we use GitHub, we might as well use a CI service such as Travis CI [3] to automate the<br>
&gt;&gt;&gt;&gt;&gt; build process. That means, each time someone pushes changes to GitHub, Travis CI will build a<br>
&gt;&gt;&gt;&gt;&gt; new Cog VM (we can call this &quot;bleeding edge&quot;). Let&#39;s say I push changes right after the release<br>
&gt;&gt;&gt;&gt;&gt; of v1.0.0, the version for the next build will be something like v1.0.0-37553a9 with &quot;37553a9&quot;<br>
&gt;&gt;&gt;&gt;&gt; being the short SHA1 identifying my latest commit. If we want to release e.g. v1.1.0, we just tag<br>
&gt;&gt;&gt;&gt;&gt; a newer commit and GitHub/Travis CI does the rest for us. I already have this working, you can<br>
&gt;&gt;&gt;&gt;&gt; find a Travis build at [4] and the result at [5]. Obviously, we can push the binaries to a different<br>
&gt;&gt;&gt;&gt;&gt; server.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; 3. Keeping a copy of the code<br>
&gt;&gt;&gt;&gt;&gt; We of course want to keep a copy of our code at all times in case something happens with<br>
&gt;&gt;&gt;&gt;&gt; GitHub. There are already tools that we can use to automate this. However, I wouldn&#39;t try to keep<br>
&gt;&gt;&gt;&gt;&gt; the old SVN repository in sync. I believe this might be quite difficult and I don&#39;t see a reason to<br>
&gt;&gt;&gt;&gt;&gt; maintain something we want to deprecate in the first place. Anyway, it should be fairly easy to<br>
&gt;&gt;&gt;&gt;&gt; set up a tool that creates a backup on one of our servers whenever we change code on GitHub.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Doing a migration from SVN to Git(Hub) takes a few hours and I&#39;d recommend we stop pushing<br>
&gt;&gt;&gt;&gt;&gt; code to the SVN as soon as we start to migrate. This obviously requires everyone working with<br>
&gt;&gt;&gt;&gt;&gt; the code base to switch to Git. So please let me know if everyone is comfortable with the<br>
&gt;&gt;&gt;&gt;&gt; migration. If we want to do this next week, I&#39;d recommend to do it on a Thursday or a Friday,<br>
&gt;&gt;&gt;&gt;&gt; because I would be able to do it with Bert sitting two rooms next to me :)<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I&#39;m not happy to migrate until there&#39;s a functional subversion bridge that works and doesn&#39;t break my builds.  Cadence pays for my time (and hence pays for a lot of the VM development we enjoy) and its builds use Jenkins and subversion and I will not cooperate with any effort that sabotages this.  &quot;Next Thursday&quot; doesn&#39;t appear to appreciate the constraints.  This has to be done carefully or I will not cooperate.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; I hope I have thought about the important things and I&#39;m happy to answer any questions you<br>
&gt;&gt;&gt;&gt;&gt; might have.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Best,<br>
&gt;&gt;&gt;&gt;&gt; Fabio<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; [1] <a href="https://git-scm.com/book/en/v2/Git-Tools-Submodules" rel="noreferrer" target="_blank">https://git-scm.com/book/en/v2/Git-Tools-Submodules</a><br>
&gt;&gt;&gt;&gt;&gt; [2] <a href="http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/" rel="noreferrer" target="_blank">http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/</a><br>
&gt;&gt;&gt;&gt;&gt; [3] <a href="http://travis-ci.org" rel="noreferrer" target="_blank">http://travis-ci.org</a><br>
&gt;&gt;&gt;&gt;&gt; [4] <a href="https://travis-ci.org/fniephaus/squeak/builds/119507180" rel="noreferrer" target="_blank">https://travis-ci.org/fniephaus/squeak/builds/119507180</a><br>
&gt;&gt;&gt;&gt;&gt; [5] <a href="https://www.hpi.uni-potsdam.de/hirschfeld/artefacts/cog/v0.1.0/" rel="noreferrer" target="_blank">https://www.hpi.uni-potsdam.de/hirschfeld/artefacts/cog/v0.1.0/</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; On Sat, Apr 23, 2016 at 5:10 PM David T. Lewis &lt;<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; On Sat, Apr 23, 2016 at 02:22:29PM +0200, Nicolas Cellier wrote:<br>
&gt;&gt;&gt;&gt;&gt;<br>
</div></div><div class=""><div class="h5">&gt;&gt;&gt;&gt;&gt; I have to admit that I did not even know that an active git svn bridge<br>
&gt;&gt;&gt;&gt;&gt; was possible. It sounds like this it might be very helpful.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; It would be great to have the advantages of git for development, and<br>
&gt;&gt;&gt;&gt;&gt; it could also be helpful to be able to have the <a href="http://squeakvm.org" rel="noreferrer" target="_blank">squeakvm.org</a> repo updated<br>
&gt;&gt;&gt;&gt;&gt; periodically from git. There are portions of the platforms tree that Eliot<br>
&gt;&gt;&gt;&gt;&gt; has been able to make identical for oscog and trunk, and this seems like<br>
&gt;&gt;&gt;&gt;&gt; a worthwhile effort to continue.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Another possible advantage is that Ian&#39;s cmake build process takes advantage<br>
&gt;&gt;&gt;&gt;&gt; of the SVN revision numbering, and it would be good to make sure this stays<br>
&gt;&gt;&gt;&gt;&gt; healthy as development proceeds (it&#39;s a lot nicer than autotools).<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Eliot, do you have a view on this?<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Dave<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; _,,,^..^,,,_ (phone)<br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>