[wix-devs] WiX convert info messages

Mark Stega mark at optimiumhealth.com
Thu Jan 20 08:07:44 PST 2022


Rob,

That works for me -- I went down the rabbit hole yesterday implementing the tupple return (#2) and it had a huge ripple through lots of code to get all of the 'ExecuteAsync' calls to handle the tuple return as well as the 15+ test fixtures for the convert. I will happily get rid of that code in favor of simplicity.

-----Original Message-----
From: Rob Mensching <rob at firegiant.com> 
Sent: Thursday, January 20, 2022 10:56 AM
To: WiX Toolset Developer Mailing List <wix-devs at lists.wixtoolset.org>
Cc: Mark Stega <mark at optimiumhealth.com>
Subject: RE: WiX convert info messages

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?


-----Original Message-----
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);
            Assert.Equal(0, errors.Item1); 
           Assert.Equal(10, errors.Item2);

#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 mailing list