[ALOY-1005] Alloy <Require> doesn't care about the platform attr (parent or itself)
|Affected Version/s||Alloy 1.3.1|
|Fix Version/s||Alloy 1.4.0|
|Labels||alloy, compile, qe-testadded|
DescriptionHaving separate views per platform in the same xml, if we require a file that exists only in the specific folder the alloy compiler will die when trying to compile for the other platform.
Trying to compile for android will lead to this:<Alloy> <Window class="container" platform="ios"> <Label id="label" onClick="doClick">Hello, World</Label> <Require src="toRequire"/> </Window> <Window class="container" platform="android"> <Label id="label" onClick="doClick">Hello, World</Label> </Window> </Alloy>
*toRequire.xml* needs to exist *ONLY* in the *app/views/ios* folder for the bug to show up. The workaround is to create an empty[DEBUG] [INFO] ----- MVC GENERATION ----- [INFO] [global style] loading from cache... [INFO] [index.xml] view processing... [INFO] style: "index.tss" [INFO] view: "index.xml" [ERROR] view "toRequire" does not exist. [ERROR] The following paths were inspected: [ERROR] /Volumes/Work/tst/app/views/android/toRequire [ERROR] /Volumes/Work/tst/app/views/toRequire [ERROR] Alloy compiler failed
- Malcolm Hollingsworth 2014-05-03
I have also tested this with Dan Tamas and I experience the exact same results.
The trigger for failure is the
tag - it does not honour its parents platform attribute. Many many tests in various combinations show this simply fails.
- Ritu Agrawal 2014-05-07 Moving this ticket to engineering as I can reproduce this issue with the provided test case.
- Tim Poulsen 2014-05-23 This ticket has been fixed by a change made in the linked ticket
- Tim Poulsen 2014-05-23 Resolved by a change made as part of the fixes for ALOY-691.
- Federico Casali 2014-05-23 Verified fixed on iOS, Android and MobileWeb. TiSDK 3.3.0.v20140522144936 Alloy 1.4.0-alpha4 Appcelerator Studio 18.104.22.168405211748 CLI 3.3.0-alpha5 Closing.