On Wed, Jan 02, 2019 at 06:53:31PM +0100, Kornel Benko wrote: > Am Mittwoch, 2. Januar 2019 12:45:39 CET schrieb Scott Kostyshak > <skost...@lyx.org>: > > On Wed, Jan 02, 2019 at 04:02:49PM +0100, Kornel Benko wrote: > > > Am Mittwoch, 2. Januar 2019 02:17:55 CET schrieb Scott Kostyshak > > > <skost...@lyx.org>: > > > > On Wed, Jan 02, 2019 at 08:14:23AM +0100, Kornel Benko wrote: > > > > > Am Mittwoch, 2. Januar 2019 02:10:19 CET schrieb Scott Kostyshak > > > > > <skost...@lyx.org>: > > > > > > On Wed, Jan 02, 2019 at 06:45:51AM +0100, Kornel Benko wrote: > > > > > > > Am Dienstag, 1. Januar 2019 18:09:51 CET schrieb Scott Kostyshak > > > > > > > <skost...@lyx.org>: > > > > > > > > The following ctest fails on 2.3.x and on master: > > > > > > > > > > > > > > > > ctest -R "export/examples/thesis/Bibliography_lyx21" > > > > > > > > > > > > > > > > It seems that the warning comes because Bibliography.lyx is > > > > > > > > included in > > > > > > > > more than one document that is loaded. That is, I guess that at > > > > > > > > least > > > > > > > > two of these .lyx files are opened (because of dependencies) > > > > > > > > when > > > > > > > > exporting Bibliography.lyx: > > > > > > > > > > > > > > > > Appendix.lyx > > > > > > > > chapter-1.lyx > > > > > > > > chapter-2.lyx > > > > > > > > thesis.lyx > > > > > > > > > > > > > > > > This does not seem like a bug to me. My guess is that this test > > > > > > > > never > > > > > > > > passed (although I'm not sure). The following warnings occur: > > > > > > > > > > > > > > > > Buffer.cpp (361): Warning: a buffer should not have two > > > > > > > > parents! > > > > > > > > > > > > > > > > And, on the second iteration (that is, exporting the created > > > > > > > > 2.1.x file > > > > > > > > again to 2.1.x format to create a .21.21.lyx file): > > > > > > > > > > > > > > > > Buffer.cpp (1062): The master 'thesis.lyx' assigned to this > > > > > > > > document > > > > > > > > (/home/scott/lyxbuilds/master/repo/lib/examples/thesis/Bibliography.21.lyx) > > > > > > > > does not include this document. Ignoring the master assignment. > > > > > > > > > > > > > > > > I guess this is because for the second iteration, the file has > > > > > > > > 21.lyx instead > > > > > > > > of .lyx. > > > > > > > > > > > > > > > > Kornel, do you think we should ignore both of these warnings > > > > > > > > for all > > > > > > > > lyx2lyx tests? I attempted to do that (see attached), but the > > > > > > > > test still > > > > > > > > fails and I'm not sure if it's because I did not ignore the > > > > > > > > warnings > > > > > > > > correctly or if there's another issue. > > > > > > > > > > > > > > No, it is a child-documents. Other child are already removed from > > > > > > > test. > > > > > > > > > > > > Ah I see. > > > > > > > > > > > > > $ egrep thesis *Tests > > > > > > > ignoredTests:export/examples/thesis/(Acknowledgments|Appendix|Summary|chapter-[12])_lyx[0-9][0-9] > > > > > > > > > > > > > > > An alternative I suppose would be > > > > > > > > to just not run these tests (by "ignoring" them). Any thoughts? > > > > > > > > > > > > > > Yes, please do also for master. > > > > > > > > > > > > Makes sense. Feel free to go ahead, or I will get to this tomorrow. > > > > > > > > > > > > We also have the following test failing (at least for me) on master: > > > > > > > > > > > > ctest -R "export/examples/thesis/thesis_lyx21" > > > > > > > > > > > > Adding > > > > > > > > > > > > Warning: a buffer should not have two parents! > > > > > > > > > > > > to filterCheckWarnings fixes it for me. Is that the right thing to > > > > > > do? > > > > > > > > > > I think yes, OTOH, for thesis.lyx we should _not_ get this warning. > > > > > > > > Why not? From what I understand, the master (implicitly) loads the > > > > children, which triggers the warning. > > > > > > > > Scott > > > > > > > > > > Yes, but each from a different buffer. Thus only one time on each. But > > > the message claims that there are > > > different parents. Which ones? There is only one parent, namely > > > thesis.lyx. > > > > > > Kornel > > > > For example, chapter-1 includes Bibliography.lyx and chapter-2 includes > > Bibliography.lyx. thesis.lyx includes both chapter-1 and chapter-2, so > > both are loaded (but hidden), and Bibliography.lyx is loaded (but > > hidden), and LyX then sees that more than one buffer includes > > Bibliography.lyx > > Oh, I missed that. That explains it.
Should I apply the attached patch? Note the last part of the commit message: The consequence of ignoring this warning is that we will not catch any future regression that triggers this warning when it should not. Alternatives would be to either ignore this test, or to invert it. Do you have a preference between this patch, ignoring the test, or inverting it? I don't have a strong preference. Scott
From 6e758a773d939bc2ef78ca67310793221ad747b8 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak <skost...@lyx.org> Date: Wed, 2 Jan 2019 14:04:39 -0500 Subject: [PATCH] ctests: restore thesis.lyx lyx2lyx tests These tests failed because of (multiple instances of) the following warning: Warning: a buffer should not have two parents! This warning is expected, because, for example, chapter-1 includes Bibliography.lyx and chapter-2 includes Bibliography.lyx. thesis.lyx includes both chapter-1 and chapter-2, so both are loaded (but hidden), and Bibliography.lyx is loaded (but hidden), and LyX then sees that more than one buffer includes Bibliography.lyx The consequence of ignoring this warning is that we will not catch any future regression that triggers this warning when it should not. --- development/autotests/filterCheckWarnings | 1 + 1 file changed, 1 insertion(+) diff --git a/development/autotests/filterCheckWarnings b/development/autotests/filterCheckWarnings index fc6925d928..af5c078347 100644 --- a/development/autotests/filterCheckWarnings +++ b/development/autotests/filterCheckWarnings @@ -1,3 +1,4 @@ Cannot find translation for language Warning: Lyx2lyx knows nothing about (textclass|module) Warning: sfval: [0-9]+ [0-9]+ +Warning: a buffer should not have two parents! -- 2.17.1
signature.asc
Description: PGP signature