[wix-devs] wix4: Handling invalid ids

Blair Murri osito at live.com
Thu Jan 5 12:27:19 PST 2017


In my view whitespace (including empty) should return null, and anything else should be an error.



Sent from my Windows 10 phone



From: Hoover, Jacob<mailto:Jacob.Hoover at greenheck.com>
Sent: Wednesday, January 4, 2017 7:27 AM
To: WiX Toolset Developer Mailing List<mailto:wix-devs at lists.wixtoolset.org>
Subject: Re: [wix-devs] wix4: Handling invalid ids



If the identifier is invalid, should we allow the build to continue? IE, should this be a warning or an error. Returning a special identifier that has to be checked before use is no better than returning a null and checking for it.

-----Original Message-----
From: wix-devs [mailto:wix-devs-bounces at lists.wixtoolset.org] On Behalf Of Bob Arnson
Sent: Tuesday, January 03, 2017 12:49 PM
To: WiX Toolset Developer Mailing List <wix-devs at lists.wixtoolset.org>
Subject: [wix-devs] wix4: Handling invalid ids

I opened https://github.com/wixtoolset/issues/issues/5464 when I was finding and fixing the wix4 unit tests (see https://github.com/wixtoolset/wix4/pull/224). What happens is that CompilerCore.GetAttributeIdentifier returns null if the id isn't valid and other Parse* methods use it before checking for a null Id (to generate one, usually). I'm thinking that CompilerCore.GetAttributeIdentifier should throw a warning itself and return a special InvalidIdentifier that's a legal object but distinguishable as invalid for reporting. Anyone have a different suggestion?
____________________________________________________________________
WiX Toolset Developer Mailing List provided by FireGiant http://www.firegiant.com/
____________________________________________________________________
WiX Toolset Developer Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-devs mailing list