The first step says to run
The script fails because platforms/Cross/vm/sqSCCSVersion.h: doesn't exist — |
Is that the only output? — |
In reply to this post by David T Lewis
that's all the output: /CogNOS/opensmalltalk-vm (Cog)$ ./scripts/updateSCCSVersions btw the file seems to exist — |
In reply to this post by David T Lewis
what kind of shell do you use? because echo "//" >> platforms/Cross/vm/sqSCCSVersion.h should sure work — |
In reply to this post by David T Lewis
plain bash, and that line works ok. Running it with bash -x shows more info. Removing the extra ./scripts/updateSCCSVersions
— |
In reply to this post by David T Lewis
ah, did you do a git checkout or do you use a zip? — |
In reply to this post by David T Lewis
a checkout — |
In reply to this post by David T Lewis
thats very strange, because then — |
In reply to this post by David T Lewis
As this is a submodule, .git is not a directory but a file. Changing the line
to
makes the script work, but as I have no idea what this script does, I'm not sure if the change is correct — |
Hi Javier,
Ideally we would have rewritten the makefiles to do this automatically but not yet :-) Anyway, your fix looks correct. Please feel free to commit. Also you might copy my opening paragraph above ("The platforms ... meaningful commit information.") as a comment at the start of the script. Sorry for the mess. But most importantly, welcome!!! It's great to see you and Guido involved. I'm very excited. Thank you!
Eliot _,,,^..^,,,_ (phone) |
Hi Eliot, 2018-02-03 16:52 GMT+01:00 Eliot Miranda <[hidden email]>: > With many SCCS systems, including Subversion, which was used to manage the source before git, one can use a metalanguage in the source file that is recognized and replaced by commit information on each commit. Git doesn't support this (?!?!?!). Somehow I often feel the urge to defend git, please bear with me. ;-) Git does support it just the way it is done for opensmalltalk-vm: through smudge and clean filters. Actually this is much more flexible than in Svn. The "problem" is that git will not touch your files unless you tell it to: if the sqSCCSVersion.h was not modified, git will not update it just because you committed something else. Hence, you need to run additional scripts (as post-commit, post-checkout hook, or manually) to get that effect. > So we have to do it manually with this script. At least for the first time after a clone (not checkout), after which the script will have installed itself as hooks. Also you need to run the script manually again if it was changed, so the hooks are accordingly overwritten as well. Since GitHub will not run our scripts or install the filters, their effects are neither visible on the web nor in the tarballs, but see below. > Ideally we would have rewritten the makefiles to do this automatically but not yet :-) +1, usually this should happen in a configure step. But it should check that git is actually available on the build machine. (And perl, as the filters are currently implemented in perl.) For release tar and zip downloads (which would not have a git repository available to extract version info), have a look at https://git-scm.com/docs/gitattributes#_code_export_subst_code Maybe the placeholders and the filters could be updated to converge with this. For example: "Rev: $Format:%h$" "Date: $Format:%ad$" "Url: (hard-code official URL or "tarball" here. If the filter and, thus, git are available, it is overwritten)". .gitconfig [filter "rev"] smudge = set -x && perl -pe 's/\"Rev: \\$Format:[^\\$]*\\$/\"Rev: '\"$(git log -1 --format=%h)\"'/' clean = set -x && perl -pe 's/\"Rev: [0-9a-f]*/\"Rev: \\$Format:%h\\$/' .gitattributes sq*SCCSVersion.h filter=rev export-subst testing the tarball results $ git archive HEAD platforms/Cross/vm/sqSCCSVersions.h | tar xO | grep GitRawRevisionString[] The username+machine-inserting stuff in the smudge script could be moved out of the filter into the make-invoked code, so that tarball users can also benefit from it. But I guess none of this is urgent, I just wanted to dump this info for now. ;-) Best regards, Jakob |
In reply to this post by David T Lewis
Closed #209. — |
In reply to this post by David T Lewis
#213 should fix this issue. Please re-open if it doesn't. — |
In reply to this post by David T Lewis
Hi Eliot! sorry for the late answer. It seems it was overtaken by a slightly bigger issue now, but thanks for the explanation anyway. Cheers, Pocho On Sat, Feb 3, 2018 at 12:52 PM, OpenSmalltalk-Bot <[hidden email] > wrote: > Hi Javier, > > > On Feb 2, 2018, at 11:50 AM, Javier Pimas <[hidden email]> > wrote: > > > > As this is a submodule, .git is not a directory but a file. Changing the > line > > > > if [ -d `dirname $0`/../.git ]; then > > to > > > > if [ -e `dirname $0`/../.git ]; then > > makes the script work, but as I have no idea what this script does, I'm > not sure if the change is correct > > > > The platforms/Cross/vm/sqSCCSVersion.h file is supposed to contain the > information that identifies a particular commit. It stands for Source Code > Control System Version. With many SCCS systems, including Subversion, which > was used to manage the source before git, one can use a metalanguage in the > source file that is recognized and replaced by commit information on each > commit. Git doesn't support this (?!?!?!). So we have to do it manually > with this script. The script gets run automatically by the commit script > scripts/gitci, but if you do a fresh check out you'll need to run the > script to get the VM's --version command to print meaningful commit > information. > > Ideally we would have rewritten the makefiles to do this automatically but > not yet :-) > > Anyway, your fix looks correct. Please feel free to commit. Also you might > copy my opening paragraph above ("The platforms ... meaningful commit > information.") as a comment at the start of the script. > > Sorry for the mess. But most importantly, welcome!!! It's great to see you > and Guido involved. I'm very excited. Thank you! > > > Eliot _,,,^..^,,,_ (phone) > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/209#issuecomment-362825127>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AATPaVcijxg2VuLMQvIJyCQAPPxhJMioks5tRIDUgaJpZM4R3brI> > . > -- Javier Pimás Ciudad de Buenos Aires — |
Free forum by Nabble | Edit this page |