I have an application based off the AMD sample (https://github.com/Esri/jsapi-resources/tree/master/4.x/amd)
When I upgrade the API to version 4.25 I get a few issues, I have tried to resolve them but further issues arise.
After this I get an exception in the closureCompiler
I then tried bumping the version of dojo-util from git+https://github.com/Esri/dojo-util.git#1.16.3-esri to git+https://github.com/Esri/dojo-util.git#1.17.3-esri but the exception is still happening
null
Node(OPTCHAIN_CALL): scheduling.js.uncompressed.js:5:1633
define(["exports","./maybe","./nextTick","./PerformanceSampler","./PooledArray","./promiseUtils","./time"],(function(e,n,t,r,o,s,i){"use strict";let a=function(e){this.phases=e,this.paused=!1,this.ticks=-1,this.removed=!1},c=function(){function e(e){this.callback=e,this.isActive=!0}return e.prototype.remove=function(){this.isActive=!1},e}(),l=0,u=0;const m={time:i.Milliseconds(0),deltaTime:i.Milliseconds(0),elapsedFrameTime:i.Milliseconds(0),frameDuration:i.Milliseconds(0)},d=["prepare","preRender","render","postRender","update","finish"],f=[],p=new o;let h=function(){function e(e){this._task=e}var n=e.prototype;return n.remove=function(){this._task.removed=!0},n.pause=function(){this._task.paused=!0},n.resume=function(){this._task.paused=!1},e}();const k={frameTasks:p,willDispatch:!1,clearFrameTasks:M,dispatch:D,executeFrameTasks:b};function w(e){const n=new c(e);return f.push(n),k.willDispatch||(k.willDispatch=!0,t.nextTick(D)),n}function v(e){const n=new a(e);return p.push(n),null==T&&(l=performance.now(),T=requestAnimationFrame(F)),new h(n)}let T=null;function M(e=!1){p.forAll((e=>{e.removed=!0})),e&&g()}function A(e){u=Math.max(0,e)}function F(){const e=performance.now();T=null,T=p.length>0?requestAnimationFrame(F):null,k.executeFrameTasks(e)}function b(e){const n=i.Milliseconds(e-l);l=e;const t=u>0?u:1e3/60,r=Math.max(0,n-t);for(let o=0;o<d.length;o++){const s=performance.now(),a=d[o];p.forAll((s=>{if(s.paused||s.removed)return;0===o&&s.ticks++;s.phases[a]&&(m.time=e,m.deltaTime=0===s.ticks?i.Milliseconds(0):n,m.elapsedFrameTime=i.Milliseconds(performance.now()-e),m.frameDuration=i.Milliseconds(t-r),s.phases[a]?.call(s,m))})),R[o].record(performance.now()-s)}g(),P.record(performance.now()-e)}const x=new o;function g(){p.forAll((e=>{e.removed&&x.push(e)})),p.removeUnorderedMany(x.data,x.length),x.clear()}function D(){for(;f.length;){const e=n.assumeNonNull(f.shift());e.isActive&&e.callback()}k.willDispatch=!1}function y(e=1,n){const r=s.createResolver(),o=()=>{s.isAborted(n)?r.reject(s.createAbortError()):0===e?r():(--e,t.nextTick((()=>o())))};return o(),r.promise}function _(){const e=s.createResolver(),n=v({postRender:()=>{n.remove(),w(e)}});return e.promise}const R=d.map((e=>new r(e))),P=new r("total");e.FrameTaskHandle=h,e.addFrameTask=v,e.debug=k,e.performanceInfo=R,e.performanceTotal=P,e.schedule=w,e.setFrameDuration=A,e.waitAnimationFrame=_,e.waitTicks=y,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
Parent(COMMA): scheduling.js.uncompressed.js:5:1489
define(["exports","./maybe","./nextTick","./PerformanceSampler","./PooledArray","./promiseUtils","./time"],(function(e,n,t,r,o,s,i){"use strict";let a=function(e){this.phases=e,this.paused=!1,this.ticks=-1,this.removed=!1},c=function(){function e(e){this.callback=e,this.isActive=!0}return e.prototype.remove=function(){this.isActive=!1},e}(),l=0,u=0;const m={time:i.Milliseconds(0),deltaTime:i.Milliseconds(0),elapsedFrameTime:i.Milliseconds(0),frameDuration:i.Milliseconds(0)},d=["prepare","preRender","render","postRender","update","finish"],f=[],p=new o;let h=function(){function e(e){this._task=e}var n=e.prototype;return n.remove=function(){this._task.removed=!0},n.pause=function(){this._task.paused=!0},n.resume=function(){this._task.paused=!1},e}();const k={frameTasks:p,willDispatch:!1,clearFrameTasks:M,dispatch:D,executeFrameTasks:b};function w(e){const n=new c(e);return f.push(n),k.willDispatch||(k.willDispatch=!0,t.nextTick(D)),n}function v(e){const n=new a(e);return p.push(n),null==T&&(l=performance.now(),T=requestAnimationFrame(F)),new h(n)}let T=null;function M(e=!1){p.forAll((e=>{e.removed=!0})),e&&g()}function A(e){u=Math.max(0,e)}function F(){const e=performance.now();T=null,T=p.length>0?requestAnimationFrame(F):null,k.executeFrameTasks(e)}function b(e){const n=i.Milliseconds(e-l);l=e;const t=u>0?u:1e3/60,r=Math.max(0,n-t);for(let o=0;o<d.length;o++){const s=performance.now(),a=d[o];p.forAll((s=>{if(s.paused||s.removed)return;0===o&&s.ticks++;s.phases[a]&&(m.time=e,m.deltaTime=0===s.ticks?i.Milliseconds(0):n,m.elapsedFrameTime=i.Milliseconds(performance.now()-e),m.frameDuration=i.Milliseconds(t-r),s.phases[a]?.call(s,m))})),R[o].record(performance.now()-s)}g(),P.record(performance.now()-e)}const x=new o;function g(){p.forAll((e=>{e.removed&&x.push(e)})),p.removeUnorderedMany(x.data,x.length),x.clear()}function D(){for(;f.length;){const e=n.assumeNonNull(f.shift());e.isActive&&e.callback()}k.willDispatch=!1}function y(e=1,n){const r=s.createResolver(),o=()=>{s.isAborted(n)?r.reject(s.createAbortError()):0===e?r():(--e,t.nextTick((()=>o())))};return o(),r.promise}function _(){const e=s.createResolver(),n=v({postRender:()=>{n.remove(),w(e)}});return e.promise}const R=d.map((e=>new r(e))),P=new r("total");e.FrameTaskHandle=h,e.addFrameTask=v,e.debug=k,e.performanceInfo=R,e.performanceTotal=P,e.schedule=w,e.setFrameDuration=A,e.waitAnimationFrame=_,e.waitTicks=y,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
D:\DEV2022\geocirrus\OctonionDojo\dist\esri\core\watchUtils.js:. OPTIMIZER FAILED: JavaException: java.lang.RuntimeException: INTERNAL COMPILER ERROR.
Please report this problem.
Will the sample be updated or is there something else I can do to get the latest version to build in AMD? Is there any way to get more verbose messages from the closure compiler?
The 4x AMD samples are deprecated as it becomes more difficult to get apps and other modern bits to play nice together. We won't be updating them. You can try updating to the latest dojo utils, with the latest closure compiler.
We have a fork with 1.17.3 here.
Thanks Rene,
The Esri fork of the dojo-util did not work but I had success using the the original. "dojo-util": "^1.17.3"