Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Modularization RegEx in Row.cs incorrectly identifies some property names as keywords in Component Condition #4513

Closed
wixbot opened this Issue Aug 23, 2014 · 3 comments

Comments

Projects
None yet
2 participants
Collaborator

wixbot commented Aug 23, 2014

In AutoCAD, we use a property called ORIGSTANDALONENETWORKTYPE. This property is used by a custom action delivered by licensing group, and cannot be changed.

When we broke out some ACAD specific licensing into separate MSMs (to share with ACAD vertical products), we noticed a problem with the Modularization code. This property should not be Modularized as we add the SuppressModularization attribute. This works everywhere except when the property is used as part of the Component Condition:

Expected value:

ACADLOCKTYPE = "2" AND ORIGSTANDALONENETWORKTYPE <> "3" AND NIWSELECTION = 1

Actual Value:

ACADLOCKTYPE = "2" AND ORIGSTANDALONENETWORKTYPE.E26FEF92_AA43_4038_AD07_6BF1C4B34096 <> "3" AND NIWSELECTION = 1

After debugging the Wix Toolset, it appears the regular expression in Row.cs detects the characters "OR" in the property name as a keyword, and therefore only sees the property name as "IGSTANDALONENETWORKTYPE"

This can be confirmed using an online RegExp tool, like http://regexhero.net/tester/
Here is the RegEx Row.cs uses:
NOT|EQV|XOR|OR|AND|IMP|"".?""|%[a-zA-Z][a-zA-Z0-9_.]|(?[!$?&]?[a-zA-Z][a-zA-Z0-9_.]*)

The workaround is to create another property called "IGSTANDALONENETWORKTYPE" and suppress modularizartion on this. This will suppress the modularization of the Component Condition, while the real property suppresses modularization everywhere else.

Looking at the source code, this defect also affects Wix 3.9.

Originally opened by jbaker

Collaborator

wixbot commented Aug 28, 2014

AssignedTo set to robmen
Release changed from v3.9 to v3.10

Collaborator

wixbot commented Sep 14, 2014

Should be fixed by pull request #146.

Originally posted by robmen

Collaborator

wixbot commented Oct 17, 2014

Turns out this was fixed in v3.9 RC4 since we had to rebuild for RC4

Originally posted by robmen
Release changed from v3.10 to v3.9
Resolution set to fixed
Status changed from Open to Resolved

@wixbot wixbot added bug linker labels Dec 20, 2015

@wixbot wixbot added this to the v3.9 milestone Dec 20, 2015

@wixbot wixbot closed this Dec 20, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment