[ALOY-1005] Alloy <Require> doesn't care about the platform attr (parent or itself)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-05-23T17:33:13.000+0000 |
Affected Version/s | Alloy 1.3.1 |
Fix Version/s | Alloy 1.4.0 |
Components | Tooling |
Labels | alloy, compile, qe-testadded |
Reporter | Dan Tamas |
Assignee | Tim Poulsen |
Created | 2014-05-03T12:44:46.000+0000 |
Updated | 2014-06-22T13:21:04.000+0000 |
Description
Having 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.
file in the android folder with the same name (toRequire.xml)
<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>
Trying to compile for android will lead to this:
[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
*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
I have also tested this with Dan Tamas and I experience the exact same results. The trigger for failure is the
Moving this ticket to engineering as I can reproduce this issue with the provided test case.
This ticket has been fixed by a change made in the linked ticket
Resolved by a change made as part of the fixes for ALOY-691.
Verified fixed on iOS, Android and MobileWeb. TiSDK 3.3.0.v20140522144936 Alloy 1.4.0-alpha4 Appcelerator Studio 3.3.0.201405211748 CLI 3.3.0-alpha5 Closing.