Re: shepherd a patch?
Hi David, I feel responsible for this because I know where this is coming from ;-) You can send me the patch. However, it's a long time since I uploaded anything, so I'm not sure my set-up still works. But I'll try. Best Urs Am 15.11.19 um 04:10 schrieb David Nalesnik: Hi all, I have a patch which implements measure-attached spanners. I am having a devil of a time getting the patch up for review. I simply can't get git-cl to upload it. (I suspect this has something to do with the number of files it touches--my system times out before everything can be uploaded.) Would someone be willing to shepherd the patch for me? Attached is a PNG which shows the output of one of the regtests. This would _really_ be appreciated. Thanks! David
Re: problems with SSH key
>> > [dev@lilydev:lilypond-git]$ git fsck >> > Segmentation faultrectories: 45% (116/256) >> >> Ouch. I've never experienced such a thing with git. Maybe >> something is broken with your installation? Does removing and >> installing again help? > > Do you mean removing git itself? I'd like to be able to get back to > the work I just did, if at all possible. Yes, I meant removing git and re-installing it – git is quite a stable program, and up to now I have never seen a segfault. Fortunately, you could solve the problem, so please ignore me. Werner
shepherd a patch?
Hi all, I have a patch which implements measure-attached spanners. I am having a devil of a time getting the patch up for review. I simply can't get git-cl to upload it. (I suspect this has something to do with the number of files it touches--my system times out before everything can be uploaded.) Would someone be willing to shepherd the patch for me? Attached is a PNG which shows the output of one of the regtests. This would _really_ be appreciated. Thanks! David
Re: git-cl command not found
On Thu, Nov 14, 2019 at 7:05 PM David Kastrup wrote: > > David Nalesnik writes: > > > Trying to get git-cl going I run into an interesting problem. I've > > installed LilyDev, so I should have git-cl. > > > > I update: > > [dev@lilydev:lilypond-git]$ cd ~/git-cl/ > > [dev@lilydev:git-cl]$ git pull > > remote: Enumerating objects: 4, done. > > remote: Counting objects: 100% (4/4), done. > > remote: Compressing objects: 100% (2/2), done. > > remote: Total 4 (delta 2), reused 3 (delta 2), pack-reused 0 > > Unpacking objects: 100% (4/4), done. > > From git://github.com/gperciva/git-cl > >9511426..1994c03 master -> origin/master > > Updating 9511426..1994c03 > > Fast-forward > > allura_issues.py | 15 --- > > 1 file changed, 8 insertions(+), 7 deletions(-) > > > > > > Make sure ca-certificates is there: > > > > [dev@lilydev:~]$ apt --installed list | grep ca-certificates > > > > WARNING: apt does not have a stable CLI interface. Use with caution in > > scripts. > > > > ca-certificates/oldstable,oldstable,now 20161130+nmu1+deb9u1 all [installed] > > > > But then I can't use git-cl: > > > > [dev@lilydev:~]$ cd $LILYPOND_GIT > > [dev@lilydev:lilypond-git]$ git-cl config > > bash: git-cl: command not found > > > > > > What am I doing wrong? > > It's not in your PATH ? > Ah yes. Duh. Didn't think to check b/c I figured this would just work out of the box. Thanks...
Re: git-cl command not found
David Nalesnik writes: > Trying to get git-cl going I run into an interesting problem. I've > installed LilyDev, so I should have git-cl. > > I update: > [dev@lilydev:lilypond-git]$ cd ~/git-cl/ > [dev@lilydev:git-cl]$ git pull > remote: Enumerating objects: 4, done. > remote: Counting objects: 100% (4/4), done. > remote: Compressing objects: 100% (2/2), done. > remote: Total 4 (delta 2), reused 3 (delta 2), pack-reused 0 > Unpacking objects: 100% (4/4), done. > From git://github.com/gperciva/git-cl >9511426..1994c03 master -> origin/master > Updating 9511426..1994c03 > Fast-forward > allura_issues.py | 15 --- > 1 file changed, 8 insertions(+), 7 deletions(-) > > > Make sure ca-certificates is there: > > [dev@lilydev:~]$ apt --installed list | grep ca-certificates > > WARNING: apt does not have a stable CLI interface. Use with caution in > scripts. > > ca-certificates/oldstable,oldstable,now 20161130+nmu1+deb9u1 all [installed] > > But then I can't use git-cl: > > [dev@lilydev:~]$ cd $LILYPOND_GIT > [dev@lilydev:lilypond-git]$ git-cl config > bash: git-cl: command not found > > > What am I doing wrong? It's not in your PATH ? -- David Kastrup
git-cl command not found
Trying to get git-cl going I run into an interesting problem. I've installed LilyDev, so I should have git-cl. I update: [dev@lilydev:lilypond-git]$ cd ~/git-cl/ [dev@lilydev:git-cl]$ git pull remote: Enumerating objects: 4, done. remote: Counting objects: 100% (4/4), done. remote: Compressing objects: 100% (2/2), done. remote: Total 4 (delta 2), reused 3 (delta 2), pack-reused 0 Unpacking objects: 100% (4/4), done. >From git://github.com/gperciva/git-cl 9511426..1994c03 master -> origin/master Updating 9511426..1994c03 Fast-forward allura_issues.py | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) Make sure ca-certificates is there: [dev@lilydev:~]$ apt --installed list | grep ca-certificates WARNING: apt does not have a stable CLI interface. Use with caution in scripts. ca-certificates/oldstable,oldstable,now 20161130+nmu1+deb9u1 all [installed] But then I can't use git-cl: [dev@lilydev:~]$ cd $LILYPOND_GIT [dev@lilydev:lilypond-git]$ git-cl config bash: git-cl: command not found What am I doing wrong? Thanks! David
Re: problems with SSH key
On Thu, Nov 14, 2019 at 9:58 PM David Nalesnik wrote: > > On Thu, Nov 14, 2019 at 9:49 PM Werner LEMBERG wrote: > > > > > > >> There is git-fsck . > > >> > > > > > > [dev@lilydev:lilypond-git]$ git fsck > > > Segmentation faultrectories: 45% (116/256) > > > > Ouch. I've never experienced such a thing with git. Maybe something > > is broken with your installation? Does removing and installing again > > help? > > > > > > Werner > > Do you mean removing git itself? I'd like to be able to get back to > the work I just did, if at all possible. > > I deleted the empty object that git commands complained about, and now > git fsck works. > > I get this output > : > [dev@lilydev:lilypond-git]$ git fsck > Checking object directories: 100% (256/256), done. > Checking objects: 100% (402883/402883), done. > error: HEAD: invalid sha1 pointer 76008183503d70d4b37a73f19e60c2438112a5a8 > error: refs/heads/dev/measure_spanner: invalid sha1 pointer > 76008183503d70d4b37a73f19e60c2438112a5a8 > Checking connectivity: 401781, done. > > (dev/measure_spanner is the name of my branch) > > By the way, git reflog gives me this: > > [dev@lilydev:lilypond-git]$ git reflog > fatal: bad object HEAD > > Any ideas how to fix this? > > Thanks, > David OK, I think I got things operational again, through Googling and blind faith... I manually checked the reflog for my branch: [dev@lilydev:lilypond-git]$ tail -n 2 .git/logs/refs/heads/dev/measure_spanner de92385d89cfbbe5f0aa95a907c5fb98496fcb28 e949231cdff5d174e76af47c49e0b2fd60e912eb Federico Bruni 1573594713 +0100reset: moving to HEAD^ e949231cdff5d174e76af47c49e0b2fd60e912eb ec0f38486e4aedcd28a89cca28464ef4f226b7bb David Nalesnik 1573595114 +0100commit: Add regression tests (Note: both commits above are authored by me; I was just a little late in updating my config.) I reset HEAD to point to the last commit on my branch: git update-ref HEAD ec0f38486e4aedcd28a89cca28464ef4f226b7bb git fsck then gave this: [dev@lilydev:lilypond-git]$ git fsck Checking object directories: 100% (256/256), done. Checking objects: 100% (402883/402883), done. error: refs/heads/dev/measure_spanner: invalid reflog entry 76008183503d70d4b37a73f19e60c2438112a5a8 error: HEAD: invalid reflog entry 76008183503d70d4b37a73f19e60c2438112a5a8 Checking connectivity: 401781, done. I then did: [dev@lilydev:lilypond-git]$ git reflog expire --stale-fix --all [dev@lilydev:lilypond-git]$ git fsck Checking object directories: 100% (256/256), done. Checking objects: 100% (402883/402883), done. Checking connectivity: 401781, done. ___ Something must have happened when I attempted to use git rebase -i to squash those two commits. That rebase is gone. Ugh. I hope this does the trick... Thanks, David
Re: problems with SSH key
On Thu, Nov 14, 2019 at 9:49 PM Werner LEMBERG wrote: > > > >> There is git-fsck . > >> > > > > [dev@lilydev:lilypond-git]$ git fsck > > Segmentation faultrectories: 45% (116/256) > > Ouch. I've never experienced such a thing with git. Maybe something > is broken with your installation? Does removing and installing again > help? > > > Werner Do you mean removing git itself? I'd like to be able to get back to the work I just did, if at all possible. I deleted the empty object that git commands complained about, and now git fsck works. I get this output : [dev@lilydev:lilypond-git]$ git fsck Checking object directories: 100% (256/256), done. Checking objects: 100% (402883/402883), done. error: HEAD: invalid sha1 pointer 76008183503d70d4b37a73f19e60c2438112a5a8 error: refs/heads/dev/measure_spanner: invalid sha1 pointer 76008183503d70d4b37a73f19e60c2438112a5a8 Checking connectivity: 401781, done. (dev/measure_spanner is the name of my branch) By the way, git reflog gives me this: [dev@lilydev:lilypond-git]$ git reflog fatal: bad object HEAD Any ideas how to fix this? Thanks, David
Re: problems with SSH key
>> There is git-fsck . >> > > [dev@lilydev:lilypond-git]$ git fsck > Segmentation faultrectories: 45% (116/256) Ouch. I've never experienced such a thing with git. Maybe something is broken with your installation? Does removing and installing again help? Werner
Re: problems with SSH key
Good god On Thu, Nov 14, 2019 at 6:36 PM David Kastrup wrote: > > There is git-fsck . > [dev@lilydev:lilypond-git]$ git fsck Segmentation faultrectories: 45% (116/256)
PATCHES - Countdown for November 14th
Hello, Here is the current patch countdown list. The next countdown will be on November 16th. A quick synopsis of all patches currently in the review process can be found here: http://philholmes.net/lilypond/allura/ Push: No patches to push at this time. Countdown: 5593 Optionally use "tidy" to check generated HTML - Dan Eble https://sourceforge.net/p/testlilyissues/issues/5593 http://codereview.appspot.com/583160043 Review: 5598 More changes for compatbility with future Python versions - Jonas Hahnfeld https://sourceforge.net/p/testlilyissues/issues/5598 http://codereview.appspot.com/554970043 5600 Fix hidden member templates in derived classes - Jonas Hahnfeld https://sourceforge.net/p/testlilyissues/issues/5600 http://codereview.appspot.com/559250043 5599 Purge remnants of SCons - Jonas Hahnfeld https://sourceforge.net/p/testlilyissues/issues/5599 http://codereview.appspot.com/559240043 New: No new patches at this time *** Regards, James
Re: problems with SSH key
David Nalesnik writes: > On Thu, Nov 14, 2019 at 10:21 AM Federico Bruni wrote: > >> >> >> Il giorno gio 14 nov 2019 alle 10:17, David Nalesnik >> ha scritto: >> > On Thu, Nov 14, 2019 at 9:34 AM David Nalesnik >> > wrote: >> >> >> >> On Thu, Nov 14, 2019 at 9:23 AM David Kastrup wrote: >> >> > >> >> > Rather sounds like a different problem like a dead >> >> server/connection. >> >> > Try again? >> >> >> >> Same result >> > >> > And in fact any git command I try yields these fatal errors. (I tried >> > to create a patch to back up my work, to no avail.) >> > >> >> git format-patch doesn't work either? >> >> Perhaps you need to upgrade the system? In particular the package >> ca-certificates >> > > Nor did git log. I will see about updates, but I imagine I need to clean > up the empty objects manually. There is git-fsck . -- David Kastrup
Re: Fix hidden member templates in derived classes (issue 559250043 by jonas.hahnf...@gmail.com)
> Great! Jonas, please add comments to the source code >that points to the relevant gcc vs. clang discussion. Where exactly would you put such comment? IMO we don't need to justify writing correct code (or at least code that both compilers accept eventually). Fair point, so please forget my suggestion. https://codereview.appspot.com/559250043/
Re: problems with SSH key
On Thu, Nov 14, 2019 at 10:21 AM Federico Bruni wrote: > > > Il giorno gio 14 nov 2019 alle 10:17, David Nalesnik > ha scritto: > > On Thu, Nov 14, 2019 at 9:34 AM David Nalesnik > > wrote: > >> > >> On Thu, Nov 14, 2019 at 9:23 AM David Kastrup wrote: > >> > > >> > Rather sounds like a different problem like a dead > >> server/connection. > >> > Try again? > >> > >> Same result > > > > And in fact any git command I try yields these fatal errors. (I tried > > to create a patch to back up my work, to no avail.) > > > > git format-patch doesn't work either? > > Perhaps you need to upgrade the system? In particular the package > ca-certificates > Nor did git log. I will see about updates, but I imagine I need to clean up the empty objects manually. Thanks, David > > > >
Re: Fix hidden member templates in derived classes (issue 559250043 by jonas.hahnf...@gmail.com)
On 2019/11/14 11:29:25, dak wrote: [...] I am not a fan of having to keep the whole inheritance hierarchy in sight (that's a loss of abstraction) but considering the actual impact this causes, it seems like a small price to pay for getting rid of this headache. The other option (that I just tested) is to move the method_finder implementation out of the classes, ie make them a static function in the global namespace. This requires a quite mechanical change for all classes to call DECLARE_TRANSLATOR_CALLBACKS (<<>>) right after their declaration and making Translator::trampoline public (136 files changed, 279 insertions(+), 18 deletions(-)). To be honest, I like this less than this patch, but it does avoid the lost abstraction in the three ligature engravers. On 2019/11/14 11:59:34, lemzwerg wrote: Great! Jonas, please add comments to the source code that points to the relevant gcc vs. clang discussion. Where exactly would you put such comment? IMO we don't need to justify writing correct code (or at least code that both compilers accept eventually). https://codereview.appspot.com/559250043/
Re: problems with SSH key
Il giorno gio 14 nov 2019 alle 10:17, David Nalesnik ha scritto: On Thu, Nov 14, 2019 at 9:34 AM David Nalesnik wrote: On Thu, Nov 14, 2019 at 9:23 AM David Kastrup wrote: > > Rather sounds like a different problem like a dead server/connection. > Try again? Same result And in fact any git command I try yields these fatal errors. (I tried to create a patch to back up my work, to no avail.) git format-patch doesn't work either? Perhaps you need to upgrade the system? In particular the package ca-certificates
Re: problems with SSH key
On Thu, Nov 14, 2019 at 10:19 AM David Nalesnik wrote: > > On Thu, Nov 14, 2019 at 10:17 AM David Nalesnik > wrote: > > > > On Thu, Nov 14, 2019 at 9:34 AM David Nalesnik > > wrote: > > > > > > On Thu, Nov 14, 2019 at 9:23 AM David Kastrup wrote: > > > > > > > > Rather sounds like a different problem like a dead server/connection. > > > > Try again? > > > > > > Same result > > > > And in fact any git command I try yields these fatal errors. (I tried > > to create a patch to back up my work, to no avail.) > > I think I will try the upvoted solution here later today: > https://stackoverflow.com/questions/11706215/how-to-fix-git-error-object-file-is-empty Unless you can think of a better idea!
Re: problems with SSH key
On Thu, Nov 14, 2019 at 10:17 AM David Nalesnik wrote: > > On Thu, Nov 14, 2019 at 9:34 AM David Nalesnik > wrote: > > > > On Thu, Nov 14, 2019 at 9:23 AM David Kastrup wrote: > > > > > > Rather sounds like a different problem like a dead server/connection. > > > Try again? > > > > Same result > > And in fact any git command I try yields these fatal errors. (I tried > to create a patch to back up my work, to no avail.) I think I will try the upvoted solution here later today: https://stackoverflow.com/questions/11706215/how-to-fix-git-error-object-file-is-empty
Re: problems with SSH key
On Thu, Nov 14, 2019 at 9:34 AM David Nalesnik wrote: > > On Thu, Nov 14, 2019 at 9:23 AM David Kastrup wrote: > > > > Rather sounds like a different problem like a dead server/connection. > > Try again? > > Same result And in fact any git command I try yields these fatal errors. (I tried to create a patch to back up my work, to no avail.)
Re: problems with SSH key
On Thu, Nov 14, 2019 at 9:23 AM David Kastrup wrote: > > David Nalesnik writes: > > > Hi all, > > > > I'm having difficulty getting my LilyDev machine to work with SSH. > > I've followed the steps in the Contributor's Guide. Below is what > > happens. I've included my config file, too. > > > > If anyone can help, I'd be very grateful. I've got a patch to submit > > but I've been struggling for days to reinstall LilyDev. > > > > Thanks, > > David > > > > BTW: ssh is not installed in the latest LilyDev release; perhaps a > > note is needed in the manual > > > > [dev@lilydev:lilypond-git]$ git pull --verbose > > The authenticity of host 'git.sv.gnu.org (209.51.188.201)' can't be > > established. > > ECDSA key fingerprint is SHA256:qRLLJ4w/GAeiDyYnbx4yWJbZXwGiYYxgNty7lAfUyuM. > > Are you sure you want to continue connecting (yes/no)? yes > > I read "yes" so this does not look like a problem with the key. Well, the Contributor's Guide description doesn't match what I got (an ECDSA instead of an RSA fingerprint), so my "yes" may have been wishful thinking? Here's the output the CG quotes: The authenticity of host 'git.sv.gnu.org (140.186.70.72)' can't be established. RSA key fingerprint is 80:5a:b0:0c:ec:93:66:29:49:7e:04:2b:fd:ba:2c:d5. Are you sure you want to continue connecting (yes/no)? > > > Warning: Permanently added 'git.sv.gnu.org,209.51.188.201' (ECDSA) to > > the list of known hosts. > > Again, this looks like the right reaction. Should work without this > prompt next time. > > > error: object file > > .git/objects/76/008183503d70d4b37a73f19e60c2438112a5a8 is empty > > error: object file > > .git/objects/76/008183503d70d4b37a73f19e60c2438112a5a8 is empty > > fatal: loose object 76008183503d70d4b37a73f19e60c2438112a5a8 (stored > > in .git/objects/76/008183503d70d4b37a73f19e60c2438112a5a8) is corrupt > > [dev@lilydev:lilypond-git]$ fatal: The remote end hung up unexpectedly > > Rather sounds like a different problem like a dead server/connection. > Try again? Same result
Re: problems with SSH key
David Nalesnik writes: > Hi all, > > I'm having difficulty getting my LilyDev machine to work with SSH. > I've followed the steps in the Contributor's Guide. Below is what > happens. I've included my config file, too. > > If anyone can help, I'd be very grateful. I've got a patch to submit > but I've been struggling for days to reinstall LilyDev. > > Thanks, > David > > BTW: ssh is not installed in the latest LilyDev release; perhaps a > note is needed in the manual > > [dev@lilydev:lilypond-git]$ git pull --verbose > The authenticity of host 'git.sv.gnu.org (209.51.188.201)' can't be > established. > ECDSA key fingerprint is SHA256:qRLLJ4w/GAeiDyYnbx4yWJbZXwGiYYxgNty7lAfUyuM. > Are you sure you want to continue connecting (yes/no)? yes I read "yes" so this does not look like a problem with the key. > Warning: Permanently added 'git.sv.gnu.org,209.51.188.201' (ECDSA) to > the list of known hosts. Again, this looks like the right reaction. Should work without this prompt next time. > error: object file > .git/objects/76/008183503d70d4b37a73f19e60c2438112a5a8 is empty > error: object file > .git/objects/76/008183503d70d4b37a73f19e60c2438112a5a8 is empty > fatal: loose object 76008183503d70d4b37a73f19e60c2438112a5a8 (stored > in .git/objects/76/008183503d70d4b37a73f19e60c2438112a5a8) is corrupt > [dev@lilydev:lilypond-git]$ fatal: The remote end hung up unexpectedly Rather sounds like a different problem like a dead server/connection. Try again? -- David Kastrup
problems with SSH key
Hi all, I'm having difficulty getting my LilyDev machine to work with SSH. I've followed the steps in the Contributor's Guide. Below is what happens. I've included my config file, too. If anyone can help, I'd be very grateful. I've got a patch to submit but I've been struggling for days to reinstall LilyDev. Thanks, David BTW: ssh is not installed in the latest LilyDev release; perhaps a note is needed in the manual [dev@lilydev:lilypond-git]$ git pull --verbose The authenticity of host 'git.sv.gnu.org (209.51.188.201)' can't be established. ECDSA key fingerprint is SHA256:qRLLJ4w/GAeiDyYnbx4yWJbZXwGiYYxgNty7lAfUyuM. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'git.sv.gnu.org,209.51.188.201' (ECDSA) to the list of known hosts. error: object file .git/objects/76/008183503d70d4b37a73f19e60c2438112a5a8 is empty error: object file .git/objects/76/008183503d70d4b37a73f19e60c2438112a5a8 is empty fatal: loose object 76008183503d70d4b37a73f19e60c2438112a5a8 (stored in .git/objects/76/008183503d70d4b37a73f19e60c2438112a5a8) is corrupt [dev@lilydev:lilypond-git]$ fatal: The remote end hung up unexpectedly __CONFIG___ [dev@lilydev:lilypond-git]$ git config --list user.name=David Nalesnik user.email=david.nales...@gmail.com color.ui=auto rietveld.server=codereview.appspot.com rietveld.cc=lilypond-devel@gnu.org branch.staging.remote=origin branch.staging.merge=refs/heads/staging core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true remote.origin.url=ssh://dnales...@git.sv.gnu.org/srv/git/lilypond.git remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* branch.master.remote=origin branch.master.merge=refs/heads/master allura.tracker=https://sourceforge.net/p/testlilyissues/issues/
Re: Fix hidden member templates in derived classes (issue 559250043 by jonas.hahnf...@gmail.com)
https://codereview.appspot.com/559250043/diff/547250043/lily/include/translator.hh File lily/include/translator.hh (right): https://codereview.appspot.com/559250043/diff/547250043/lily/include/translator.hh#newcode204 lily/include/translator.hh:204: // Fallback for non-overriden callbacks for which ::x degrades to Should this comment be moved with the function? https://codereview.appspot.com/559250043/
Re: Fix hidden member templates in derived classes (issue 559250043 by jonas.hahnf...@gmail.com)
Great! Jonas, please add comments to the source code that points to the relevant gcc vs. clang discussion. https://codereview.appspot.com/559250043/
Re: Fix hidden member templates in derived classes (issue 559250043 by jonas.hahnf...@gmail.com)
On 2019/11/14 09:11:35, lemzwerg wrote: > And yes, this works for me, at least on Linux (didn't test FreeBSD yet and don't > own a Mac). Plus it passes a full check with a test-baseline generated by GCC, > so I'm pretty confident it's also working correctly. Ho humm :-) David K? This is an embarrassingly small change, yes. After recent standard changes, this year-long problem would eventually have become an issue. I haven't yet digged into the standards for another reading, but if both GCC and Clang agree for now that this is fine, I'll not argue against it. After all, the previous version did become problematic after some C++14(?) change in the standards. I am not a fan of having to keep the whole inheritance hierarchy in sight (that's a loss of abstraction) but considering the actual impact this causes, it seems like a small price to pay for getting rid of this headache. https://codereview.appspot.com/559250043/
Re: Fix hidden member templates in derived classes (issue 559250043 by jonas.hahnf...@gmail.com)
And yes, this works for me, at least on Linux (didn't test FreeBSD yet and don't own a Mac). Plus it passes a full check with a test-baseline generated by GCC, so I'm pretty confident it's also working correctly. Ho humm :-) David K? https://codereview.appspot.com/559250043/
LilyPond + Clang
Hi all, I spent some time trying to understand why LilyPond fails to build with Clang and how a possible fix might look like. TLDR, I've posted a patch in https://sourceforge.net/p/testlilyissues/issues/5600/ which works on Linux. Please find attached another reduced test case: The approach with 'using' (currently in LilyPond's code) only works with GCC, whereas my proposed solution of re-declaring the base template member compiles with both GCC and Clang (on Linux). I'm planning to also test on FreeBSD (which defaults to Clang nowadays), just don't have time right now. However I don't own Apple products, so it would be great if somebody could test on macOS... For context, here are the prior discussions: * https://lists.gnu.org/archive/html/lilypond-devel/2018-11/msg00019.html * http://lists.llvm.org/pipermail/cfe-users/2018-November/001417.html * https://bugs.llvm.org/show_bug.cgi?id=39581 Cheers, Jonas P.S.: Werner is too fast in discovering new patches struct Base { void f() { } template static void t() {} }; struct Derived : public Base { #ifndef FIXED using Base::t; #else template static void t() {} #endif template static void t() {} }; void foo() { Derived::t<::f>(); } signature.asc Description: This is a digitally signed message part
Re: Fix hidden member templates in derived classes (issue 559250043 by jonas.hahnf...@gmail.com)
Reviewers: lemzwerg, Message: On 2019/11/14 08:45:44, lemzwerg wrote: Wait, this tiny patch makes lilypond compilable with clang, passing the whole test suite? You're quite fast with looking at patches, I wasn't even finished with pointing you to this one :D And yes, this works for me, at least on Linux (didn't test FreeBSD yet and don't own a Mac). Plus it passes a full check with a test-baseline generated by GCC, so I'm pretty confident it's also working correctly. Description: Fix hidden member templates in derived classes According to Clang's interpretation of the C++ standard, "member functions in the derived class override and/or hide member functions with the same name and parameter types in a base class". This seems to also hold for templated member functions and even if the code has a using-declaration of the base class member. This affects LilyPond's implementation of the method_finder template. Luckily, the problem can be solved by just re-declaring the base template specializations in each derived class instead of 'using' them. The only drawback is that this doesn't work out-of-the-box for deeper inheritance hierarchies. However, this only affects three ligature engravers so I think it's worth the maintenance to just encode the transitive inheritance manually. Please review this at https://codereview.appspot.com/559250043/ Affected files (+10, -6 lines): M lily/include/translator.hh M lily/kievan-ligature-engraver.cc M lily/mensural-ligature-engraver.cc M lily/vaticana-ligature-engraver.cc Index: lily/include/translator.hh diff --git a/lily/include/translator.hh b/lily/include/translator.hh index 63f9ed78acd42a29d0af33f9f88b582b3c15415c..54e289771636b14276158745141ebbe9a949dd23 100644 --- a/lily/include/translator.hh +++ b/lily/include/translator.hh @@ -75,12 +75,16 @@ Translator_creator::allocate (Context *ctx) public: \ DECLARE_CLASSNAME (NAME); \ virtual void fetch_precomputable_methods (SCM methods[]); \ - DECLARE_TRANSLATOR_CALLBACKS (NAME); \ - TRANSLATOR_INHERIT (Translator); \ + template \ + static SCM method_finder () \ + { \ +return SCM_UNDEFINED; \ + } \ + DECLARE_TRANSLATOR_CALLBACKS (NAME) \ /* end #define */ #define TRANSLATOR_INHERIT(BASE)\ - using BASE::method_finder + DECLARE_TRANSLATOR_CALLBACKS (BASE) #define DECLARE_TRANSLATOR_CALLBACKS(NAME) \ template \ @@ -199,9 +203,6 @@ protected: // should be private. // Fallback for non-overriden callbacks for which ::x degrades to // ::x - template - static SCM - method_finder () { return SCM_UNDEFINED; } virtual void derived_mark () const; static SCM event_class_symbol (const char *ev_class); Index: lily/kievan-ligature-engraver.cc diff --git a/lily/kievan-ligature-engraver.cc b/lily/kievan-ligature-engraver.cc index cde8bf31fbc4ca6312fb35f9eb899fb6f43da019..f7906ffefb66fa13a5e0c54bed8442333b779332 100644 --- a/lily/kievan-ligature-engraver.cc +++ b/lily/kievan-ligature-engraver.cc @@ -40,6 +40,7 @@ protected: public: TRANSLATOR_DECLARATIONS (Kievan_ligature_engraver); TRANSLATOR_INHERIT (Coherent_ligature_engraver); + TRANSLATOR_INHERIT (Ligature_engraver); private: void fold_up_primitives (vector const , Real padding, Real _length); Index: lily/mensural-ligature-engraver.cc diff --git a/lily/mensural-ligature-engraver.cc b/lily/mensural-ligature-engraver.cc index d122aca7091f40cf84f67c28a169a49647f0412b..34a90c2a65dd5f93b8bbcace92dadacfc0bae06c 100644 --- a/lily/mensural-ligature-engraver.cc +++ b/lily/mensural-ligature-engraver.cc @@ -63,6 +63,7 @@ protected: public: TRANSLATOR_DECLARATIONS (Mensural_ligature_engraver); TRANSLATOR_INHERIT (Coherent_ligature_engraver); + TRANSLATOR_INHERIT (Ligature_engraver); private: void transform_heads (vector const ); Index: lily/vaticana-ligature-engraver.cc diff --git a/lily/vaticana-ligature-engraver.cc b/lily/vaticana-ligature-engraver.cc index 08d02865f20916c2b0768864f4aadfd276a9caad..38b815411f1aa6901fe9c75c1b71eb89765c5cc8 100644 --- a/lily/vaticana-ligature-engraver.cc +++ b/lily/vaticana-ligature-engraver.cc @@ -78,6 +78,7 @@ private: public: TRANSLATOR_DECLARATIONS (Vaticana_ligature_engraver); TRANSLATOR_INHERIT (Gregorian_ligature_engraver); + TRANSLATOR_INHERIT (Ligature_engraver); protected: virtual Spanner *create_ligature_spanner ();
Fix hidden member templates in derived classes (issue 559250043 by jonas.hahnf...@gmail.com)
Wait, this tiny patch makes lilypond compilable with clang, passing the whole test suite? https://codereview.appspot.com/559250043/