Update dependency TinyXML2 to version v8.0.0 with PR#811#2665
Update dependency TinyXML2 to version v8.0.0 with PR#811#2665scottfurry wants to merge 2 commits into
Conversation
Sources re-styled w/ astyle to remove inconsistent formatting.
PR #811 fixes leading indent problem with XMLPrinter. Ref: leethomason/tinyxml2#811 Sources re-styled w/ astyle to ensure consistent formatting.
|
PR addresses observations of Issue #2594. |
|
This seems to be a duplicate of #2594 It seems unfortunate to make our own tweaks in tinyxml. I suggest that we update to v7.1.0 or wait |
|
FWIW, tinyxml2 v8.0.0 is currently in the Gentoo tree (but marked as "unstable" - that may change soon). I was trying to head off the mess where people build w/ external tinyxml (Fedora, Gentoo, and others) will start flooding bug reports with XML problems. The current build practice by some Linux distributions is to patch existing cppcheck code to build against external tinyxml. If they use v8.0.0 and not incorporate PR#811., TestRunner will definitely fail due to node indentation differences. There may be other issues using cppcheck as well. By providing patched v8.0.0, I'm trying to head off the unnecessary noise from downstream in our direction by giving a fall back until tinyxml2 maintainer incorporates the PR (and releases an update). |
|
ok so it would be pointless to update to v7.1.0 people will get the same problems anyway. It feels wrong to put this hack in Cppcheck anyway;
|
|
@scottfurry What is the problem. TinyXML 8.0 indentation is broken and there are redundant spaces or missing spaces? That is not a real problem right? Then I guess our test could be adapted so it removes all indentation and accepts tinyxml output no matter if it's indented properly or not. |
|
Problem occurs w/ v8.0.0. From my read of the issue, a regression was introduced in the update to v8.0.0. This produces missing indentation of nodes. Either way (removing indents or apply PR 811), code patching would be involved. The PR is rather clean and straight forward. From my perspective, it would be more maintainable than "hacking" every usage of XMLPrinter usage and mangling strings for indentation. We rely on "well-formed" xml. I believe we should not change that. |
Well patching test/testerrorlogger.cpp seems much better than patching tinyxml.
You only patch "our" tinyxml in this PR ... so if gentoo/etc link cppcheck against official tinyxml then the xml will not be well-formed and this test will fail. I don't see what difference it makes for them. |
|
On 2020-05-29 12:00 p.m., Daniel Marjamäki wrote:
Either way (removing indents or apply PR 811), code patching would
be involved
Well patching test/testerrorlogger.cpp seems much better than patching
tinyxml.
Assuming that poor indents doesn't cause other problems elsewhere.
We rely on "well-formed" xml. I believe we should not change that.
You only patch "our" tinyxml in this PR ... so if gentoo/etc link
cppcheck against official tinyxml then the xml will not be well-formed
and this test will fail. I don't see what difference it makes for them.
When things go sideways for them in building, the respective
distribution will have bug reports or other "noise" about things not
working. That will come back to cppcheck. We can head off the problem
and minimize the impact by telling "downstream" to "...use internal
tinyxml". We communicate awareness of the problem and provide a workaround.
|
|
so well.. the choice is;
I don't care a lot about the xml indentation. It feels wrong that we check it explicitly in testerrorlogger. But well sacrificing the output to save some problem downstream.. I just think that sounds really weird. Is this really recommended according to Gentoo policy etc? |
Downstream will make noise about build problems, and cause grief for you/project, when things don't work. Doing nothing makes unnecessary work and grief for others.
Update tinyxml and patch to mitigate a regression in tinyxml code. This does not appear to cause a problem in our usage(TestRunner passes completely). When, downstream has problems building, the recommended solution would be to modify their build instructions to use internal. (simple change of a command line flag).
This seems messy to me. We know there is a clear solution and can easily incorporate that fix until next point release upstream at the same time stay current with overall release.
I'm trying to approach this from a platform agnostic viewpoint and more of a "what is best for cppcheck" standpoint. |
|
Sorry.. I don't understand why choice 1 and 2 are so completely different for downstream. I have the feeling that with choice 1 and choice 2 the downstream will have the exact same problems.. and will have to make the exact same fix. If they try to link with the shared library for tinyxml 8.0 then they must change their command line to compile with internal. Does the problems or fix differ somehow? |
|
Bottom Line is that someone will be patching (downstream and/or us) because of the tinyxml2 regression problem with the latest revision. Doing nothing and waiting for a fix would not be a good choice, IMHO. If we are going to patch, preference would be to minimize impact to cppcheck code because of dependency problem. If downstream has a problem building cppcheck, we can give a workaround. We would be making a mistake in expecting or depending on downstream to patch their version of tinyxml2. My preference would be to upgrade and patch tinyxml2 (choice Trying to minimize the impact of a library problem on the project. |
I don't see the answer. If they compile with internal tinyxml then it will work. No matter if we take choice 1 or 2. If they try to compile with shared library tinyxml then it will not work. No matter if we take choice 1 or 2. The fix will be to compile with internal tinyxml. |
|
bottomline is; I don't think it's elegant to have a patched tinyxml in our repo. it's an ugly choice that I do not feel comfortable with. It is not critical that testerrorlogger checks the indentation. That is a "side effect" in the test. There is a choice #4 that we do not update our tinyxml at all. We write a |
|
I wish you would not point at gentoo. They not alone. The fedora spec
file does quite a bit of patching to build against external.
But you're not interested.
I'll stop with the noise then.
…On 2020-05-30 3:59 a.m., Daniel Marjamäki wrote:
bottomline is; I don't think it's elegant to modify tinyxml in our
repo. it's an ugly choice that I do not feel comfortable with.
I do not think the testerrorlogger should check the indentation. That
is a "side effect" in the test. There is a choice #4
<#4> that we do not update our
tinyxml at all. We write a |ASSERT_EQUAL_XML| that ignores indentation
and use that in testerrorlogger. Well if gentoo wants to link with the
shared library then, they can do it. indentation from cppcheck will
not be perfect but they probably have such problem for other packages
also.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2665 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTAO24MS2INOHSDPRRELA3RUDKI7ANCNFSM4NNWJQ4A>.
|
|
ok |
Update tinyxml2 dependency to latest upstream version 8.0.0.
Contents of PR#811 correcting deficiency of initial indent of new nodes applied to sources.
astyle formatting applied to
project/externals/tinyxml/tinyxml2.[h,cpp]to ensure sources are consistently formatted/styled(corrects numerous inconsistent leading spaces/tabs for lines).Project compiled successfully with updated dependency.
TestRunner completed all +3600 tests without errors or warnings.