Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-27888

iOS: circular references in require don't work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 10.0.0
    • Component/s: iOS
    • Labels:
    • Sprint:
      2020 Sprint 21, 2020 Sprint 22, 2020 Sprint 23, 2020 Sprint 24, 2020 Sprint 25, 2020 Sprint 26, 2021 Sprint 1

      Description

      While Android's require implementation is able to handle circular references - iOS is not.

      This is due to the underlying implementations - where Android is written in JS and mimics Node.js, while iOS is native. There's multiple possible solutions here:

      • Use rollup under the hood on apps as part of our build process.
      • Migrate iOS to use a shared require implementation with Android

      I personally prefer the second, but it'd take some re-architecting of how iOS starts up - and it's unclear to me how we'd tweak Android to use a require implementation under common rather than the one baked into the the runtime (the JS is baked in as bytes and executed early).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cwilliams Christopher Williams
                Reporter:
                cwilliams Christopher Williams
                Reviewer:
                Vijay Singh
                Tester:
                Samir Mohammed
              • Watchers:
                4 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