Uploaded image for project: 'Alloy'
  1. Alloy
  2. ALOY-1206

Alloy compiler doesn't regenerate controllers if only change is made to the distribution target

    Details

    • Story Points:
      8
    • Sprint:
      2015 Sprint 01 Tooling

      Description

      When building for a different target environment (development, test or production) conditional code in app/alloy.js is not updated in Resources/[platform]/app.js. This can cause serious errors when relying on the conditions for particular behaviour in ad-hoc and app store builds.

      Test case

      1. Create a project: ti create -t app -p ios -n conditions --id test.conditions -d .
      2. Make it Alloy: cd conditions && alloy new
      3. Insert the following snippet in both app/alloy.js and app/controllers/index.js:

      if (ENV_PRODUCTION) console.debug('if (ENV_PRODUCTION)');
      if (ENV_TEST) console.debug('if (ENV_TEST)');
      if (ENV_DEV) console.debug('if (ENV_DEVELOPMENT)');
      

      4. Build the production for Simulator: ti build -p ios -b
      5. Confirm that both Resources/iphone/app.js and Resources/iphone/alloy/controllers/index.js only have console.debug("if (ENV_DEVELOPMENT)"); which is correct
      6. Build for ad-hoc or to device: ti build -p ios --target dist-adhoc
      7. Confirm that Resources/iphone/app.js still has console.debug("if (ENV_DEVELOPMENT)"); while Resources/iphone/alloy/controllers/index.js is correctly updated to have console.debug("if (ENV_PRODUCTION)");

        Attachments

          Activity

            People

            • Assignee:
              skypanther Tim Poulsen
              Reporter:
              fokkezb Fokke Zandbergen
              Reviewer:
              Feon Sua Xin Miao
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration