[TIMOB-18176] CLI: Fail app build if target architectures do not exist in the manifest of every module
GitHub Issue | n/a |
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2015-09-04T07:22:04.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android, CLI, iOS |
Labels | n/a |
Reporter | Jon Alter |
Assignee | Jon Alter |
Created | 2014-12-10T23:27:33.000+0000 |
Updated | 2017-03-22T22:12:15.000+0000 |
Description
TIMOB-18065 architectures are now included in module manifests
The CLI should check the architectures available in each modules that is included in the app and fail with a helpful error when one or more of the modules do not have the architectures the app is being built for.
It would be most useful to fail with a list of modules that failed an what architectures they are missing rather than failing the build when the first mismatch is encountered.
Attachments
I like option 1. I see no problem with people disabling this check on purpose, and don't see them inadvertently disabling it unless they are messing with the sdk. [~ingo] also likes option 1 based on the info we have at this point.
Attached project contains a hook that checks the module architectures and fails the build if: * you're using a 3.5+ version of the CLI * you're building to a 3.5+ version of the SDK * you're building for iOS * and any local or global projects used in the app either don't have an 'architectures' entry in their manifest or don't have x86_64 or arm64 in that list of architectures (this same hook could be made into a global, ie. installed with the rest of the CLI. included here as a project-level hook just for demo purposes)
PRs
master: https://github.com/appcelerator/titanium_mobile/pull/6475 3_5_X: https://github.com/appcelerator/titanium_mobile/pull/6476Test case:
Add the ios ti.map module v2.0.6 (Does not have 64bit slice) to the tiapp.xml
Run the code below
Tap on the window and the error message displayed should include the architecture that is missing from the module (x86_64 or arm64)
Edit: created new ticket for this solution TIMOB-18196
I've tested Jon's PR and it works as expected. However, I have a couple of concerns: * The red-screen wouldn't appear for me on the simulator because the modules I tested with include the i386 architecture. (So a quick test could make it look like all was well.) * The error doesn't appear until the module is instantiated in code, which depending on the customer's app might be many screens deep and perhaps overlooked in cursory testing. (In a recent client app I helped on, building the app took nearly 5 mins, followed by a 10 min data sync process. The app then had many screens to tap through. As a customer, I'd prefer to be notified before all that if there was a module compatibility problem rather than go through all that to get a red-screen.) I prefer a solution that would notify them of problems at the compile stage.
Closing ticket as duplicate and links to the related ticket have been provided above.