It appears that we very occasionally get generated javascript that is invalid. Invalid here means it will compile and run, but during runtime it will throw an error because of missing variable names / null or undefined.
It's really hard / impossible to reliably recreate, and as mentioned only seems to happen once out of every few hundred builds.
It appears that we very occasionally get generated javascript that is invalid. Invalid here means it will compile and run, but during runtime it will throw an error because of missing variable names / null or undefined.
It's really hard / impossible to reliably recreate, and as mentioned only seems to happen once out of every few hundred builds.
The code in question:
(defn priorities-last-modified [priorities] (last (sort (concat (map :last-modified-date priorities) (mapcat (comp (partial map :last-modified-date) :goals) priorities)))))(Yes, this is terrible code but it works 99% of the time.)
The erring output looks like this:
jT( v([ fG, function(a) { a = uh(a, new E(null, 4, 5, F, [Iu, Zk, fy, LF], null)); a = Lf(BH, a); var b = yg.j( G.j(gs, priorities__$1), mh(Xg.j(Yg.j(G, gs), GA), v([priorities__$1])) ); b = Jf(Gf, b); return new h(null, 2, [LF, a, MN, We(b)], null); } ]) );A recompile fixes the output and spits out this:
hT( v([ eG, function(a) { var b = uh(a, new E(null, 4, 5, F, [Hu, $k, dy, KF], null)); a = Lf(zH, b); b = We(Jf(Gf, yg.j(G.j(fs, b), mh(Xg.j(Yg.j(G, fs), FA), v([b]))))); return new h(null, 2, [KF, a, NN, b], null); } ]) );The issue from the first compilation results in a runtime error of "priorities__$1 is not defined"
We are using