[wix-devs] WiX convert info messages
rob at firegiant.com
Thu Jan 20 07:56:08 PST 2022
I think Option #1 is the way to go. I think the return code should be considered "errors + fixes". When the return code is 0 that means there is nothing left in the code that is "wrong" and nothing left that was fixed so you (the user of the tool) can stop converting now.
Does that thinking work?
From: wix-devs <wix-devs-bounces at lists.wixtoolset.org> On Behalf Of Mark Stega via wix-devs
Sent: Wednesday, January 19, 2022 5:59 AM
To: WiX Toolset Developer Mailing List <wix-devs at lists.wixtoolset.org>
Cc: Mark Stega <mark at optimiumhealth.com>
Subject: [wix-devs] WiX convert info messages
@robmen --Thanks, indeed the PR that you did removes the need for v142
I have the converter largely complete with a new 'OnInformation' method. What it did however was to break the assertions that count errors as I didn't increase the error count for information messages.
I see two ways to fix this and want an opinion of which direction you would prefer:
1) Simple increment the 'errors' member in 'OnInformation'
2) Add a new counter for InformationalMessages, increment that in 'OnInformation', change the 'ConvertFile' & 'ConvertDocument' methods to return a tuple <int, int> of errors & informationalMessages, and finally change the test fixtures to be something like
var errors = converter.ConvertDocument(document);
#1 has the advantage of being easy
#2 has the advantage of better testing and differentiation of expected errors and information ____________________________________________________________________
WiX Toolset Developer Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-devs