How can I ensure that the console global is created first? I tried forcing the globals and require overrides to the front of the overrideFiles listing and making the Ti/API overrides grab the console global inside the overriding functions rather than inside the getOverrides function. That doesn't work, I still get the same error.

From: Bryan Hughes <notifications@github.com<mailto:notifications@github.com>>
Reply-To: appcelerator/titanium-code-processor <reply@reply.github.com<mailto:reply@reply.github.com>>
Date: Monday, July 29, 2013 1:27 PM
To: appcelerator/titanium-code-processor <titanium-code-processor@noreply.github.com<mailto:titanium-code-processor@noreply.github.com>>
Cc: Christopher Williams <cwilliams@appcelerator.com<mailto:cwilliams@appcelerator.com>>
Subject: Re: [titanium-code-processor] TIMOB-13183 CodeProcessor: Merge require and common-globals plugins into ti-api-provider (#227)


In plugins/ti-api-provider/lib/overrides/Ti/API.js:

> \ No newline at end of file
> +};
> +
> +/**
> + * console.*() prototype method
> + *
> + * @private
> + */
> +function ConsoleFunc(type, className) {
> +     Base.ObjectType.call(this, className || 'Function');
> +     this.put('length', new Base.NumberType(1), false, true);
> +     this._type = type;
> +}
> +util.inherits(ConsoleFunc, Base.FunctionTypeBase);
> +ConsoleFunc.prototype.callFunction = Base.wrapNativeCall(function callFunction(thisVal, args) {


This definitely needs to be fixed properly. This is the issue we found, but there could be other dependency problems we haven't found (remember, ti-api-provider used to be dependent on these features, and it was written with the assumption that all of them would be available). Also, this is a technical debt ticket, not a feature ticket or bug ticket, which means that we should do it right since it doesn't give us anything else anyways.

-
Reply to this email directly or view it on GitHub<https://github.com/appcelerator/titanium-code-processor/pull/227/files#r5455746>.