Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1350] Warning on compile: moment construction falls back to js Date

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionCannot Reproduce
Resolution Date2018-03-07T18:34:54.000+0000
Affected Version/salloy 1.7.30
Fix Version/sn/a
ComponentsTooling
Labelsn/a
ReporterFokke Zandbergen
AssigneeFeon Sua Xin Miao
Created2016-02-04T08:54:16.000+0000
Updated2018-03-07T18:34:54.000+0000

Description

Alloy spits out a Moment.js warning on compile and a long stack trace on debug-level:
[INFO]  [ios.xml] view processing...
[INFO]    style:      "ios.tss"
[INFO]    view:       "ios.xml"
[WARN]  ing: moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.
[ERROR]
[DEBUG]     at Function.createFromInputFallback (/Users/fokkezb/dev/forks/alloy/node_modules/moment/moment.js:746:36)
[DEBUG]     at configFromString (/Users/fokkezb/dev/forks/alloy/node_modules/moment/moment.js:826:32)
[DEBUG]     at configFromInput (/Users/fokkezb/dev/forks/alloy/node_modules/moment/moment.js:1353:13)
[DEBUG]     at prepareConfig (/Users/fokkezb/dev/forks/alloy/node_modules/moment/moment.js:1340:13)
[DEBUG]     at createFromConfig (/Users/fokkezb/dev/forks/alloy/node_modules/moment/moment.js:1307:44)
[DEBUG]     at createLocalOrUTC (/Users/fokkezb/dev/forks/alloy/node_modules/moment/moment.js:1385:16)
[DEBUG]     at local__createLocal (/Users/fokkezb/dev/forks/alloy/node_modules/moment/moment.js:1389:16)
[DEBUG]     at utils_hooks__hooks (/Users/fokkezb/dev/forks/alloy/node_modules/moment/moment.js:16:29)
[DEBUG]     at Object.exports.createDate (/Users/fokkezb/dev/forks/alloy/Alloy/utils.js:572:26)
[DEBUG]     at processStyle (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/styler.js:364:17)
[DEBUG]     at Object.exports.processStyle (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/styler.js:420:2)
[DEBUG]     at Object.exports.generateStyleParams (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/styler.js:600:20)
[DEBUG]     at parse (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/parsers/default.js:132:19)
[DEBUG]     at Object.exports.parse (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/parsers/base.js:11:17)
[DEBUG]     at Object.exports.parse (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/parsers/default.js:10:27)
[DEBUG]     at parse (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/parsers/Ti.UI.Picker.js:72:31)
[DEBUG]     at Object.exports.parse (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/parsers/base.js:11:17)
[DEBUG]     at Object.exports.parse (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/parsers/Ti.UI.Picker.js:29:27)
[DEBUG]     at Object.exports.generateNode (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/compilerUtils.js:317:48)
[DEBUG]     at /Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/compilerUtils.js:401:29
[DEBUG]     at Array.forEach (native)
[DEBUG]     at Function._.each._.forEach (/Users/fokkezb/dev/forks/alloy/Alloy/lib/alloy/underscore.js:79:11)
[DEBUG]     at Object.exports.generateNode (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/compilerUtils.js:392:5)
[DEBUG]     at /Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/compilerUtils.js:401:29
[DEBUG]     at Array.forEach (native)
[DEBUG]     at Function._.each._.forEach (/Users/fokkezb/dev/forks/alloy/Alloy/lib/alloy/underscore.js:79:11)
[DEBUG]     at Object.exports.generateNode (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/compilerUtils.js:392:5)
[DEBUG]     at /Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/compilerUtils.js:401:29
[DEBUG]     at Array.forEach (native)
[DEBUG]     at Function._.each._.forEach (/Users/fokkezb/dev/forks/alloy/Alloy/lib/alloy/underscore.js:79:11)
[DEBUG]     at Object.exports.generateNode (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/compilerUtils.js:392:5)
[DEBUG]     at Object.exports.generateNodeExtended (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/compilerUtils.js:254:17)
[DEBUG]     at parse (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/parsers/Ti.UI.Tab.js:27:14)
[DEBUG]     at Object.exports.parse (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/parsers/base.js:11:17)
[DEBUG]     at Object.exports.parse (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/parsers/Ti.UI.Tab.js:7:27)
[DEBUG]     at Object.exports.generateNode (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/compilerUtils.js:317:48)
[DEBUG]     at /Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/index.js:693:28
[DEBUG]     at Array.forEach (native)
[DEBUG]     at Function._.each._.forEach (/Users/fokkezb/dev/forks/alloy/Alloy/lib/alloy/underscore.js:79:11)
[DEBUG]     at parseAlloyComponent (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/index.js:687:5)
[DEBUG]     at /Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/index.js:304:6
[DEBUG]     at Array.forEach (native)
[DEBUG]     at Function._.each._.forEach (/Users/fokkezb/dev/forks/alloy/Alloy/lib/alloy/underscore.js:79:11)
[DEBUG]     at /Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/index.js:293:6
[DEBUG]     at Array.forEach (native)
[DEBUG]     at Function._.each._.forEach (/Users/fokkezb/dev/forks/alloy/Alloy/lib/alloy/underscore.js:79:11)
[DEBUG]     at module.exports (/Users/fokkezb/dev/forks/alloy/Alloy/commands/compile/index.js:289:4)
[DEBUG]     at Object.<anonymous> (/Users/fokkezb/dev/forks/alloy/Alloy/alloy.js:113:46)
[DEBUG]     at Module._compile (module.js:413:34)
[DEBUG]     at Object.Module._extensions..js (module.js:422:10)
[DEBUG]     at Module.load (module.js:357:32)
[DEBUG]     at Function.Module._load (module.js:314:12)
[DEBUG]     at Module.require (module.js:367:17)
[DEBUG]     at require (internal/module.js:16:19)
[DEBUG]     at Object.<anonymous> (/Users/fokkezb/dev/forks/alloy/bin/alloy:3:1)
[DEBUG]     at Module._compile (module.js:413:34)
[DEBUG]     at Object.Module._extensions..js (module.js:422:10)
[DEBUG]     at Module.load (module.js:357:32)
[DEBUG]     at Function.Module._load (module.js:314:12)
[DEBUG]     at Function.Module.runMain (module.js:447:10)
[DEBUG]     at startup (node.js:139:18)
[DEBUG]     at node.js:999:3
[INFO]    controller: "ios.js"
Source (but there's probably more): https://github.com/appcelerator/alloy/blob/master/Alloy/utils.js#L572 PS: We fixed same issue for 360 in APPTS-6100

Comments

  1. Feon Sua Xin Miao 2018-03-07

    Env: CLI 7.0.2. Please reopen the issue if this appears again.

JSON Source