{ "id": "110261", "key": "TIMOB-12866", "fields": { "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true }, "parent": { "id": "106901", "key": "TIMOB-12143", "fields": { "summary": "CLI: Implement minification with source number line mapping", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2020-06-30T14:43:55.000+0000", "created": "2013-02-26T19:45:46.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [ { "id": "27794", "type": { "id": "10020", "name": "Depends", "inward": "is dependent of", "outward": "depends on" }, "inwardIssue": { "id": "110258", "key": "TIMOB-12864", "fields": { "summary": "iOS: Store source map file as part of compiled application", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } }, { "id": "27796", "type": { "id": "10020", "name": "Depends", "inward": "is dependent of", "outward": "depends on" }, "inwardIssue": { "id": "110259", "key": "TIMOB-12865", "fields": { "summary": "Android: Store source map file as part of compiled application", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } } ], "assignee": null, "updated": "2020-06-30T14:43:55.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "12305", "name": "Core", "description": "Central component of the Platform (outside of Tooling, or platform specific implementation details)" } ], "description": "The source map file described by https://github.com/mozilla/source-map needs to be parseable by our framework. If we can't use the JavaScript version of the library, we'll need to convert it to a language we can use across platforms, likely C.\r\n\r\nSee here for links to a Java-based version (Apache License) as part of the Google closure compiler.", "attachment": [], "flagged": false, "summary": "Create c-based library to read source map", "creator": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1058, "state": "closed", "name": "2018 Sprint 16 SDK", "startDate": "2018-07-29T22:26:06.486Z", "endDate": "2018-08-12T22:26:00.000Z", "completeDate": "2018-08-13T17:38:16.757Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "242064", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I talked with Max through our source map use cases, and the pros and cons of various supporting architectures. We decided the best approach is to transcode the source map to a SQLite database at build time and deploy this database with the app. Our reasons for this decision are:\n\n1) Mobile apps only require fast query of the source map. This is best handled by mobile databases (e.g. SQLite).\n\n2) Source maps tend to be large (i.e. at least 3X the size of the original JavaScript), and mobile apps operate in an environment with limited resources. This is best handled by mobile databases (e.g. SQLite) which are designed to provide a small memory footprint by storing the indexes on disk. We do the memory intensive work of parsing and decoding the source map at build time and encoding it into an efficient query-able format.\n\n3) SQLite is supported on all of our mobile platforms that require source map functionality.\n\n4) We can reuse two existing JavaScript node modules to do the source map <-> SQLite transcoding, which is easily integrated into the CLI:\n\n4.1) We'll use the node \"source-map\" module to parse and decode the source map (see https://github.com/mozilla/source-map).\n\n4.2) We'll use the node \"node-sqlite\" module to encode the source map data into a SQLite database (see https://github.com/orlandov/node-sqlite).\n\n\nThe task breakdown for this ticket is:\n\n1. Design the SQLite schema for source map data.\n\n2. Extend the CLI to transcode the source map data into a SQLite database.\n\n3. Extend all titanium_mobile platforms to query this SQLite database when reporting errors to Crittercism. On iOS this is TiScriptError and TiExceptionHandler.", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-13T19:52:39.000+0000", "updated": "2013-03-13T19:52:39.000+0000" }, { "id": "242252", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "1. Reviewed source map specs.\r\n2. Identified our specific on-device use cases.\r\n3. Discussed with team the pros/cons of different architectures.\r\n4. Created prototype node package for parsing/decoding source map data.", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-14T16:22:55.000+0000", "updated": "2013-03-14T16:22:55.000+0000" }, { "id": "243287", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "A few questions:\r\n\r\n1. Is this an Enterprise-only feature? Or will it be open sourced?\r\n\r\n2. When I deliver this feature after the 3.1 code freeze date, which repository does it belong in? This feature is a standalone utility that generates SQLite database files from source map files created by the CLI. This SQLite database file is a build artifact that will be an app Resource. Therefore, I'm thinking it should live in it's own github repository because it is standalone. Thoughts?\r\n", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-20T22:37:36.000+0000", "updated": "2013-03-20T22:37:51.000+0000" }, { "id": "243333", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{noformat}\n** Schema\n\nThis is the SQLite3 schema for source maps. See below for more details\nabout each table and column.\n\n\n +------------------+\n | mappings |\n |------------------|\n | generated_line |\n +-----------+ | generated_column |\n | sources | | original_line | +---------+\n |-----------| | original_column | | names |\n | source_id |<------+| source_id | |---------|\n | source | | name_id |+----->| name_id |\n +-----------+ +------------------+ | name |\n +---------+\n** Table: mappings\n\nThe \"mappings\" table maps a {line, column} from the \"generated\"\nJavaScript source file (e.g. minified and/or obfuscated) to the\ncorresponding {line, column} of the \"original\" JavaScript source file\nand possible a symbol name.\n\n |------------------+---------+---------------------------|\n | Column Name | Type | Comments |\n |------------------+---------+---------------------------|\n | generated_line | integer | primary key |\n | generated_column | integer | primary key |\n | original_line | integer | |\n | original_column | integer | |\n | source_id | integer | foreign key (never null) |\n | name_id | integer | foreign key (may be null) |\n |------------------+---------+---------------------------|\n\n** Table: sources\n\nThe \"sources\" table contains the original JavaScript source file\nnames.\n\n |-------------+---------+----------------------|\n | Column Name | Type | Comments |\n |-------------+---------+----------------------|\n | source_id | integer | primary key |\n | source | text | original source file |\n |-------------+---------+----------------------|\n \n** Table: names\n\nThe \"names\" table contains the original JavaScript symbol names.\n\n |-------------+---------+---------------------------------|\n | Column Name | Type | Comments |\n |-------------+---------+---------------------------------|\n | name_id | integer | primary key |\n | name | text | original JavaScript symbol name |\n |-------------+---------+---------------------------------|\n{noformat}\n", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-21T01:25:11.000+0000", "updated": "2013-03-21T01:25:11.000+0000" }, { "id": "243334", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{noformat}\n** Example SQL SELECT\n\n#+begin_src sh\n#!/usr/bin/env bash\n\n# This bash script demonstrates querying a SQLite3 \"source map\"\n# database. It takes three arguments:\n#\n# 1. generated_line\n# 2. generated_column\n# 3. path to the SQLite3 database file\n#\n# It then invokes the sqlite3 command line utility with these\n# arguments by parameterizing a SQL SELECT that returns information\n# about the original JavaScript source.\n\nGENERATED_LINE=$1\nGENERATED_COLUMN=$2\nSQLITE3_DBFLE=$3\n\nsqlite3 \"${SQLITE3_DBFLE}\" <