cortav  Diff

Differences From Artifact [e7bf814ce9]:

To Artifact [eb3cc08f95]:


   284    284   
   285    285   ct.ext.job = declare {
   286    286   	ident = 'ext-job';
   287    287   	init = {
   288    288   		states = {};
   289    289   	};
   290    290   	construct = function(me,name,doc,pred,...)
   291         -		print('constructing job',name,'for',doc)
   292    291   		-- prepare contexts for relevant extensions
   293    292   		me.name = name
   294    293   		me.doc = doc -- for reqs + limiting
   295    294   		for _, ext in pairs(ct.ext.loaded) do
   296    295   			if pred == nil or pred(ext) then
   297    296   				me.states[ext] = {}
   298    297   			end
................................................................................
   385    384   		end;
   386    385   		hook = function(me, hook, ...)
   387    386   			-- used when extensions may need to persist state across
   388    387   			-- multiple functions or invocations
   389    388   			local ret = {}
   390    389   			local hook_id = me.name ..'_'.. hook
   391    390   			for hookfn, ext, state in me:each('hook', hook_id) do
   392         -				print(' - running hook for ext',ext.id)
   393    391   				table.insert(ret, (hookfn(me:delegate(ext),...)))
   394    392   			end
   395    393   			return ret
   396    394   		end;
   397    395   	};
   398    396   }
   399    397