[ALOY-1690] sourcemaps not being generated for files under lib
|Affected Version/s||Alloy 1.13.9|
|Fix Version/s||CLI Release 7.1.0, Alloy 1.14.0|
DescriptionAlloy should be generating sourcemaps for files under
libaccording to ALOY-616 but this currently is not occurring. It looks like this was broken in ALOY-1262 as it checks whether the target file (i.e the file we're about to write exists) rather than the file we're generating the sourcemap for.
Steps to reproduce1. Compile kitchensink-v2
\[appc\] alloy compile --config platform=ios2. Check the sourcemap directory
ExpectedThere should be
permissions.js.mapfiles in that folder
ActualThose files do not exist
- Ewan Harris 2019-05-24
Looking closer at this, the whole sourcemapping for the lib files seems off. It's setting the filename in the sourcemaps to a non-existent .js file under the build/map directory, however after some reading/looking at controller sourcemapping filename should be the filename for the file the sourcemap represents in the classic code at runtime e.g.
- Ewan Harris 2019-05-29 Included in ALOY-1612 https://github.com/appcelerator/alloy/pull/893/commits/900be2d4679674fd5d84aa5571cff9bb0a48976e
- Christopher Williams 2019-06-19
Note that there is still an unresolved known issue here in that while the external source maps are generated in the build/map folder - the copied file under
Resources/*does not* have a
//# sourcemappingURL=comment pointing to it, so babel/Studio/Safari/Chrome DevTools aren't aware of it and able to "carry" it forward like files under
app/are. I think another ticket should be opened to fix that issue as well, otherwise under the debugger for the "source" file you set the
Resources/<platform>/file.jspath/file rather then the path/file from
app/lib/file.js(Additionally, it's entirely possible the source map for the file is wrong due to a post-processing run of the "optimizer". The fix for this is more involved and requires doing the optimizing, source map generation and writing of the copied/generated file all at once, rather than as 3 separate steps.
- Keerthi Mahalingam 2019-06-20
Tested and Verified the Fix on cli 7.1.0-master.22. actionbar.js.map, logger.js.map, and, permissions.js.map files were shown when complied.Works as expected. Closing.
Name = Mac OS X Version = 10.13.6 Architecture = 64bit Node.js Node.js Version = 8.9.1 npm Version = 5.5.1 Titanium CLI CLI Version = 5.1.1 Studio version =184.108.40.206903111843 Cli =7.1.0-master.22