Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18176] CLI: Fail app build if target architectures do not exist in the manifest of every module

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2015-09-04T07:22:04.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid, CLI, iOS
Labelsn/a
ReporterJon Alter
AssigneeJon Alter
Created2014-12-10T23:27:33.000+0000
Updated2017-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

FileDateSize
TIMOB18176.zip2014-12-11T23:01:33.000+00007284996

Comments

  1. Jon Alter 2014-12-11

    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.
  2. Tim Poulsen 2014-12-11

    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)
  3. Jon Alter 2014-12-12

    PRs

    master: https://github.com/appcelerator/titanium_mobile/pull/6475 3_5_X: https://github.com/appcelerator/titanium_mobile/pull/6476

    Test 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)

       var win = Ti.UI.createWindow({
           backgroundColor: 'blue'
       });
       win.open();
       win.addEventListener('click', function(e) {
           var Map = require('ti.map');
       });
       

    Edit: created new ticket for this solution TIMOB-18196

  4. Tim Poulsen 2014-12-12

    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.
  5. Lee Morris 2017-03-22

    Closing ticket as duplicate and links to the related ticket have been provided above.

JSON Source