Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1140] Windows: The path format for app.js is different from controller files in sourcemap

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-10-28T02:16:32.000+0000
Affected Version/sAlloy 1.5.0
Fix Version/sAlloy 1.6.0
ComponentsAppcelerator Studio
Labelsn/a
ReporterPraveen Innamuri
AssigneeTim Poulsen
Created2014-09-16T04:11:53.000+0000
Updated2015-03-30T18:14:51.000+0000

Description

The sourcemap contains different source location path format for app.js file compared to controller files on Windows platform. The map file for app.js is :
"version":3,"file":"Resources/android/app.js","sources":["Resources/android/app.js"]
The map file for index.js is :
"version":3,"file":"Resources\\alloy\\controllers\\index.js","sources":["Resources\\alloy\\controllers\\index.js","app\\controllers\\index.js"]
Due to the difference of path formats, Studio fails to parse the paths and the debugger fails to stop at the expected breakpoints. We need to investigate the difference in the path generation and ideally, in order to handle the paths consistently across all platforms, it might be better to have the paths in unix format.

Comments

  1. Tim Poulsen 2014-09-30

    PR: https://github.com/appcelerator/alloy/pull/581 Functional test: 1. Create a new Alloy project or use an existing one (any functional app will do). 2. Make sure there is some valid code in the app/alloy.js file (that won't get removed the optimizer -- like set an Alloy.Globals.something variable). 3. Update config.json to set sourcemap: true 4. Build the app. 5. Open build/map/Resources/(platform)/app.js and compare to one of the controllers in build/map/Resources/(platform)/alloy/controllers The format of the file paths should match (all use \ \ folderName on Windows) <- stupid Jira won't let me put two \ next to each other w/out spaces
  2. Tim Poulsen 2014-10-23

    Reopen to backport to 1_6_X branch
  3. Tim Poulsen 2014-10-24

    1_6_X PR https://github.com/appcelerator/alloy/pull/608 Functional test as above
  4. Feon Sua Xin Miao 2014-10-28

    PR merged.
  5. Eric Wieber 2015-03-30

    Verified fixed using: Windows 8 Alloy 1.6.0-alpha2 Appc NPM 0.3.37 Appc CLI 0.2.201 Studio 4.0.0.v201503271912 SDK 4.0.0.v20150327114208 Paths match and all include the '\\'.

JSON Source